# 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 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>WarningDialog</class> +<widget class="QDialog"> + <property name="name"> + <cstring>WarningDialog</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>350</width> + <height>181</height> + </rect> + </property> + <property name="caption"> + <string>VYM - Warning : Foo...</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout6</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>warningSign</cstring> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel</cstring> + </property> + <property name="text"> + <string>textLabel</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer6</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>160</width> + <height>31</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <spacer> + <property name="name"> + <cstring>spacer7</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>21</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout4</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <spacer> + <property name="name"> + <cstring>spacer3</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>61</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QCheckBox"> + <property name="name"> + <cstring>showAgainBox</cstring> + </property> + <property name="text"> + <string>showAgainBox</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer4</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>51</width> + <height>21</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <spacer> + <property name="name"> + <cstring>spacer5</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>21</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout3</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <spacer> + <property name="name"> + <cstring>spacer2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>161</width> + <height>31</height> + </size> + </property> + </spacer> + <widget class="QPushButton"> + <property name="name"> + <cstring>cancelButton</cstring> + </property> + <property name="text"> + <string>Cancel</string> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>okButton</cstring> + </property> + <property name="text"> + <string>Ok</string> + </property> + </widget> + </hbox> + </widget> + </vbox> +</widget> +<connections> + <connection> + <sender>okButton</sender> + <signal>clicked()</signal> + <receiver>WarningDialog</receiver> + <slot>accept()</slot> + </connection> + <connection> + <sender>cancelButton</sender> + <signal>clicked()</signal> + <receiver>WarningDialog</receiver> + <slot>reject()</slot> + </connection> +</connections> +<includes> + <include location="local" impldecl="in implementation">warningdialog.ui.h</include> +</includes> +<variables> + <variable>bool useShowAgain;</variable> + <variable>QString showAgainName;</variable> +</variables> +<slots> + <slot>setCancelButton( bool b )</slot> + <slot>setShowAgainName( const QString & s )</slot> + <slot>setText( const QString & s )</slot> + <slot>setCaption( const QString & s )</slot> +</slots> +<functions> + <function access="private" specifier="non virtual">init()</function> +</functions> +<pixmapinproject/> +<layoutdefaults spacing="6" margin="11"/> +</UI> 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); +}