warningdialog.cpp
changeset 405 a4532e5c2ce3
child 414 bc23a0157a39
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/warningdialog.cpp	Mon Nov 20 12:12:05 2006 +0000
     1.3 @@ -0,0 +1,45 @@
     1.4 +#include "warningdialog.h"
     1.5 +
     1.6 +extern QString iconPath;
     1.7 +
     1.8 +WarningDialog::WarningDialog(QWidget* parent):QDialog (parent)
     1.9 +{
    1.10 +    ui.setupUi(this);
    1.11 +	//FIXME proper icon needed
    1.12 +	ui.okButton->setText(tr("Proceed"));
    1.13 +	/*
    1.14 +	ui.warningSign->setPixmap (QPixmap(iconPath + "icons/vym.png"));
    1.15 +	ui.showAgainBox->setText (tr("Show this message again"));
    1.16 +	*/
    1.17 +	useShowAgain=false;
    1.18 +	ui.showAgainBox->hide();
    1.19 +}
    1.20 +
    1.21 +void WarningDialog::showCancelButton (bool b)
    1.22 +{
    1.23 +	if (b)
    1.24 +	{
    1.25 +		ui.cancelButton->show();
    1.26 +		ui.cancelButton->setText(tr("Cancel"));
    1.27 +	} else
    1.28 +		ui.cancelButton->hide();
    1.29 +}
    1.30 +
    1.31 +void WarningDialog::setShowAgainName (const QString &s)
    1.32 +{
    1.33 +/*
    1.34 +	showAgainName=s;
    1.35 +	useShowAgain=true;
    1.36 +	ui.showAgainBox->show();
    1.37 +*/	
    1.38 +}
    1.39 +
    1.40 +void WarningDialog::setText (const QString &s)
    1.41 +{
    1.42 +	ui.warningTE->setText(s);
    1.43 +}
    1.44 +
    1.45 +void WarningDialog::setCaption(const QString &s)
    1.46 +{
    1.47 +	setCaption("VYM - "+s);
    1.48 +}