# HG changeset patch # User insilmaril # Date 1149160797 0 # Node ID f5c1cdf79e6ea02dece3231869e159ffc084e7b3 # Parent bc3b807488cbec1ab3b59a519347be4bdce2e0c7 added warningdialog.ui diff -r bc3b807488cb -r f5c1cdf79e6e warningdialog.ui --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/warningdialog.ui Thu Jun 01 11:19:57 2006 +0000 @@ -0,0 +1,231 @@ + +WarningDialog + + + WarningDialog + + + + 0 + 0 + 350 + 181 + + + + VYM - Warning : Foo... + + + + unnamed + + + + layout6 + + + + unnamed + + + + warningSign + + + true + + + + + textLabel + + + textLabel + + + + + spacer6 + + + Horizontal + + + Expanding + + + + 160 + 31 + + + + + + + + spacer7 + + + Vertical + + + Expanding + + + + 21 + 20 + + + + + + layout4 + + + + unnamed + + + + spacer3 + + + Horizontal + + + Expanding + + + + 61 + 20 + + + + + + showAgainBox + + + showAgainBox + + + true + + + + + spacer4 + + + Horizontal + + + Expanding + + + + 51 + 21 + + + + + + + + spacer5 + + + Vertical + + + Expanding + + + + 21 + 20 + + + + + + layout3 + + + + unnamed + + + + spacer2 + + + Horizontal + + + Expanding + + + + 161 + 31 + + + + + + cancelButton + + + Cancel + + + + + okButton + + + Ok + + + + + + + + + okButton + clicked() + WarningDialog + accept() + + + cancelButton + clicked() + WarningDialog + reject() + + + + warningdialog.ui.h + + + bool useShowAgain; + QString showAgainName; + + + setCancelButton( bool b ) + setShowAgainName( const QString & s ) + setText( const QString & s ) + setCaption( const QString & s ) + + + init() + + + + diff -r bc3b807488cb -r f5c1cdf79e6e warningdialog.ui.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/warningdialog.ui.h Thu Jun 01 11:19:57 2006 +0000 @@ -0,0 +1,48 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you want to add, delete, or rename functions or slots, use +** Qt Designer to update this file, preserving your code. +** +** You should not define a constructor or destructor in this file. +** Instead, write your code in functions called init() and destroy(). +** These will automatically be called by the form's constructor and +** destructor. +*****************************************************************************/ + +void WarningDialog::init() +{ + warningSign->setPixmap (QPixmap("icons/vym.png")); + setCancelButton (false); + okButton->setText(tr("Proceed")); + showAgainBox->setText (tr("Show this message again")); + useShowAgain=false; + showAgainBox->hide(); +} + +void WarningDialog::setCancelButton (bool b) +{ + if (b) + { + cancelButton->show(); + cancelButton->setText(tr("Cancel")); + } else + cancelButton->hide(); +} + +void WarningDialog::setShowAgainName (const QString &s) +{ + showAgainName=s; + useShowAgain=true; + showAgainBox->show(); +} + +void WarningDialog::setText (const QString &s) +{ + textLabel->setText(s); +} + +void WarningDialog::setCaption(const QString &s) +{ + QDialog::setCaption("VYM - "+s); +}