1
//MountManager - the program for easy mounting of storage devices in Linux
2
//Copyright (C) 2007-2008 Tikhonov Sergey
4
//This file is part of MountManager Gui
6
//This program is free software; you can redistribute it and/or
7
//modify it under the terms of the GNU General Public License
8
//as published by the Free Software Foundation; either version 2
9
//of the License, or (at your option) any later version.
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.
16
//You should have received a copy of the GNU General Public License
17
//along with this program; if not, write to the Free Software
18
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
#include "infobutton.h"
21
#include "popupwindow.h"
23
InfoButton::InfoButton(PopupWindow *popup,const QString& text, const QString& header) {
24
setIcon(QIcon(QString(ICONS_PATH) + "info.png"));
29
connect(this,SIGNAL(clicked()),this,SLOT(setPopupData()));
32
void InfoButton::setPopupText(const QString& text) {
36
void InfoButton::setPopupHeaderText(const QString& header) {
40
void InfoButton::setPopupData() {
41
if (popupText.isEmpty())
42
popupWindow->setText(tr("Cannot find documentation for it. Try to install new version of MountManager or report about it to developer."));
44
popupWindow->setText(popupText);
45
if (popupHeader.isEmpty())
46
popupWindow->setHeaderText(tr("Popup window"));
48
popupWindow->setHeaderText(popupHeader);
49
popupWindow->showPopup();