warningdialog.cpp
author insilmaril
Fri, 08 Dec 2006 20:18:58 +0000
changeset 409 81ffad43d53f
parent 388 3a58c9ef4a18
child 414 bc23a0157a39
permissions -rw-r--r--
1.6.1 Port to QGraphics
     1 #include "warningdialog.h"
     2 
     3 extern QString iconPath;
     4 
     5 WarningDialog::WarningDialog(QWidget* parent):QDialog (parent)
     6 {
     7     ui.setupUi(this);
     8 	//FIXME proper icon needed
     9 	ui.okButton->setText(tr("Proceed"));
    10 	/*
    11 	ui.warningSign->setPixmap (QPixmap(iconPath + "icons/vym.png"));
    12 	ui.showAgainBox->setText (tr("Show this message again"));
    13 	*/
    14 	useShowAgain=false;
    15 	ui.showAgainBox->hide();
    16 }
    17 
    18 void WarningDialog::showCancelButton (bool b)
    19 {
    20 	if (b)
    21 	{
    22 		ui.cancelButton->show();
    23 		ui.cancelButton->setText(tr("Cancel"));
    24 	} else
    25 		ui.cancelButton->hide();
    26 }
    27 
    28 void WarningDialog::setShowAgainName (const QString &s)
    29 {
    30 /*
    31 	showAgainName=s;
    32 	useShowAgain=true;
    33 	ui.showAgainBox->show();
    34 */	
    35 }
    36 
    37 void WarningDialog::setText (const QString &s)
    38 {
    39 	ui.warningTE->setText(s);
    40 }
    41 
    42 void WarningDialog::setCaption(const QString &s)
    43 {
    44 	setCaption("VYM - "+s);
    45 }