diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-13 20:57:07 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-13 20:57:27 +0200 |
commit | 68c6239cdcc78f2063efd75a5014b3dd69c74f21 (patch) | |
tree | 0431b416f36a4f20fbcf1a74175b42af89531bcb /gui/mainwindow.h | |
parent | 9b3af68e44f927cf71a76949acd54947ebf4b88c (diff) | |
download | nextpnr-68c6239cdcc78f2063efd75a5014b3dd69c74f21.tar.gz nextpnr-68c6239cdcc78f2063efd75a5014b3dd69c74f21.tar.bz2 nextpnr-68c6239cdcc78f2063efd75a5014b3dd69c74f21.zip |
Make custom types for elements in tree view
Diffstat (limited to 'gui/mainwindow.h')
-rw-r--r-- | gui/mainwindow.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 27918486..b528f6b7 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -27,11 +27,13 @@ class MainWindow : public QMainWindow private: int executePython(std::string command); + void addProperty(QtVariantProperty *property, const QString &id); private Q_SLOTS: void on_lineEdit_returnPressed(); void prepareMenu(const QPoint &pos); - void selectObject(QTreeWidgetItem *item); + void selectObject(); + void onItemClicked(QTreeWidgetItem *item, int); private: Ui::MainWindow *ui; @@ -39,7 +41,11 @@ class MainWindow : public QMainWindow Design *design; QtVariantPropertyManager *variantManager; QtVariantEditorFactory *variantFactory; - QtTreePropertyBrowser *variantEditor; + QtTreePropertyBrowser *propertyEditor; + QTreeWidgetItem *itemContextMenu; + + QMap<QtProperty *, QString> propertyToId; + QMap<QString, QtVariantProperty *> idToProperty; }; #endif // MAINWINDOW_H |