ZIMA CAD Parts
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
navbarsplitter.h
Go to the documentation of this file.
1 #ifndef NAVBARSPLITTER_H
2 #define NAVBARSPLITTER_H
3 
4 #include <QSplitter>
5 
6 class NavBarSplitter : public QSplitter
7 {
8  Q_OBJECT
9  //NOTE: this property somehow causes insertWidget() to work incorrectly
10  //Q_PROPERTY(int increment READ increment WRITE setIncrement)
11 
12 public:
13  explicit NavBarSplitter(QWidget *parent = 0);
14  explicit NavBarSplitter(Qt::Orientation orientation, QWidget * parent = 0);
15 
16  int increment() const;
17  void setIncrement(int inc);
18 
19 protected:
20  QSplitterHandle *createHandle();
21 };
22 
23 class NavBarSplitterHandle : public QSplitterHandle
24 {
25  Q_OBJECT
26 
27 public:
28  explicit NavBarSplitterHandle(Qt::Orientation orientation, QSplitter *parent);
29 
30  int increment;
31 
32 protected:
33  void mousePressEvent(QMouseEvent *e);
34  void mouseMoveEvent(QMouseEvent *e);
35 
36 private:
37  int mouseOffset;
38  bool pressed;
39 };
40 
41 #endif // NAVBARSPLITTER_H
void mousePressEvent(QMouseEvent *e)
Definition: navbarsplitter.cpp:46
NavBarSplitter(QWidget *parent=0)
Definition: navbarsplitter.cpp:17
Splitter, used inside navigation bar.
Definition: navbarsplitter.h:6
int increment
Definition: navbarsplitter.h:30
void mouseMoveEvent(QMouseEvent *e)
Definition: navbarsplitter.cpp:56
QSplitterHandle * createHandle()
Definition: navbarsplitter.cpp:32
Definition: navbarsplitter.h:23
int increment() const
Definition: navbarsplitter.cpp:22
void setIncrement(int inc)
Definition: navbarsplitter.cpp:27
NavBarSplitterHandle(Qt::Orientation orientation, QSplitter *parent)
Definition: navbarsplitter.cpp:38