graph_analysis
PropertyDialog.hpp
Go to the documentation of this file.
1 /********************************************************************************
2 ** Form generated from reading UI file 'property_dialog_gui.ui'
3 **
4 ** Created by: Qt User Interface Compiler version 4.8.6
5 **
6 ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 ********************************************************************************/
8 
9 #ifndef PROPERTYDIALOG_H
10 #define PROPERTYDIALOG_H
11 
12 #include "CustomDialog.hpp"
13 #include "../FilterManager.hpp"
14 
15 #include <vector>
16 #include <QLabel>
17 #include <QObject>
18 #include <QGridLayout>
19 #include <QCheckBox>
20 #include <QCloseEvent>
21 #include <QScrollArea>
22 #include <QMainWindow>
23 #include <QtGui/QAction>
24 #include <QtGui/QDialog>
25 #include <QtGui/QWidget>
26 #include <QtCore/QVariant>
27 #include <QtGui/QTabWidget>
28 #include <QtGui/QHeaderView>
29 #include <QtGui/QPushButton>
30 #include <QtGui/QVBoxLayout>
31 #include <QtGui/QHBoxLayout>
32 #include <QtGui/QApplication>
33 #include <QtGui/QButtonGroup>
34 #include <QtGui/QGraphicsView>
35 #include <QtGui/QStackedWidget>
36 
37 // constant panel raw width
38 #define WIDTH 306
39 // general border width (for several frames/layouts within the panel)
40 #define PADDING 7
41 // maximum no. of separators in a vertical layout out of the total 4 such vertical layouts in the 2 tabs
42 #define DEFAULT_NFRAMES 3
43 // maximum no. of push-buttons in a vertical layout out of the total 4 such vertical layouts in the 2 tabs
44 #define DEFAULT_NBUTTONS 10
45 // approximated hard-wired height (in points) accounted for a single separator (a.k.a. degenerate frame) including the border area around
46 #define DEFAULT_LINE_POINTS 15
47 // approximated hard-wired height (in points) accounted for a push-button including the border area around
48 #define DEFAULT_BUTTON_POINTS 31
49 
50 namespace graph_analysis {
51 namespace gui {
52 namespace dialogs {
53 
60 class PropertyDialog : public QObject
61 {
62  Q_OBJECT
63 public:
65  typedef std::vector<QFrame *> QFrames;
66 
73  PropertyDialog(bool dragDropIsChecked = false, bool vertexFocused = false, bool edgeFocused = false);
76 
78  bool isRunning() { return (&mDialog)->isVisible(); }
80  void setDragDrop(bool toggle)
81  {
82  mpDragDropButton->setChecked(toggle);
83  mpMoveAroundButton->setChecked(!toggle);
84  }
86  void uncheckDragDrop(bool toggle)
87  {
88  mpDragDropButton->setChecked(!toggle);
89  }
90 
92  void uncheckMoveAround(bool toggle)
93  {
94  mpMoveAroundButton->setChecked(!toggle);
95  }
96 
98  void addFrame(QVBoxLayout* verticalLayout);
100  void addFrame(QHBoxLayout* horizontalLayout);
101 
103  void setupUi(CustomDialog *Dialog, bool dragDropIsChecked = false);
105  void retranslateUi(CustomDialog *Dialog);
106 
108  void setVertexFocused(bool vertexFocused);
110  void setEdgeFocused (bool edgeFocused );
111 
113  bool getVertexFocused() { return mVertexFocused; }
115  bool getEdgeFocused () { return mEdgeFocused; }
116 
118  inline void updateStatus(const std::string& message = std::string(), int timeout = 0);
119 
121  FilterManager* getFilterManager(void) { return mpFilterManager; }
122 
123 public slots:
125  void updateMainWidget(int index);
126 
127 private:
129  CustomDialog mDialog;
131  QTabWidget *mpTabWidget;
133  QWidget *mpHorizontalLayoutWidget;
135  QWidget *mpHorizontalLayoutLayerViewWidget;
137  QHBoxLayout *mpHorizontalLayout;
139  QHBoxLayout *mpHorizontalLayoutLayer;
141  QVBoxLayout *mpVerticalLayout;
143  QVBoxLayout *mpVerticalLayoutFocus;
145  QVBoxLayout *mpVerticalLayoutLayer;
147  QVBoxLayout *mpVerticalLayoutComponentsLayer;
149  QPushButton *mpAddNodeButton;
151  QPushButton *mpRefreshButton;
153  QPushButton *mpRefreshLayerButton;
155  QPushButton *mpShuffleButton;
157  QPushButton *mpShuffleLayerButton;
159  QPushButton *mpImportButton;
161  QPushButton *mpImportLayerButton;
163  QPushButton *mpExportButton;
165  QPushButton *mpExportLayerButton;
167  QPushButton *mpResetButton;
169  QPushButton *mpResetLayerButton;
171  QPushButton *mpLayoutButton;
173  QPushButton *mpLayoutLayerButton;
175  QPushButton *mpDragDropButton;
177  QPushButton *mpMoveAroundButton;
179  QPushButton *mpRenameNodeButton;
181  QPushButton *mpAddFeatureButton;
183  QPushButton *mpRenameFeatureButton;
185  QPushButton *mpRemoveFeatureButton;
187  QPushButton *mpRemoveFeaturesButton;
189  QPushButton *mpRemoveNodeButton;
191  QPushButton *mpRenameEdgeButton;
193  QPushButton *mpRemoveEdgeButton;
195  QPushButton *mpSwapFeaturesButton;
197  QWidget *mpLayersFilters;
199  QVBoxLayout *mpLayersFiltersLayout;
201  QWidget *mpCustomFilters;
203  QVBoxLayout *mpCustomFiltersLayout;
205  QLabel *mpLayersLabel;
207  QPushButton *mpToggleFeatureLayerButton;
209  QPushButton *mpToggleClusterLayerButton;
211  QLabel *mpFiltersLabel;
213  QWidget *mpFiltersBox;
215  QScrollArea *mpCheckBoxArea;
217  QWidget *mpCheckBoxColumn;
219  FilterManager *mpFilterManager;
221  QWidget *mpFilterButtonsWidget;
223  QHBoxLayout *mpFilterButtonsWidgetLayout;
225  QPushButton *mpAddFilterButton;
227  QPushButton *mpRenameFilterButton;
229  QPushButton *mpSwapFiltersButton;
231  QPushButton *mpRemoveFilterButton;
233  QPushButton *mpRemoveFiltersButton;
235  QFrames mFrames;
237  bool mVertexFocused;
239  bool mEdgeFocused;
241  int mHeight;
242 };
243 
244 } // end namespace dialogs
245 } // end namespace gui
246 } // end namespace graph_analysis
247 
248 #endif // PROPERTYDIALOG_H
widget to manage all graphical custom regexp filter items in a common scene under behavioral restrict...
Definition: FilterManager.hpp:21
dockable multi-tab command panel for the entire GUI
Definition: PropertyDialog.hpp:60
void updateMainWidget(int index)
switches the central widget to the widget of the given index: 0 for the ComponentEditorWidget; 1 for ...
Definition: PropertyDialog.cpp:67
void setVertexFocused(bool vertexFocused)
setter method for the node-being-focused boolean witness
Definition: PropertyDialog.cpp:40
void uncheckDragDrop(bool toggle)
releases the mpDragDropButton
Definition: PropertyDialog.hpp:86
FilterManager * getFilterManager(void)
getter method for the filters manager member field
Definition: PropertyDialog.hpp:121
void uncheckMoveAround(bool toggle)
releases the mpMoveAroundButton
Definition: PropertyDialog.hpp:92
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
Specialized QWidget for the properties/commnand panel.
Definition: CustomDialog.hpp:16
bool getEdgeFocused()
getter method for the edge-being-focused boolean witness
Definition: PropertyDialog.hpp:115
void addFrame(QVBoxLayout *verticalLayout)
adds a horizontal separator
Definition: PropertyDialog.cpp:26
bool isRunning()
getter method for retrieving running status; returns true when the main panel is still in the scene; ...
Definition: PropertyDialog.hpp:78
~PropertyDialog()
destructor
Definition: PropertyDialog.cpp:22
void updateStatus(const std::string &message=std::string(), int timeout=0)
updates the temporary text currently being displayed on the Status Bar in the main viewWidget ...
Definition: PropertyDialog.cpp:71
void setupUi(CustomDialog *Dialog, bool dragDropIsChecked=false)
sets up all GUI components to the provided Dialog instance
Definition: PropertyDialog.cpp:76
PropertyDialog(bool dragDropIsChecked=false, bool vertexFocused=false, bool edgeFocused=false)
constructor
Definition: PropertyDialog.cpp:13
void retranslateUi(CustomDialog *Dialog)
attributes meaningful titles to be displayed for all GUI components (e.g. buttons labels) ...
Definition: PropertyDialog.cpp:590
bool getVertexFocused()
getter method for the node-being-focused boolean witness
Definition: PropertyDialog.hpp:113
void setEdgeFocused(bool edgeFocused)
setter method for the edge-being-focused boolean witness
Definition: PropertyDialog.cpp:56
std::vector< QFrame * > QFrames
keeps track of both vertical and horizontal separators in the scene
Definition: PropertyDialog.hpp:65
void setDragDrop(bool toggle)
setter method for drag-n-drop button boolean state - used by the viewWidget to sync the drag-n-drop m...
Definition: PropertyDialog.hpp:80