Lomiri Action API
lomiri-preview-action.h
1/* This file is part of lomiri-action-api
2 * Copyright 2013 Canonical Ltd.
3 *
4 * lomiri-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 * lomiri-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 LOMIRI_ACTION_PREVIEW_ACTION
18#define LOMIRI_ACTION_PREVIEW_ACTION
19
20namespace lomiri {
21namespace action {
22 class PreviewAction;
23 class PreviewParameter;
24}
25}
26
27#include "lomiri-action.h"
28
29class Q_DECL_EXPORT lomiri::action::PreviewAction : public lomiri::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
38public:
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(lomiri::action::PreviewParameter *parameter);
48 Q_INVOKABLE void removeParameter(lomiri::action::PreviewParameter *parameter);
49
50signals:
51 void started();
52 void cancelled();
53 void resetted();
54
55 void commitLabelChanged(const QString &value);
56
58
59private:
60 class Private;
61 QScopedPointer<Private> d;
62};
63
64#endif
The main action class.
Definition: lomiri-action.h:31
previewable action
Definition: lomiri-preview-action.h:30
Q_INVOKABLE void removeParameter(lomiri::action::PreviewParameter *parameter)
Definition: lomiri-preview-action.cpp:205
QList< PreviewParameter * > parameters()
Definition: lomiri-preview-action.cpp:161
QString commitLabel
Definition: lomiri-preview-action.h:36
PreviewAction(QObject *parent=0)
Definition: lomiri-preview-action.cpp:132
Q_INVOKABLE void addParameter(lomiri::action::PreviewParameter *parameter)
Definition: lomiri-preview-action.cpp:181
Definition: lomiri-preview-parameter.h:29