kmail Library API Documentation

folderpropertiesdialog.cpp

00001 #include <kdialog.h> 00002 #include <klocale.h> 00003 /**************************************************************************** 00004 ** Form implementation generated from reading ui file './folderpropertiesdialog.ui' 00005 ** 00006 ** Created: Thu Oct 21 19:36:59 2004 00007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) 00008 ** 00009 ** WARNING! All changes made in this file will be lost! 00010 ****************************************************************************/ 00011 00012 #include "folderpropertiesdialog.h" 00013 00014 #include <qvariant.h> 00015 #include <kdialog.h> 00016 #include <qpushbutton.h> 00017 #include <qgroupbox.h> 00018 #include <qlineedit.h> 00019 #include <qlabel.h> 00020 #include <qcheckbox.h> 00021 #include <kicondialog.h> 00022 #include <knuminput.h> 00023 #include <kcombobox.h> 00024 #include <qcombobox.h> 00025 #include <qlayout.h> 00026 #include <qtooltip.h> 00027 #include <qwhatsthis.h> 00028 #include "kmfolderdir.h" 00029 #include "kmfolder.h" 00030 #include "./folderpropertiesdialog.ui.h" 00031 00032 /* 00033 * Constructs a KMFolderDialogUI as a child of 'parent', with the 00034 * name 'name' and widget flags set to 'f'. 00035 */ 00036 KMFolderDialogUI::KMFolderDialogUI( QWidget* parent, const char* name, WFlags fl ) 00037 : QWidget( parent, name, fl ) 00038 { 00039 if ( !name ) 00040 setName( "KMFolderDialogUI" ); 00041 KMFolderDialogUILayout = new QVBoxLayout( this, 0, KDialog::spacingHint(), "KMFolderDialogUILayout"); 00042 00043 GroupBox2 = new QGroupBox( this, "GroupBox2" ); 00044 GroupBox2->setColumnLayout(0, Qt::Vertical ); 00045 GroupBox2->layout()->setSpacing( KDialog::spacingHint() ); 00046 GroupBox2->layout()->setMargin( KDialog::marginHint() ); 00047 GroupBox2Layout = new QGridLayout( GroupBox2->layout() ); 00048 GroupBox2Layout->setAlignment( Qt::AlignTop ); 00049 00050 mNameEdit = new QLineEdit( GroupBox2, "mNameEdit" ); 00051 mNameEdit->setFrameShape( QLineEdit::LineEditPanel ); 00052 mNameEdit->setFrameShadow( QLineEdit::Sunken ); 00053 00054 GroupBox2Layout->addMultiCellWidget( mNameEdit, 0, 0, 2, 7 ); 00055 00056 TextLabel1 = new QLabel( GroupBox2, "TextLabel1" ); 00057 00058 GroupBox2Layout->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); 00059 00060 mHoldsMailingList = new QCheckBox( GroupBox2, "mHoldsMailingList" ); 00061 00062 GroupBox2Layout->addMultiCellWidget( mHoldsMailingList, 3, 3, 0, 7 ); 00063 Spacer1_2 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ); 00064 GroupBox2Layout->addItem( Spacer1_2, 4, 0 ); 00065 00066 TextLabel2_2 = new QLabel( GroupBox2, "TextLabel2_2" ); 00067 TextLabel2_2->setEnabled( FALSE ); 00068 00069 GroupBox2Layout->addMultiCellWidget( TextLabel2_2, 4, 4, 1, 3 ); 00070 Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ); 00071 GroupBox2Layout->addItem( Spacer1, 2, 0 ); 00072 00073 TextLabel3 = new QLabel( GroupBox2, "TextLabel3" ); 00074 TextLabel3->setEnabled( FALSE ); 00075 00076 GroupBox2Layout->addMultiCellWidget( TextLabel3, 2, 2, 1, 2 ); 00077 00078 mNormalIconButton = new KIconButton( GroupBox2, "mNormalIconButton" ); 00079 mNormalIconButton->setEnabled( FALSE ); 00080 mNormalIconButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mNormalIconButton->sizePolicy().hasHeightForWidth() ) ); 00081 mNormalIconButton->setMinimumSize( QSize( 28, 28 ) ); 00082 mNormalIconButton->setMaximumSize( QSize( 28, 28 ) ); 00083 00084 GroupBox2Layout->addWidget( mNormalIconButton, 2, 3 ); 00085 Spacer1_4 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ); 00086 GroupBox2Layout->addItem( Spacer1_4, 2, 4 ); 00087 00088 mUnreadIconButton = new KIconButton( GroupBox2, "mUnreadIconButton" ); 00089 mUnreadIconButton->setEnabled( FALSE ); 00090 mUnreadIconButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mUnreadIconButton->sizePolicy().hasHeightForWidth() ) ); 00091 mUnreadIconButton->setMinimumSize( QSize( 28, 28 ) ); 00092 mUnreadIconButton->setMaximumSize( QSize( 28, 28 ) ); 00093 00094 GroupBox2Layout->addWidget( mUnreadIconButton, 2, 6 ); 00095 00096 TextLabel4 = new QLabel( GroupBox2, "TextLabel4" ); 00097 TextLabel4->setEnabled( FALSE ); 00098 00099 GroupBox2Layout->addWidget( TextLabel4, 2, 5 ); 00100 spacer9 = new QSpacerItem( 101, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00101 GroupBox2Layout->addItem( spacer9, 2, 7 ); 00102 00103 mIconsCheckBox = new QCheckBox( GroupBox2, "mIconsCheckBox" ); 00104 00105 GroupBox2Layout->addMultiCellWidget( mIconsCheckBox, 1, 1, 0, 7 ); 00106 00107 mMailingListPostAddress = new QLineEdit( GroupBox2, "mMailingListPostAddress" ); 00108 mMailingListPostAddress->setEnabled( FALSE ); 00109 mMailingListPostAddress->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, mMailingListPostAddress->sizePolicy().hasHeightForWidth() ) ); 00110 00111 GroupBox2Layout->addMultiCellWidget( mMailingListPostAddress, 4, 4, 4, 7 ); 00112 KMFolderDialogUILayout->addWidget( GroupBox2 ); 00113 00114 GroupBox3 = new QGroupBox( this, "GroupBox3" ); 00115 GroupBox3->setColumnLayout(0, Qt::Vertical ); 00116 GroupBox3->layout()->setSpacing( KDialog::spacingHint() ); 00117 GroupBox3->layout()->setMargin( KDialog::marginHint() ); 00118 GroupBox3Layout = new QGridLayout( GroupBox3->layout() ); 00119 GroupBox3Layout->setAlignment( Qt::AlignTop ); 00120 00121 TextLabel2_3 = new QLabel( GroupBox3, "TextLabel2_3" ); 00122 TextLabel2_3->setEnabled( FALSE ); 00123 00124 GroupBox3Layout->addWidget( TextLabel2_3, 1, 1 ); 00125 Spacer1_2_2 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ); 00126 GroupBox3Layout->addItem( Spacer1_2_2, 1, 0 ); 00127 00128 mExpireRead = new QCheckBox( GroupBox3, "mExpireRead" ); 00129 00130 GroupBox3Layout->addMultiCellWidget( mExpireRead, 0, 0, 0, 3 ); 00131 Spacer1_2_2_2 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum ); 00132 GroupBox3Layout->addItem( Spacer1_2_2_2, 3, 0 ); 00133 00134 TextLabel2_3_2 = new QLabel( GroupBox3, "TextLabel2_3_2" ); 00135 TextLabel2_3_2->setEnabled( FALSE ); 00136 00137 GroupBox3Layout->addWidget( TextLabel2_3_2, 3, 1 ); 00138 00139 mExpireUnread = new QCheckBox( GroupBox3, "mExpireUnread" ); 00140 00141 GroupBox3Layout->addMultiCellWidget( mExpireUnread, 2, 2, 0, 3 ); 00142 00143 mExpireReadNum = new KIntNumInput( GroupBox3, "mExpireReadNum" ); 00144 mExpireReadNum->setEnabled( FALSE ); 00145 mExpireReadNum->setMinValue( 1 ); 00146 mExpireReadNum->setMaxValue( 500 ); 00147 00148 GroupBox3Layout->addWidget( mExpireReadNum, 1, 2 ); 00149 00150 mExpireUnreadNum = new KIntNumInput( GroupBox3, "mExpireUnreadNum" ); 00151 mExpireUnreadNum->setEnabled( FALSE ); 00152 mExpireUnreadNum->setMinValue( 1 ); 00153 mExpireUnreadNum->setMaxValue( 500 ); 00154 00155 GroupBox3Layout->addWidget( mExpireUnreadNum, 3, 2 ); 00156 00157 mExpireUnreadUnits = new KComboBox( FALSE, GroupBox3, "mExpireUnreadUnits" ); 00158 mExpireUnreadUnits->setEnabled( FALSE ); 00159 00160 GroupBox3Layout->addWidget( mExpireUnreadUnits, 3, 3 ); 00161 00162 mExpireReadUnits = new KComboBox( FALSE, GroupBox3, "mExpireReadUnits" ); 00163 mExpireReadUnits->setEnabled( FALSE ); 00164 00165 GroupBox3Layout->addWidget( mExpireReadUnits, 1, 3 ); 00166 Spacer6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00167 GroupBox3Layout->addMultiCell( Spacer6, 0, 3, 4, 4 ); 00168 KMFolderDialogUILayout->addWidget( GroupBox3 ); 00169 00170 GroupBox1 = new QGroupBox( this, "GroupBox1" ); 00171 GroupBox1->setColumnLayout(0, Qt::Vertical ); 00172 GroupBox1->layout()->setSpacing( KDialog::spacingHint() ); 00173 GroupBox1->layout()->setMargin( KDialog::marginHint() ); 00174 GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); 00175 GroupBox1Layout->setAlignment( Qt::AlignTop ); 00176 00177 textLabel1 = new QLabel( GroupBox1, "textLabel1" ); 00178 00179 GroupBox1Layout->addWidget( textLabel1, 1, 0 ); 00180 00181 mIdentity = new QComboBox( FALSE, GroupBox1, "mIdentity" ); 00182 00183 GroupBox1Layout->addWidget( mIdentity, 1, 1 ); 00184 00185 mMailboxType = new KComboBox( FALSE, GroupBox1, "mMailboxType" ); 00186 00187 GroupBox1Layout->addWidget( mMailboxType, 0, 1 ); 00188 00189 TextLabel1_2 = new QLabel( GroupBox1, "TextLabel1_2" ); 00190 00191 GroupBox1Layout->addWidget( TextLabel1_2, 0, 0 ); 00192 00193 TextLabel1_3 = new QLabel( GroupBox1, "TextLabel1_3" ); 00194 00195 GroupBox1Layout->addWidget( TextLabel1_3, 2, 0 ); 00196 Spacer7 = new QSpacerItem( 120, 80, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00197 GroupBox1Layout->addMultiCell( Spacer7, 0, 2, 2, 2 ); 00198 00199 mListDisplays = new QComboBox( FALSE, GroupBox1, "mListDisplays" ); 00200 00201 GroupBox1Layout->addWidget( mListDisplays, 2, 1 ); 00202 KMFolderDialogUILayout->addWidget( GroupBox1 ); 00203 languageChange(); 00204 resize( QSize(344, 428).expandedTo(minimumSizeHint()) ); 00205 clearWState( WState_Polished ); 00206 00207 // signals and slots connections 00208 connect( mIconsCheckBox, SIGNAL( toggled(bool) ), TextLabel3, SLOT( setEnabled(bool) ) ); 00209 connect( mIconsCheckBox, SIGNAL( toggled(bool) ), TextLabel4, SLOT( setEnabled(bool) ) ); 00210 connect( mHoldsMailingList, SIGNAL( toggled(bool) ), mMailingListPostAddress, SLOT( setEnabled(bool) ) ); 00211 connect( mHoldsMailingList, SIGNAL( toggled(bool) ), TextLabel2_2, SLOT( setEnabled(bool) ) ); 00212 connect( mIconsCheckBox, SIGNAL( toggled(bool) ), mNormalIconButton, SLOT( setEnabled(bool) ) ); 00213 connect( mIconsCheckBox, SIGNAL( toggled(bool) ), mUnreadIconButton, SLOT( setEnabled(bool) ) ); 00214 connect( mExpireRead, SIGNAL( toggled(bool) ), TextLabel2_3, SLOT( setEnabled(bool) ) ); 00215 connect( mExpireRead, SIGNAL( toggled(bool) ), mExpireReadNum, SLOT( setEnabled(bool) ) ); 00216 connect( mExpireRead, SIGNAL( toggled(bool) ), mExpireReadUnits, SLOT( setEnabled(bool) ) ); 00217 connect( mExpireUnread, SIGNAL( toggled(bool) ), TextLabel2_3_2, SLOT( setEnabled(bool) ) ); 00218 connect( mExpireUnread, SIGNAL( toggled(bool) ), mExpireUnreadNum, SLOT( setEnabled(bool) ) ); 00219 connect( mExpireUnread, SIGNAL( toggled(bool) ), mExpireUnreadUnits, SLOT( setEnabled(bool) ) ); 00220 connect( mNormalIconButton, SIGNAL( iconChanged(QString) ), this, SLOT( slotChangeIcon(QString) ) ); 00221 00222 // buddies 00223 TextLabel1->setBuddy( mNameEdit ); 00224 TextLabel2_2->setBuddy( mMailingListPostAddress ); 00225 TextLabel3->setBuddy( mNormalIconButton ); 00226 TextLabel4->setBuddy( mUnreadIconButton ); 00227 TextLabel2_3->setBuddy( mExpireReadNum ); 00228 TextLabel2_3_2->setBuddy( mExpireUnreadNum ); 00229 textLabel1->setBuddy( mIdentity ); 00230 TextLabel1_2->setBuddy( mMailboxType ); 00231 TextLabel1_3->setBuddy( mListDisplays ); 00232 } 00233 00234 /* 00235 * Destroys the object and frees any allocated resources 00236 */ 00237 KMFolderDialogUI::~KMFolderDialogUI() 00238 { 00239 // no need to delete child widgets, Qt does it all for us 00240 } 00241 00242 /* 00243 * Sets the strings of the subwidgets using the current 00244 * language. 00245 */ 00246 void KMFolderDialogUI::languageChange() 00247 { 00248 setCaption( tr2i18n( "Folder Properties" ) ); 00249 GroupBox2->setTitle( tr2i18n( "General" ) ); 00250 TextLabel1->setText( tr2i18n( "&Name:" ) ); 00251 mHoldsMailingList->setText( tr2i18n( "Folder holds a &mailing list" ) ); 00252 TextLabel2_2->setText( tr2i18n( "List &address:" ) ); 00253 TextLabel3->setText( tr2i18n( "N&ormal:" ) ); 00254 mNormalIconButton->setText( QString::null ); 00255 mUnreadIconButton->setText( QString::null ); 00256 TextLabel4->setText( tr2i18n( "Unr&ead:" ) ); 00257 mIconsCheckBox->setText( tr2i18n( "Use custom &icons" ) ); 00258 GroupBox3->setTitle( tr2i18n( "Message Expiring" ) ); 00259 TextLabel2_3->setText( tr2i18n( "E&xpire after:" ) ); 00260 mExpireRead->setText( tr2i18n( "Expire &read messages" ) ); 00261 TextLabel2_3_2->setText( tr2i18n( "Expire a&fter:" ) ); 00262 mExpireUnread->setText( tr2i18n( "Expire &unread messages" ) ); 00263 mExpireUnreadUnits->clear(); 00264 mExpireUnreadUnits->insertItem( tr2i18n( "Day(s)" ) ); 00265 mExpireUnreadUnits->insertItem( tr2i18n( "Week(s)" ) ); 00266 mExpireUnreadUnits->insertItem( tr2i18n( "Month(s)" ) ); 00267 mExpireReadUnits->clear(); 00268 mExpireReadUnits->insertItem( tr2i18n( "Day(s)" ) ); 00269 mExpireReadUnits->insertItem( tr2i18n( "Week(s)" ) ); 00270 mExpireReadUnits->insertItem( tr2i18n( "Month(s)" ) ); 00271 GroupBox1->setTitle( tr2i18n( "Advanced" ) ); 00272 textLabel1->setText( tr2i18n( "Sender identit&y:" ) ); 00273 TextLabel1_2->setText( tr2i18n( "&Storage format:" ) ); 00274 TextLabel1_3->setText( tr2i18n( "&List displays:" ) ); 00275 mListDisplays->clear(); 00276 mListDisplays->insertItem( tr2i18n( "Sender" ) ); 00277 mListDisplays->insertItem( tr2i18n( "Receiver" ) ); 00278 } 00279 00280 #include "folderpropertiesdialog.moc"
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:45 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003