~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/desktop/shell/klistconfirmationdialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
 
3
 *
 
4
 *   This program is free software; you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU General Public License version 2,
 
6
 *   or (at your option) any later version, as published by the Free
 
7
 *   Software Foundation
 
8
 *
 
9
 *   This program is distributed in the hope that it will be useful,
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 *   GNU General Public License for more details
 
13
 *
 
14
 *   You should have received a copy of the GNU General Public
 
15
 *   License along with this program; if not, write to the
 
16
 *   Free Software Foundation, Inc.,
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
class KListConfirmationDialogPrivate;
 
21
 
 
22
#include <QVariant>
 
23
#include <QList>
 
24
#include <QDialog>
 
25
 
 
26
#include <KIcon>
 
27
 
 
28
/**
 
29
 *
 
30
 */
 
31
class KListConfirmationDialog: public QDialog {
 
32
    Q_OBJECT
 
33
 
 
34
public:
 
35
    KListConfirmationDialog(
 
36
            const QString & title = QString(),
 
37
            const QString & message = QString(),
 
38
            const QString & confirm = QString(),
 
39
            const QString & cancel = QString(),
 
40
            QWidget * parent = 0, Qt::WindowFlags f = 0);
 
41
    virtual ~KListConfirmationDialog();
 
42
 
 
43
    void addItem(const KIcon & icon, const QString & title,
 
44
            const QString & description, const QVariant & data, bool preselect = false);
 
45
 
 
46
 
 
47
    void exec();
 
48
 
 
49
protected:
 
50
    void showEvent(QShowEvent * event);
 
51
 
 
52
protected Q_SLOTS:
 
53
    void confirm();
 
54
    void cancel();
 
55
 
 
56
Q_SIGNALS:
 
57
    void selected(QList < QVariant > items);
 
58
 
 
59
private:
 
60
    void show();
 
61
 
 
62
    class KListConfirmationDialogPrivate * const d;
 
63
};