~ubuntu-branches/ubuntu/lucid/lastfm/lucid

« back to all changes in this revision

Viewing changes to src/libLastFmTools/confirmdialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2007-12-31 09:49:54 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20071231094954-ix1amvcsj9pk61ya
Tags: 1:1.4.1.57486.dfsg-1ubuntu1
* Merge from Debian unstable (LP: #180254), remaining changes:
  - debian/rules;
    - Added dh_icons
  - Modify Maintainer value to match Debian-Maintainer-Field Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2005 - 2007 by                                          *
3
 
 *      Christian Muehlhaeuser, Last.fm Ltd <chris@last.fm>                *
4
 
 *      Erik Jaelevik, Last.fm Ltd <erik@last.fm>                          *
5
 
 *                                                                         *
6
 
 *   This program is free software; you can redistribute it and/or modify  *
7
 
 *   it under the terms of the GNU General Public License as published by  *
8
 
 *   the Free Software Foundation; either version 2 of the License, or     *
9
 
 *   (at your option) any later version.                                   *
10
 
 *                                                                         *
11
 
 *   This program is distributed in the hope that it will be useful,       *
12
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14
 
 *   GNU General Public License for more details.                          *
15
 
 *                                                                         *
16
 
 *   You should have received a copy of the GNU General Public License     *
17
 
 *   along with this program; if not, write to the                         *
18
 
 *   Free Software Foundation, Inc.,                                       *
19
 
 *   51 Franklin Steet, Fifth Floor, Boston, MA  02111-1307, USA.          *
20
 
 ***************************************************************************/
21
 
 
22
 
#ifndef CONFIRMDIALOG_H
23
 
#define CONFIRMDIALOG_H
24
 
 
25
 
#include "lastfmtools_common.h"
26
 
#include <QPixmap>
27
 
#include <QDialog>
28
 
 
29
 
// Qt 4.3.x UIC adds some wierd defines that fuck up our layouts! :(
30
 
#ifdef Q_OS_MAC
31
 
    #undef Q_OS_MAC
32
 
    #include "ui_confirmdialog.h"
33
 
    #define Q_OS_MAC
34
 
#else
35
 
    #include "ui_confirmdialog.h"
36
 
#endif
37
 
 
38
 
class MCEXP ConfirmDialog : public QDialog
39
 
{
40
 
    Q_OBJECT
41
 
 
42
 
    public:
43
 
 
44
 
        enum Operation
45
 
        {
46
 
            Tag,
47
 
            Recommend,
48
 
            Love,
49
 
            Ban,
50
 
            Quit,
51
 
            AddToMyPlaylist
52
 
                        #ifdef Q_WS_MAC
53
 
                                ,
54
 
                                DockRestart
55
 
                        #endif
56
 
        };
57
 
 
58
 
        ConfirmDialog( Operation op,
59
 
                       QString text,
60
 
                       QWidget *parent = 0 );
61
 
            
62
 
        ~ConfirmDialog();
63
 
 
64
 
    public slots:
65
 
        void setIcon( const QPixmap& icon );
66
 
        void setIcon( const QString& file );
67
 
        void setText( const QString& text );
68
 
 
69
 
        bool isDontAskChecked();
70
 
 
71
 
        int exec();
72
 
        virtual void accept();
73
 
        virtual void reject();
74
 
 
75
 
    private:
76
 
        Ui::ConfirmDialog ui;
77
 
 
78
 
        Operation m_op;
79
 
        QString m_opString;
80
 
 
81
 
        void saveCheckState();
82
 
};
83
 
 
84
 
#endif // CONFIRMDIALOG_H