Constructor */
| 48 | |
| 49 | /** Constructor */ |
| 50 | ExampleDialog::ExampleDialog(QWidget *parent) |
| 51 | : MainPage(parent) |
| 52 | { |
| 53 | /* Invoke the Qt Designer generated object setup routine */ |
| 54 | ui.setupUi(this); |
| 55 | |
| 56 | connect( ui.peertreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( peertreeWidgetCostumPopupMenu( QPoint ) ) ); |
| 57 | |
| 58 | /* hide the Tree +/- */ |
| 59 | ui.peertreeWidget -> setRootIsDecorated( false ); |
| 60 | |
| 61 | /* Set header resize modes and initial section sizes */ |
| 62 | QHeaderView * _header = ui.peertreeWidget->header () ; |
| 63 | QHeaderView_setSectionResizeModeColumn(_header, 0, QHeaderView::Custom); |
| 64 | QHeaderView_setSectionResizeModeColumn(_header, 1, QHeaderView::Interactive); |
| 65 | QHeaderView_setSectionResizeModeColumn(_header, 2, QHeaderView::Interactive); |
| 66 | QHeaderView_setSectionResizeModeColumn(_header, 3, QHeaderView::Interactive); |
| 67 | QHeaderView_setSectionResizeModeColumn(_header, 4, QHeaderView::Interactive); |
| 68 | QHeaderView_setSectionResizeModeColumn(_header, 5, QHeaderView::Interactive); |
| 69 | QHeaderView_setSectionResizeModeColumn(_header, 6, QHeaderView::Interactive); |
| 70 | QHeaderView_setSectionResizeModeColumn(_header, 7, QHeaderView::Interactive); |
| 71 | QHeaderView_setSectionResizeModeColumn(_header, 8, QHeaderView::Interactive); |
| 72 | QHeaderView_setSectionResizeModeColumn(_header, 9, QHeaderView::Interactive); |
| 73 | QHeaderView_setSectionResizeModeColumn(_header, 10, QHeaderView::Interactive); |
| 74 | QHeaderView_setSectionResizeModeColumn(_header, 11, QHeaderView::Interactive); |
| 75 | |
| 76 | _header->resizeSection ( 0, 25 ); |
| 77 | _header->resizeSection ( 1, 100 ); |
| 78 | _header->resizeSection ( 2, 100 ); |
| 79 | _header->resizeSection ( 3, 100 ); |
| 80 | _header->resizeSection ( 4, 100 ); |
| 81 | _header->resizeSection ( 5, 200 ); |
| 82 | _header->resizeSection ( 6, 100 ); |
| 83 | _header->resizeSection ( 7, 100 ); |
| 84 | _header->resizeSection ( 8, 100 ); |
| 85 | _header->resizeSection ( 9, 100 ); |
| 86 | _header->resizeSection ( 10, 100 ); |
| 87 | } |
| 88 | |
| 89 | void ExampleDialog::peertreeWidgetCostumPopupMenu( QPoint point ) |
| 90 | { |
nothing calls this directly
no outgoing calls
no test coverage detected