22 #ifndef QUICKACCESSBAR_H 23 #define QUICKACCESSBAR_H 27 #include <tulip/CaptionItem.h> 28 #include <tulip/tulipconf.h> 31 class QAbstractButton;
40 class GlGraphRenderingParameters;
41 class GlGraphInputData;
43 class TulipItemDelegate;
46 class PropertyInterface;
49 class TLP_QT_SCOPE QuickAccessBar :
public QWidget {
55 GlMainView* _mainView;
56 GlScene* scene()
const;
57 GlGraphInputData* inputData()
const;
58 GlGraphRenderingParameters* renderingParameters()
const;
61 QuickAccessBar(QWidget *parent=0);
64 virtual void reset()=0;
67 void settingsChanged();
70 class TLP_QT_SCOPE QuickAccessBarImpl :
public QuickAccessBar {
72 Ui::QuickAccessBar* _ui;
73 QGraphicsItem *_quickAccessBarItem;
75 TulipItemDelegate* delegate;
79 bool _captionsInitialized;
80 CaptionItem *_captions[4];
85 enum QuickAccessButton {NODESCOLORCAPTION=0x1,NODESSIZECAPTION=0x2,EDGESCOLORCAPTION=0x4,EDGESIZECAPTION=0x8,
86 SCREENSHOT=0x10,BACKGROUNDCOLOR=0x20,NODECOLOR=0x40,EDGECOLOR=0x80,NODEBORDERCOLOR=0x100,
87 EDGEBORDERCOLOR=0x200,LABELCOLOR=0x400,COLORINTERPOLATION=0x800,SIZEINTERPOLATION=0x1000,
88 SHOWEDGES=0x2000,SHOWLABELS=0x4000,LABELSSCALED=0x8000,
89 NODESHAPE=0x10000,EDGESHAPE=0x20000,NODESIZE=0x40000,EDGESIZE=0x80000,
90 NODELABELPOSITION=0x100000,SELECTFONT=0x200000, SHOWNODES=0x400000,
93 Q_DECLARE_FLAGS(QuickAccessButtons,QuickAccessButton)
95 explicit QuickAccessBarImpl(QGraphicsItem *quickAccessBarItem=NULL,QuickAccessButtons button=ALLBUTTONS,QWidget *parent = 0);
96 virtual ~QuickAccessBarImpl();
98 QPushButton* showEdgesButton();
99 QPushButton* showNodesButton();
100 ColorButton* backgroundColorButton();
101 QPushButton* showLabelsButton();
102 QPushButton* showLabelScaled();
103 QPushButton* showColorInterpolation();
106 void addButtonAtEnd(QAbstractButton* button);
107 void addButtonsAtEnd(const QVector<QAbstractButton*>& buttonvect);
109 void updateFontButtonStyle();
110 void showHideCaption(CaptionItem::CaptionType captionType);
111 void setAllValues(
unsigned int eltType, PropertyInterface* prop);
112 void setAllColorValues(
unsigned int eltType, ColorProperty* prop,
118 virtual
void setBackgroundColor(const QColor&);
119 virtual
void setColorInterpolation(
bool);
120 void setLabelColor(const QColor&);
121 void setNodeColor(const QColor&);
122 void setNodeBorderColor(const QColor&);
123 void setEdgeColor(const QColor&);
124 void setEdgeBorderColor(const QColor&);
129 void setSizeInterpolation(
bool);
130 void showHideNodesColorCaption();
131 void showHideNodesSizeCaption();
132 void showHideEdgesColorCaption();
133 void showHideEdgesSizeCaption();
135 virtual
void setEdgesVisible(
bool);
136 virtual
void setNodesVisible(
bool);
137 virtual
void setLabelsVisible(
bool);
138 virtual
void setLabelsScaled(
bool);
140 void setNodeLabelPosition();
143 Q_DECLARE_OPERATORS_FOR_FLAGS(
tlp::QuickAccessBarImpl::QuickAccessButtons)
144 #endif // QUICKACCESSBAR_H An abstract view that displays a GlMainWidget as its central widget.