warningdialog.cpp
author insilmaril
Mon Nov 20 12:12:05 2006 +0000 (2006-11-20)
changeset 405 a4532e5c2ce3
child 414 bc23a0157a39
permissions -rw-r--r--
historywindow moved to mainwindow. Started to get rid of Q3PtrList finally
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@388
     8
	//FIXME proper icon 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
}