kshowmail: kshowmail/AlertDlg.cpp Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories

# AlertDlg.cpp

    00001 #include <kdialog.h>
    00002 #include <klocale.h>
    00003 /****************************************************************************
    00004 ** Form implementation generated from reading ui file './AlertDlg.ui'
    00005 **
    00006 ** Created: Fr Jun 29 22:08:57 2007
    00007 **      by: The User Interface Compiler ($Id: AlertDlg_8cpp-source.html,v 1.10 2007/07/05 17:37:49 kuddel-fl Exp $)
    00008 **
    00009 ** WARNING! All changes made in this file will be lost!
    00010 ****************************************************************************/
    00011
    00012 #include "AlertDlg.h"
    00013
    00014 #include <qvariant.h>
    00015 #include <qpushbutton.h>
    00016 #include <qlabel.h>
    00017 #include <qlayout.h>
    00018 #include <qtooltip.h>
    00019 #include <qwhatsthis.h>
    00020 #include <qimage.h>
    00021 #include <qpixmap.h>
    00022
    00023 static const char* const img0_AlertDlg[] = {
    00024 "48 48 114 2",
    00025 "Qt c None",
    00026 ".D c #000000",
    00027 ".2 c #101c18",
    00028 "#e c #101c20",
    00029 ".U c #102020",
    00030 ".Z c #103820",
    00031 "#c c #181c20",
    00032 "#d c #201810",
    00033 "#b c #201c20",
    00034 ".6 c #202020",
    00035 "#S c #202810",
    00036 "#C c #204841",
    00037 ".M c #313000",
    00038 "#K c #313029",
    00039 ".J c #313031",
    00040 "#T c #313839",
    00041 "#M c #313841",
    00042 "#p c #413041",
    00043 "#J c #414000",
    00044 ".O c #414841",
    00045 ".1 c #4a3808",
    00046 ".N c #524c52",
    00047 ".r c #525052",
    00048 ".R c #525952",
    00049 "#y c #527973",
    00050 "#q c #52814a",
    00051 "#B c #528152",
    00052 "#L c #5a6152",
    00053 "#z c #622429",
    00054 ".7 c #624852",
    00055 "#I c #626152",
    00056 "#V c #626162",
    00057 ".E c #626973",
    00058 "#x c #6a3000",
    00059 ".t c #733062",
    00060 ".v c #734052",
    00061 "#o c #736973",
    00062 "#n c #737562",
    00063 ".s c #737583",
    00064 "#U c #737983",
    00065 "#A c #835d6a",
    00066 ".S c #836131",
    00067 ".T c #946931",
    00068 "#D c #9491a4",
    00069 "#l c #94aab4",
    00070 "#v c #9caea4",
    00071 ".K c #a44052",
    00072 "#w c #a49994",
    00073 "#j c #a4aac5",
    00074 "#k c #a4b2a4",
    00075 "#i c #a4c2a4",
    00076 "#E c #a4e2b4",
    00077 ".L c #b44831",
    00078 ".5 c #b47952",
    00079 "#G c #bd8983",
    00080 ".o c #bde2c5",
    00081 ".0 c #c57973",
    00082 ".u c #c5c2d5",
    00083 ".p c #c5cac5",
    00084 ".q c #c5d2f6",
    00085 ".C c #c5e2c5",
    00086 ".8 c #d58173",
    00087 "#H c #d5ae9c",
    00088 "#t c #d5c6bd",
    00089 ".l c #d5d2d5",
    00090 ".i c #d5ded5",
    00091 ".k c #d5e2d5",
    00092 ".h c #d5eede",
    00093 ".F c #d5eee6",
    00094 ".w c #d5f2e6",
    00095 "#r c #de6d6a",
    00096 "#F c #de958b",
    00097 "#O c #dea5a4",
    00098 ".3 c #deaea4",
    00099 "#. c #deb2a4",
    00100 ".Y c #deba62",
    00101 "#u c #debab4",
    00102 "#g c #decabd",
    00103 ".m c #dedabd",
    00104 ".e c #dee2e6",
    00105 "#s c #e61818",
    00106 ".P c #e67d73",
    00107 "#Q c #e6898b",
    00108 "#a c #e68d8b",
    00109 ".Q c #e69141",
    00110 ".W c #e6958b",
    00111 "#f c #e69594",
    00112 ".n c #e6dac5",
    00113 ".j c #e6e2d5",
    00114 ".c c #e6e2e6",
    00115 ".f c #e6f2cd",
    00116 ".g c #e6f2d5",
    00117 ".d c #e6fae6",
    00118 ".# c #e6fff6",
    00119 "#N c #ee655a",
    00120 ".B c #ee6962",
    00121 ".x c #ee7d7b",
    00122 "#P c #eeba9c",
    00123 "#R c #f61810",
    00124 ".y c #f63431",
    00125 ".4 c #f64441",
    00126 ".V c #f64841",
    00127 ".X c #f64c4a",
    00128 "#m c #f6504a",
    00129 ".9 c #f66562",
    00130 ".H c #f67d73",
    00131 ".b c #f6f2f6",
    00132 ".a c #f6fff6",
    00133 ".z c #ff0000",
    00134 ".I c #ff1810",
    00135 "#h c #ff1818",
    00136 ".A c #ff1c18",
    00137 "## c #ff3031",
    00138 ".G c #ff4c4a",
    00139 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00140 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00141 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00142 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00143 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00144 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00145 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00146 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
    00147 "QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQ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as a child of 'parent', with the
    00191  *  name 'name' and widget flags set to 'f'.
    00192  *
    00193  *  The dialog will by default be modeless, unless you set 'modal' to
    00194  *  TRUE to construct a modal dialog.
    00195  */
    00196 AlertDlg::AlertDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    00197     : QDialog( parent, name, modal, fl ),
    00198       image0( (const char **) img0_AlertDlg )
    00199 {
    00200     if ( !name )
    00201        setName( "AlertDlg" );
    00202     AlertDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "AlertDlgLayout");
    00203
    00204     m_ButtonIgnore = new QPushButton( this, "m_ButtonIgnore" );
    00205
    00206     AlertDlgLayout->addWidget( m_ButtonIgnore, 2, 2 );
    00207
    00208     m_ButtonOk = new QPushButton( this, "m_ButtonOk" );
    00209
    00210     AlertDlgLayout->addMultiCellWidget( m_ButtonOk, 2, 2, 0, 1 );
    00211
    00212     PixmapLabel2 = new QLabel( this, "PixmapLabel2" );
    00213     PixmapLabel2->setPixmap( image0 );
    00214     PixmapLabel2->setScaledContents( TRUE );
    00215
    00216     AlertDlgLayout->addMultiCellWidget( PixmapLabel2, 0, 1, 0, 0 );
    00217
    00218     QLabel_1 = new QLabel( this, "QLabel_1" );
    00219     QFont QLabel_1_font(  QLabel_1->font() );
    00220     QLabel_1_font.setPointSize( 14 );
    00221     QLabel_1_font.setBold( TRUE );
    00222     QLabel_1_font.setItalic( TRUE );
    00223     QLabel_1->setFont( QLabel_1_font );
    00224
    00225     AlertDlgLayout->addMultiCellWidget( QLabel_1, 0, 0, 1, 2 );
    00226
    00227     QLabel_2 = new QLabel( this, "QLabel_2" );
    00228     QFont QLabel_2_font(  QLabel_2->font() );
    00229     QLabel_2_font.setPointSize( 14 );
    00230     QLabel_2_font.setBold( TRUE );
    00231     QLabel_2_font.setItalic( TRUE );
    00232     QLabel_2->setFont( QLabel_2_font );
    00233
    00234     AlertDlgLayout->addMultiCellWidget( QLabel_2, 1, 1, 1, 2 );
    00235     languageChange();
    00236     resize( QSize(271, 127).expandedTo(minimumSizeHint()) );
    00237     clearWState( WState_Polished );
    00238
    00239     // signals and slots connections
    00240     connect( m_ButtonIgnore, SIGNAL( clicked() ), this, SLOT( reject() ) );
    00241     connect( m_ButtonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    00242     connect( m_ButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
    00243
    00244     // tab order
    00245     setTabOrder( m_ButtonOk, m_ButtonIgnore );
    00246 }
    00247
    00248 /*
    00249  *  Destroys the object and frees any allocated resources
    00250  */
    00251 AlertDlg::~AlertDlg()
    00252 {
    00253     // no need to delete child widgets, Qt does it all for us
    00254 }
    00255
    00256 /*
    00257  *  Sets the strings of the subwidgets using the current
    00258  *  language.
    00259  */
    00260 void AlertDlg::languageChange()
    00261 {
    00262     setCaption( tr2i18n( "KShowmail" ) );
    00263     m_ButtonIgnore->setText( tr2i18n( "Ignore" ) );
    00264     m_ButtonOk->setText( tr2i18n( "Show main window" ) );
    00265     QLabel_1->setText( tr2i18n( "New mail" ) );
    00266     QLabel_2->setText( tr2i18n( "has arrived !" ) );
    00267 }
    00268
    00269 void AlertDlg::slotOk()
    00270 {
    00271     qWarning( "AlertDlg::slotOk(): Not implemented yet" );
    00272 }
    00273
    00274 #include "AlertDlg.moc"