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