Unity Action API
unity-preview-action.h
1 /* This file is part of unity-action-api
2  * Copyright 2013 Canonical Ltd.
3  *
4  * unity-action-api is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * unity-action-api is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranties of
10  * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef UNITY_ACTION_PREVIEW_ACTION
18 #define UNITY_ACTION_PREVIEW_ACTION
19 
20 namespace unity {
21 namespace action {
22  class PreviewAction;
23  class PreviewParameter;
24 }
25 }
26 
27 #include "unity-action.h"
28 
29 class Q_DECL_EXPORT unity::action::PreviewAction : public unity::action::Action
30 {
31  Q_OBJECT
32  Q_DISABLE_COPY(PreviewAction)
33  Q_PROPERTY(QString commitLabel
34  READ commitLabel
35  WRITE setCommitLabel
36  NOTIFY commitLabelChanged)
37 
38 public:
39 
40  explicit PreviewAction(QObject *parent = 0);
41  virtual ~PreviewAction();
42 
43  QString commitLabel() const;
44  void setCommitLabel(const QString &value);
45 
46  QList<PreviewParameter *> parameters();
47  Q_INVOKABLE void addParameter(unity::action::PreviewParameter *parameter);
48  Q_INVOKABLE void removeParameter(unity::action::PreviewParameter *parameter);
49 
50 signals:
51  void started();
52  void cancelled();
53  void resetted();
54 
55  void commitLabelChanged(const QString &value);
56 
57  void parametersChanged();
58 
59 private:
60  class Private;
61  QScopedPointer<Private> d;
62 };
63 
64 #endif
QList< PreviewParameter * > parameters()
Definition: unity-preview-action.cpp:161
PreviewAction(QObject *parent=0)
Definition: unity-preview-action.cpp:132
Definition: unity-action-context.h:20
Q_INVOKABLE void removeParameter(unity::action::PreviewParameter *parameter)
Definition: unity-preview-action.cpp:205
Definition: unity-preview-parameter.h:28
Q_INVOKABLE void addParameter(unity::action::PreviewParameter *parameter)
Definition: unity-preview-action.cpp:181
previewable action
Definition: unity-preview-action.h:29
The main action class.
Definition: unity-action.h:30