1
/***************************************************************************
2
* Copyright (C) 2007 by *
3
* Philipp Maihart, Last.fm Ltd <phil@last.fm> *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
24
#include "UnicornDllExportMacro.h"
26
#include <QMessageBox>
29
class UNICORN_DLLEXPORT LastMessageBox : public QMessageBox
34
LastMessageBox( QWidget* parent = 0 );
35
LastMessageBox( Icon icon,
38
StandardButtons buttons = NoButton,
40
Qt::WindowFlags f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint,
41
QStringList buttonTexts = QStringList() );
43
virtual void setText ( const QString& text );
44
virtual void setWindowTitle ( const QString& title );
46
//FIXME wtf? Hardcoded?
47
virtual const QSize sizeHint() { return QSize( 480, 153 ); }
49
static QMessageBox::StandardButton
50
critical( const QString& title,
52
StandardButtons buttons = Ok,
53
StandardButton defaultButton = NoButton,
54
QStringList buttonTexts = QStringList(),
55
QWidget* parent = 0 );
57
static QMessageBox::StandardButton
58
information( const QString& title,
60
StandardButtons buttons = Ok,
61
StandardButton defaultButton = NoButton,
62
QStringList buttonTexts = QStringList(),
63
QWidget* parent = 0 );
65
static QMessageBox::StandardButton
66
question( const QString& title,
68
StandardButtons buttons = Ok,
69
StandardButton defaultButton = NoButton,
70
QStringList buttonTexts = QStringList(),
71
QWidget* parent = 0 );
73
static QMessageBox::StandardButton
74
warning( const QString& title,
76
StandardButtons buttons = Ok,
77
StandardButton defaultButton = NoButton,
78
QStringList buttonTexts = QStringList(),
79
QWidget* parent = 0 );
84
QMessageBox::StandardButton
85
showMacMessageBox(QWidget *parent, QMessageBox::Icon icon,
86
const QString& title, const QString& text,
87
QMessageBox::StandardButtons buttons,
88
QMessageBox::StandardButton defaultButton,
89
QStringList buttonTexts = QStringList()
93
#endif // MESSAGEBOX_H
1
/***************************************************************************
2
* Copyright (C) 2007 by *
3
* Philipp Maihart, Last.fm Ltd <phil@last.fm> *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
24
#include "UnicornDllExportMacro.h"
26
#include <QMessageBox>
29
class UNICORN_DLLEXPORT LastMessageBox : public QMessageBox
34
LastMessageBox( QWidget* parent = 0 );
35
LastMessageBox( Icon icon,
38
StandardButtons buttons = NoButton,
40
Qt::WindowFlags f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint,
41
QStringList buttonTexts = QStringList() );
43
virtual void setText ( const QString& text );
44
virtual void setWindowTitle ( const QString& title );
46
virtual const QSize sizeHint();
48
static QMessageBox::StandardButton
49
critical( const QString& title,
51
StandardButtons buttons = Ok,
52
StandardButton defaultButton = NoButton,
53
QStringList buttonTexts = QStringList(),
54
QWidget* parent = 0 );
57
say( const QString & text )
59
information( "", text );
62
static QMessageBox::StandardButton
63
information( const QString& title,
65
StandardButtons buttons = Ok,
66
StandardButton defaultButton = NoButton,
67
QStringList buttonTexts = QStringList(),
68
QWidget* parent = 0 );
70
static QMessageBox::StandardButton
71
question( const QString& title,
73
StandardButtons buttons = Ok,
74
StandardButton defaultButton = NoButton,
75
QStringList buttonTexts = QStringList(),
76
QWidget* parent = 0 );
78
static QMessageBox::StandardButton
79
warning( const QString& title,
81
StandardButtons buttons = Ok,
82
StandardButton defaultButton = NoButton,
83
QStringList buttonTexts = QStringList(),
84
QWidget* parent = 0 );
89
QMessageBox::StandardButton
90
showMacMessageBox(QWidget *parent, QMessageBox::Icon icon,
91
const QString& title, const QString& text,
92
QMessageBox::StandardButtons buttons,
93
QMessageBox::StandardButton defaultButton,
94
QStringList buttonTexts = QStringList()
98
#endif // MESSAGEBOX_H