aboutsummaryrefslogtreecommitdiffstats
path: root/gui/designwidget.h
diff options
context:
space:
mode:
authorDarrell Harmon <darrell@harmoninstruments.com>2018-11-11 12:50:44 -0700
committerDarrell Harmon <darrell@harmoninstruments.com>2018-11-11 12:50:44 -0700
commit3312b9832d1a389a8bbc2a078f1958992743f00a (patch)
treef4426b4297178292bfe5cdb87ed9788621f05f2b /gui/designwidget.h
parentcdd0f0fea0555129a16ff0a2c337333b3493b173 (diff)
parent9e5aded5c6583e36604aa09d22d3b2de3ff47905 (diff)
downloadnextpnr-3312b9832d1a389a8bbc2a078f1958992743f00a.tar.gz
nextpnr-3312b9832d1a389a8bbc2a078f1958992743f00a.tar.bz2
nextpnr-3312b9832d1a389a8bbc2a078f1958992743f00a.zip
Merge branch 'master' of github.com:YosysHQ/nextpnr
Diffstat (limited to 'gui/designwidget.h')
-rw-r--r--gui/designwidget.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/gui/designwidget.h b/gui/designwidget.h
index 0248d2c7..89c6e702 100644
--- a/gui/designwidget.h
+++ b/gui/designwidget.h
@@ -21,6 +21,7 @@
#define DESIGNWIDGET_H
#include <QMouseEvent>
+#include <QTabWidget>
#include <QTreeView>
#include <QVariant>
#include "nextpnr.h"
@@ -65,11 +66,14 @@ class DesignWidget : public QWidget
const ElementType &type = ElementType::NONE);
QString getElementTypeName(ElementType type);
ElementType getElementTypeByName(QString type);
+ TreeModel::Model *getTreeByElementType(ElementType type);
+ int getIndexByElementType(ElementType type);
int getElementIndex(ElementType type);
void updateButtons();
- void addToHistory(QModelIndex item);
+ void addToHistory(int tab, QModelIndex item);
std::vector<DecalXY> getDecals(ElementType type, IdString value);
void updateHighlightGroup(QList<TreeModel::Item *> item, int group);
+ void clearAllSelectionModels();
Q_SIGNALS:
void selected(std::vector<DecalXY> decal, bool keep);
void highlight(std::vector<DecalXY> decal, int group);
@@ -78,12 +82,12 @@ class DesignWidget : public QWidget
private Q_SLOTS:
void prepareMenuProperty(const QPoint &pos);
- void prepareMenuTree(const QPoint &pos);
- void onSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
+ void prepareMenuTree(int num, const QPoint &pos);
+ void onSelectionChanged(int num, const QItemSelection &selected, const QItemSelection &deselected);
void onItemDoubleClicked(QTreeWidgetItem *item, int column);
void onDoubleClicked(const QModelIndex &index);
void onSearchInserted();
- void onHoverIndexChanged(QModelIndex index);
+ void onHoverIndexChanged(int num, QModelIndex index);
void onHoverPropertyChanged(QtBrowserItem *item);
public Q_SLOTS:
void newContext(Context *ctx);
@@ -95,9 +99,11 @@ class DesignWidget : public QWidget
private:
Context *ctx;
- TreeView *treeView;
- QItemSelectionModel *selectionModel;
- TreeModel::Model *treeModel;
+ QTabWidget *tabWidget;
+
+ TreeView *treeView[6];
+ QItemSelectionModel *selectionModel[6];
+ TreeModel::Model *treeModel[6];
QLineEdit *searchEdit;
QtVariantPropertyManager *variantManager;
QtVariantPropertyManager *readOnlyManager;
@@ -108,7 +114,7 @@ class DesignWidget : public QWidget
QMap<QtProperty *, QString> propertyToId;
QMap<QString, QtProperty *> idToProperty;
- std::vector<QModelIndex> history;
+ std::vector<std::pair<int, QModelIndex>> history;
int history_index;
bool history_ignore;
@@ -124,6 +130,7 @@ class DesignWidget : public QWidget
QString currentSearch;
QList<QModelIndex> currentSearchIndexes;
int currentIndex;
+ int currentIndexTab;
};
NEXTPNR_NAMESPACE_END