void FunctionManager::initTree() { m_tree = new QTreeWidget(this); layout()->addWidget(m_tree); // Add two columns for function and bus QStringList labels; labels << "Function" << "Bus"; m_tree->setHeaderLabels(labels); m_tree->header()->setResizeMode(QHeaderView::ResizeToContents); m_tree->setRootIsDecorated(false); m_tree->setAllColumnsShowFocus(true); m_tree->setSelectionMode(QAbstractItemView::ExtendedSelection); m_tree->setContextMenuPolicy(Qt::CustomContextMenu); m_tree->setSortingEnabled(true); m_tree->sortByColumn(KColumnName, Qt::AscendingOrder); // Catch selection changes connect(m_tree, SIGNAL(itemSelectionChanged()), this, SLOT(slotTreeSelectionChanged())); // Catch mouse double clicks connect(m_tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotEdit())); // Catch right-mouse clicks connect(m_tree, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(slotTreeContextMenuRequested(const QPoint&))); }
int FunctionManager::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotModeChanged((*reinterpret_cast< Doc::Mode(*)>(_a[1]))); break; case 1: slotFunctionRemoved((*reinterpret_cast< quint32(*)>(_a[1]))); break; case 2: slotTreeSelectionChanged(); break; case 3: slotTreeContextMenuRequested((*reinterpret_cast< const QPoint(*)>(_a[1]))); break; case 4: slotBusTriggered((*reinterpret_cast< QAction*(*)>(_a[1]))); break; case 5: slotBusNameChanged((*reinterpret_cast< quint32(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); break; case 6: slotAddScene(); break; case 7: slotAddChaser(); break; case 8: slotAddCollection(); break; case 9: slotAddEFX(); break; case 10: slotWizard(); break; case 11: { int _r = slotEdit(); if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; } break; case 12: slotClone(); break; case 13: slotDelete(); break; case 14: slotSelectAll(); break; default: ; } _id -= 15; } return _id; }