~ken-vandine/signon-ui/qtquick2-desktop_file_hint

« back to all changes in this revision

Viewing changes to src/browser-process/dialog.h

  • Committer: Alberto Mardegan
  • Date: 2013-04-19 11:13:03 UTC
  • Revision ID: alberto.mardegan@canonical.com-20130419111303-fpbeztiw0xkw65ye
Optionally use WebKit2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of signon-ui
 
3
 *
 
4
 * Copyright (C) 2011 Canonical Ltd.
 
5
 *
 
6
 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
 
7
 *
 
8
 * This program is free software: you can redistribute it and/or modify it
 
9
 * under the terms of the GNU General Public License version 3, as published
 
10
 * by the Free Software Foundation.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
14
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
15
 * PURPOSE.  See the GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License along
 
18
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
 */
 
20
 
 
21
#ifndef SIGNON_UI_DIALOG_H
 
22
#define SIGNON_UI_DIALOG_H
 
23
 
 
24
#include <QObject>
 
25
#include <QQuickView>
 
26
 
 
27
namespace SignOnUi {
 
28
 
 
29
class Dialog: public QQuickView
 
30
{
 
31
    Q_OBJECT
 
32
 
 
33
public:
 
34
    enum DialogCode {
 
35
        Rejected = 0,
 
36
        Accepted,
 
37
    };
 
38
    explicit Dialog(QWindow *parent = 0);
 
39
    ~Dialog();
 
40
 
 
41
public Q_SLOTS:
 
42
    void accept();
 
43
    void reject();
 
44
    void done(int result);
 
45
 
 
46
Q_SIGNALS:
 
47
    void finished(int result);
 
48
 
 
49
protected:
 
50
    bool event(QEvent *e);
 
51
};
 
52
 
 
53
} // namespace
 
54
 
 
55
#endif // SIGNON_UI_DIALOG_H
 
56