22 #ifndef QUICKACCESSBAR_H 23 #define QUICKACCESSBAR_H 27 #include <tulip/CaptionItem.h> 28 #include <tulip/tulipconf.h> 31 class QAbstractButton;
39 class GlGraphRenderingParameters;
40 class GlGraphInputData;
42 class TulipItemDelegate;
45 class PropertyInterface;
47 class TLP_QT_SCOPE QuickAccessBar :
public QWidget {
53 GlMainView* _mainView;
54 GlScene* scene()
const;
55 GlGraphInputData* inputData()
const;
56 GlGraphRenderingParameters* renderingParameters()
const;
59 QuickAccessBar(QWidget *parent=0);
62 virtual void reset()=0;
65 void settingsChanged();
68 class TLP_QT_SCOPE QuickAccessBarImpl :
public QuickAccessBar {
70 Ui::QuickAccessBar* _ui;
71 QGraphicsItem *_quickAccessBarItem;
73 TulipItemDelegate* delegate;
77 bool _captionsInitialized;
78 CaptionItem *_captions[4];
83 enum QuickAccessButton {NODESCOLORCAPTION=0x1,NODESSIZECAPTION=0x2,EDGESCOLORCAPTION=0x4,EDGESIZECAPTION=0x8,
84 SCREENSHOT=0x10,BACKGROUNDCOLOR=0x20,NODECOLOR=0x40,EDGECOLOR=0x80,NODEBORDERCOLOR=0x100,
85 EDGEBORDERCOLOR=0x200,LABELCOLOR=0x400,COLORINTERPOLATION=0x800,SIZEINTERPOLATION=0x1000,
86 SHOWEDGES=0x2000,SHOWLABELS=0x4000,LABELSSCALED=0x8000,
87 NODESHAPE=0x10000,EDGESHAPE=0x20000,NODESIZE=0x40000,EDGESIZE=0x80000,
88 NODELABELPOSITION=0x100000,SELECTFONT=0x200000,
91 Q_DECLARE_FLAGS(QuickAccessButtons,QuickAccessButton)
93 explicit QuickAccessBarImpl(QGraphicsItem *quickAccessBarItem=NULL,QuickAccessButtons button=ALLBUTTONS,QWidget *parent = 0);
94 virtual ~QuickAccessBarImpl();
97 void addButtonAtEnd(QAbstractButton* button);
98 void addButtonsAtEnd(const QVector<QAbstractButton*>& buttonvect);
100 void updateFontButtonStyle();
101 void showHideCaption(CaptionItem::CaptionType captionType);
102 void setAllValues(
unsigned int eltType, PropertyInterface* prop);
103 void setAllColorValues(
unsigned int eltType, ColorProperty* prop,
109 void setBackgroundColor(const QColor&);
110 void setColorInterpolation(
bool);
111 void setLabelColor(const QColor&);
112 void setNodeColor(const QColor&);
113 void setNodeBorderColor(const QColor&);
114 void setEdgeColor(const QColor&);
115 void setEdgeBorderColor(const QColor&);
120 void setSizeInterpolation(
bool);
121 void showHideNodesColorCaption();
122 void showHideNodesSizeCaption();
123 void showHideEdgesColorCaption();
124 void showHideEdgesSizeCaption();
126 void setEdgesVisible(
bool);
127 void setLabelsVisible(
bool);
128 void setLabelsScaled(
bool);
130 void setNodeLabelPosition();
133 Q_DECLARE_OPERATORS_FOR_FLAGS(
tlp::QuickAccessBarImpl::QuickAccessButtons)
134 #endif // QUICKACCESSBAR_H An abstract view that displays a GlMainWidget as its central widget.