Qt 4.8
qmltoolbar.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtDeclarative module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QMLTOOLBAR_H
43 #define QMLTOOLBAR_H
44 
45 #include <QtGui/QToolBar>
46 #include <QtGui/QIcon>
47 
48 #include "../qmlinspectorconstants.h"
49 
51 
52 namespace QmlJSDebugger {
53 
54 class ToolBarColorBox;
55 
56 class QmlToolBar : public QToolBar
57 {
58  Q_OBJECT
59 
60 public:
61  explicit QmlToolBar(QWidget *parent = 0);
62  ~QmlToolBar();
63 
64 public slots:
65  void setDesignModeBehavior(bool inDesignMode);
66  void setColorBoxColor(const QColor &color);
67  void activateColorPicker();
68  void activateSelectTool();
70  void activateZoom();
71 
72  void setAnimationSpeed(qreal slowDownFactor);
73  void setAnimationPaused(bool paused);
74 
75 signals:
76  void animationSpeedChanged(qreal factor);
77  void animationPausedChanged(bool paused);
78 
79  void designModeBehaviorChanged(bool inDesignMode);
80  void colorPickerSelected();
81  void selectToolSelected();
83  void zoomToolSelected();
84 
87 
88 private slots:
89  void setDesignModeBehaviorOnClick(bool inDesignMode);
90  void activatePlayOnClick();
94  void activateZoomOnClick();
95 
96  void activateFromQml();
97  void activateToQml();
98 
99  void changeAnimationSpeed();
100 
101  void updatePlayAction();
102 
103 private:
104  class Ui {
105  public:
117 
119  };
120 
122  bool m_paused;
124 
126 
127  Ui *ui;
128 };
129 
130 }
131 
132 #endif // QMLTOOLBAR_H
void animationSpeedChanged(qreal factor)
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
double qreal
Definition: qglobal.h:1193
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
void setDesignModeBehavior(bool inDesignMode)
Definition: qmltoolbar.cpp:222
The QActionGroup class groups actions together.
Definition: qactiongroup.h:57
#define QT_FORWARD_DECLARE_CLASS(name)
Definition: qglobal.h:95
void setDesignModeBehaviorOnClick(bool inDesignMode)
Definition: qmltoolbar.cpp:230
The QToolBar class provides a movable panel that contains a set of controls.
Definition: qtoolbar.h:62
Constants::DesignTool m_activeTool
Definition: qmltoolbar.h:125
#define Q_OBJECT
Definition: qobjectdefs.h:157
void setAnimationPaused(bool paused)
Definition: qmltoolbar.cpp:206
void setColorBoxColor(const QColor &color)
Definition: qmltoolbar.cpp:243
void animationPausedChanged(bool paused)
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
void setAnimationSpeed(qreal slowDownFactor)
Definition: qmltoolbar.cpp:188
#define slots
Definition: qobjectdefs.h:68
#define signals
Definition: qobjectdefs.h:69
ToolBarColorBox * colorBox
Definition: qmltoolbar.h:116
QActionGroup * playSpeedMenuActions
Definition: qmltoolbar.h:118
void designModeBehaviorChanged(bool inDesignMode)
QmlToolBar(QWidget *parent=0)
Definition: qmltoolbar.cpp:54
The QAction class provides an abstract user interface action that can be inserted into widgets...
Definition: qaction.h:64
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60