1
/***************************************************************************
2
* Copyright (C) 2010 Davide Bettio <davide.bettio@kdemail.net> *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
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. *
14
* You should have received a copy of the GNU General Public License *
15
* 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
***************************************************************************/
20
#include "browsermessagebox.h"
22
#include <QGraphicsLinearLayout>
24
#include <Plasma/Label>
25
#include <Plasma/PushButton>
26
#include <Plasma/WebView>
28
BrowserMessageBox::BrowserMessageBox(QGraphicsWidget *parent, QString message)
29
: QGraphicsWidget(parent)
31
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(this);
32
layout->setOrientation(Qt::Horizontal);
34
Plasma::Label *messageLabel = new Plasma::Label(this);
35
messageLabel->setText(message);
36
layout->addItem(messageLabel);
38
m_okButton = new Plasma::PushButton(this);
39
m_okButton->setText(i18n("OK"));
40
connect(m_okButton, SIGNAL(clicked()), this, SIGNAL(okClicked()));
41
layout->addItem(m_okButton);
43
m_cancelButton = new Plasma::PushButton(this);
44
m_cancelButton->setText(i18n("Cancel"));
45
connect(m_cancelButton, SIGNAL(clicked()), this, SIGNAL(cancelClicked()));
46
layout->addItem(m_cancelButton);
49
Plasma::PushButton *BrowserMessageBox::okButton()
54
Plasma::PushButton *BrowserMessageBox::cancelButton()
56
return m_cancelButton;
59
#include "browsermessagebox.moc"