00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "kogroupwareprefspage.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qtabwidget.h>
00017 #include <qlabel.h>
00018 #include <qcheckbox.h>
00019 #include <qspinbox.h>
00020 #include <qbuttongroup.h>
00021 #include <qlineedit.h>
00022 #include <qframe.h>
00023 #include <qlayout.h>
00024 #include <qtooltip.h>
00025 #include <qwhatsthis.h>
00026 #include "./kogroupwareprefspage.ui.h"
00027
00028
00029
00030
00031
00032 KOGroupwarePrefsPage::KOGroupwarePrefsPage( QWidget* parent, const char* name, WFlags fl )
00033 : QWidget( parent, name, fl )
00034 {
00035 if ( !name )
00036 setName( "KOGroupwarePrefsPage" );
00037 KOGroupwarePrefsPageLayout = new QVBoxLayout( this, 11, 6, "KOGroupwarePrefsPageLayout");
00038
00039 groupwareTab = new QTabWidget( this, "groupwareTab" );
00040 groupwareTab->setEnabled( TRUE );
00041
00042 tab = new QWidget( groupwareTab, "tab" );
00043 tabLayout = new QVBoxLayout( tab, 11, 6, "tabLayout");
00044
00045 TextLabel1 = new QLabel( tab, "TextLabel1" );
00046 TextLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00047 tabLayout->addWidget( TextLabel1 );
00048
00049 publishEnable = new QCheckBox( tab, "publishEnable" );
00050 tabLayout->addWidget( publishEnable );
00051
00052 layout8 = new QHBoxLayout( 0, 0, 6, "layout8");
00053
00054 publishDelayLabel = new QLabel( tab, "publishDelayLabel" );
00055 layout8->addWidget( publishDelayLabel );
00056
00057 publishDelay = new QSpinBox( tab, "publishDelay" );
00058 publishDelay->setMinValue( 1 );
00059 layout8->addWidget( publishDelay );
00060 tabLayout->addLayout( layout8 );
00061
00062 Layout16 = new QHBoxLayout( 0, 0, 6, "Layout16");
00063
00064 TextLabel3 = new QLabel( tab, "TextLabel3" );
00065 Layout16->addWidget( TextLabel3 );
00066
00067 publishDays = new QSpinBox( tab, "publishDays" );
00068 publishDays->setMaxValue( 366 );
00069 publishDays->setMinValue( 1 );
00070 publishDays->setValue( 60 );
00071 Layout16->addWidget( publishDays );
00072
00073 TextLabel4 = new QLabel( tab, "TextLabel4" );
00074 Layout16->addWidget( TextLabel4 );
00075 Spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00076 Layout16->addItem( Spacer3 );
00077 tabLayout->addLayout( Layout16 );
00078
00079 ButtonGroup2 = new QButtonGroup( tab, "ButtonGroup2" );
00080 ButtonGroup2->setColumnLayout(0, Qt::Vertical );
00081 ButtonGroup2->layout()->setSpacing( 6 );
00082 ButtonGroup2->layout()->setMargin( 11 );
00083 ButtonGroup2Layout = new QGridLayout( ButtonGroup2->layout() );
00084 ButtonGroup2Layout->setAlignment( Qt::AlignTop );
00085
00086 publishUrl = new QLineEdit( ButtonGroup2, "publishUrl" );
00087 publishUrl->setEnabled( TRUE );
00088
00089 ButtonGroup2Layout->addWidget( publishUrl, 3, 1 );
00090
00091 publishSavePassword = new QCheckBox( ButtonGroup2, "publishSavePassword" );
00092
00093 ButtonGroup2Layout->addMultiCellWidget( publishSavePassword, 7, 7, 0, 1 );
00094
00095 textLabel2 = new QLabel( ButtonGroup2, "textLabel2" );
00096
00097 ButtonGroup2Layout->addWidget( textLabel2, 6, 0 );
00098
00099 publishPassword = new QLineEdit( ButtonGroup2, "publishPassword" );
00100 publishPassword->setEchoMode( QLineEdit::Password );
00101
00102 ButtonGroup2Layout->addWidget( publishPassword, 6, 1 );
00103
00104 publishUser = new QLineEdit( ButtonGroup2, "publishUser" );
00105 publishUser->setMinimumSize( QSize( 120, 0 ) );
00106
00107 ButtonGroup2Layout->addWidget( publishUser, 5, 1 );
00108
00109 TextLabel6 = new QLabel( ButtonGroup2, "TextLabel6" );
00110
00111 ButtonGroup2Layout->addWidget( TextLabel6, 5, 0 );
00112
00113 frame5 = new QFrame( ButtonGroup2, "frame5" );
00114 frame5->setFrameShape( QFrame::HLine );
00115 frame5->setFrameShadow( QFrame::Sunken );
00116
00117 ButtonGroup2Layout->addMultiCellWidget( frame5, 4, 4, 0, 1 );
00118
00119 TextLabel7 = new QLabel( ButtonGroup2, "TextLabel7" );
00120
00121 ButtonGroup2Layout->addWidget( TextLabel7, 3, 0 );
00122 tabLayout->addWidget( ButtonGroup2 );
00123 spacer3 = new QSpacerItem( 21, 50, QSizePolicy::Minimum, QSizePolicy::Expanding );
00124 tabLayout->addItem( spacer3 );
00125 groupwareTab->insertTab( tab, QString::fromLatin1("") );
00126
00127 tab_2 = new QWidget( groupwareTab, "tab_2" );
00128 tabLayout_2 = new QVBoxLayout( tab_2, 11, 6, "tabLayout_2");
00129
00130 TextLabel2 = new QLabel( tab_2, "TextLabel2" );
00131 TextLabel2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
00132 tabLayout_2->addWidget( TextLabel2 );
00133
00134 retrieveEnable = new QCheckBox( tab_2, "retrieveEnable" );
00135 tabLayout_2->addWidget( retrieveEnable );
00136
00137 fullDomainRetrieval = new QCheckBox( tab_2, "fullDomainRetrieval" );
00138 fullDomainRetrieval->setEnabled( TRUE );
00139 tabLayout_2->addWidget( fullDomainRetrieval );
00140
00141 ButtonGroup2_2 = new QButtonGroup( tab_2, "ButtonGroup2_2" );
00142 ButtonGroup2_2->setColumnLayout(0, Qt::Vertical );
00143 ButtonGroup2_2->layout()->setSpacing( 6 );
00144 ButtonGroup2_2->layout()->setMargin( 11 );
00145 ButtonGroup2_2Layout = new QVBoxLayout( ButtonGroup2_2->layout() );
00146 ButtonGroup2_2Layout->setAlignment( Qt::AlignTop );
00147
00148 Layout7_2 = new QHBoxLayout( 0, 0, 6, "Layout7_2");
00149
00150 TextLabel7_2 = new QLabel( ButtonGroup2_2, "TextLabel7_2" );
00151 Layout7_2->addWidget( TextLabel7_2 );
00152
00153 retrieveUrl = new QLineEdit( ButtonGroup2_2, "retrieveUrl" );
00154 retrieveUrl->setEnabled( TRUE );
00155 Layout7_2->addWidget( retrieveUrl );
00156 ButtonGroup2_2Layout->addLayout( Layout7_2 );
00157
00158 frame7 = new QFrame( ButtonGroup2_2, "frame7" );
00159 frame7->setFrameShape( QFrame::HLine );
00160 frame7->setFrameShadow( QFrame::Sunken );
00161 ButtonGroup2_2Layout->addWidget( frame7 );
00162
00163 layout13 = new QGridLayout( 0, 1, 1, 0, 6, "layout13");
00164
00165 retrieveUser = new QLineEdit( ButtonGroup2_2, "retrieveUser" );
00166
00167 layout13->addWidget( retrieveUser, 0, 1 );
00168
00169 textLabel3 = new QLabel( ButtonGroup2_2, "textLabel3" );
00170
00171 layout13->addWidget( textLabel3, 0, 0 );
00172
00173 textLabel4 = new QLabel( ButtonGroup2_2, "textLabel4" );
00174
00175 layout13->addWidget( textLabel4, 1, 0 );
00176
00177 retrievePassword = new QLineEdit( ButtonGroup2_2, "retrievePassword" );
00178 retrievePassword->setEchoMode( QLineEdit::Password );
00179
00180 layout13->addWidget( retrievePassword, 1, 1 );
00181 ButtonGroup2_2Layout->addLayout( layout13 );
00182
00183 retrieveSavePassword = new QCheckBox( ButtonGroup2_2, "retrieveSavePassword" );
00184 retrieveSavePassword->setEnabled( TRUE );
00185 ButtonGroup2_2Layout->addWidget( retrieveSavePassword );
00186 tabLayout_2->addWidget( ButtonGroup2_2 );
00187 spacer2 = new QSpacerItem( 20, 160, QSizePolicy::Minimum, QSizePolicy::Expanding );
00188 tabLayout_2->addItem( spacer2 );
00189 groupwareTab->insertTab( tab_2, QString::fromLatin1("") );
00190 KOGroupwarePrefsPageLayout->addWidget( groupwareTab );
00191 languageChange();
00192 resize( QSize(496, 548).expandedTo(minimumSizeHint()) );
00193 clearWState( WState_Polished );
00194
00195
00196 connect( publishDays, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
00197 connect( publishUrl, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChanged() ) );
00198 connect( publishUser, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChanged() ) );
00199 connect( publishPassword, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChanged() ) );
00200 connect( publishSavePassword, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
00201 connect( retrieveEnable, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
00202 connect( retrieveUser, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChanged() ) );
00203 connect( retrievePassword, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChanged() ) );
00204 connect( retrieveSavePassword, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
00205 connect( retrieveUrl, SIGNAL( textChanged(const QString&) ), this, SLOT( slotChanged() ) );
00206 connect( publishDelay, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) );
00207 connect( fullDomainRetrieval, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
00208 connect( publishEnable, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) );
00209
00210
00211 setTabOrder( groupwareTab, publishEnable );
00212 setTabOrder( publishEnable, publishDelay );
00213 setTabOrder( publishDelay, publishDays );
00214 setTabOrder( publishDays, publishUrl );
00215 setTabOrder( publishUrl, publishUser );
00216 setTabOrder( publishUser, publishPassword );
00217 setTabOrder( publishPassword, publishSavePassword );
00218 setTabOrder( publishSavePassword, retrieveEnable );
00219 setTabOrder( retrieveEnable, fullDomainRetrieval );
00220 setTabOrder( fullDomainRetrieval, retrieveUrl );
00221 setTabOrder( retrieveUrl, retrieveUser );
00222 setTabOrder( retrieveUser, retrievePassword );
00223 setTabOrder( retrievePassword, retrieveSavePassword );
00224
00225
00226 textLabel3->setBuddy( retrieveUser );
00227 textLabel4->setBuddy( retrievePassword );
00228 }
00229
00230
00231
00232
00233 KOGroupwarePrefsPage::~KOGroupwarePrefsPage()
00234 {
00235
00236 }
00237
00238
00239
00240
00241
00242 void KOGroupwarePrefsPage::languageChange()
00243 {
00244 TextLabel1->setText( tr2i18n( "By publishing Free/Busy information, you allow others to take your calendar into account when inviting you for a meeting. Only the times you have already busy are published, not why they are busy." ) );
00245 publishEnable->setText( tr2i18n( "Publish your free/&busy information automatically" ) );
00246 QWhatsThis::add( publishEnable, tr2i18n( "Check this box to upload your Free/Busy information automatically.\n"
00247 "It is possible to skip this option and mail or upload your Free/Busy information using the Schedule menu of KOrganizer.\n"
00248 "Note: If KOrganizer is acting as a KDE Kolab client, this is not required, as the Kolab2 server taking care of publishing your Free/Busy information and manages the access to it from other users." ) );
00249 publishDelayLabel->setText( tr2i18n( "Minimum time between uploads (in minutes):" ) );
00250 QWhatsThis::add( publishDelayLabel, tr2i18n( "Configure minimum the interval of time in minutes between each upload here. This configuration is only effective in case you choose to publish your information automatically." ) );
00251 QWhatsThis::add( publishDelay, tr2i18n( "Configure minimum the interval of time in minutes between each upload here. This configuration is only effective in case you choose to publish your information automatically." ) );
00252 TextLabel3->setText( tr2i18n( "Publish" ) );
00253 QWhatsThis::add( TextLabel3, tr2i18n( "Configure the number of calendar days you wish to be published and available to others here." ) );
00254 QWhatsThis::add( publishDays, tr2i18n( "Configure the number of calendar days you wish to be published and available to others here." ) );
00255 TextLabel4->setText( tr2i18n( "days of free/busy information" ) );
00256 QWhatsThis::add( TextLabel4, tr2i18n( "Configure the number of calendar days you wish to be published and available to others here." ) );
00257 ButtonGroup2->setTitle( tr2i18n( "Server Information" ) );
00258 QWhatsThis::add( publishUrl, tr2i18n( "Enter the URL for the server on which your Free/Busy information shall be published here.\n"
00259 "Ask the server administrator for this information.\n"
00260 "Here is a Kolab2 server URL example: \"webdavs://kolab2.com/freebusy/joe@kolab2.com.ifb\"" ) );
00261 publishSavePassword->setText( tr2i18n( "Remember p&assword" ) );
00262 QWhatsThis::add( publishSavePassword, tr2i18n( "Check this box to make KOrganizer remember your password and skip asking you each time it uploads your Free/Busy information, by storing it in the configuration file.\n"
00263 "For security reasons, it is not recommended to store your password in the configuration file." ) );
00264 textLabel2->setText( tr2i18n( "Password:" ) );
00265 QWhatsThis::add( textLabel2, tr2i18n( "Enter your groupware server login password here." ) );
00266 QWhatsThis::add( publishPassword, tr2i18n( "Enter your groupware server login password here." ) );
00267 QWhatsThis::add( publishUser, tr2i18n( "Enter the login information relative to your account on the server here.\n"
00268 "\n"
00269 "A Kolab2 server specificity: Registered your UID (Unique IDentifier). By default your UID would be your email address on the Kolab2 server but it may also be different. In the last case enter your UID." ) );
00270 TextLabel6->setText( tr2i18n( "Username:" ) );
00271 QWhatsThis::add( TextLabel6, tr2i18n( "Enter the login information relative to your account on the server here.\n"
00272 "\n"
00273 "A Kolab2 server specificity: Registered your UID (Unique IDentifier). By default your UID would be your email address on the Kolab2 server but it may also be different. In the last case enter your UID." ) );
00274 TextLabel7->setText( tr2i18n( "Server URL:" ) );
00275 QWhatsThis::add( TextLabel7, tr2i18n( "Enter the URL for the server on which your Free/Busy information shall be published here.\n"
00276 "Ask the server administrator for this information.\n"
00277 "Here is a Kolab2 server URL example: \"webdavs://kolab2.com/freebusy/joe@kolab2.com.ifb\"" ) );
00278 groupwareTab->changeTab( tab, tr2i18n( "P&ublish" ) );
00279 TextLabel2->setText( tr2i18n( "By retrieving Free/Busy information that others have published, you can take their calendar into account when inviting them to a meeting." ) );
00280 retrieveEnable->setText( tr2i18n( "Retrieve other peoples' free/&busy information automatically" ) );
00281 QWhatsThis::add( retrieveEnable, tr2i18n( "Check this box to retrieve other peoples' Free/Busy information automatically. Note that you have to fill the correct server information to make this possible." ) );
00282 fullDomainRetrieval->setText( tr2i18n( "Use full email &address for retrieval" ) );
00283 QToolTip::add( fullDomainRetrieval, tr2i18n( "Set this to retrieve user@domain.ifb instead of user.ifb from the server" ) );
00284 QWhatsThis::add( fullDomainRetrieval, tr2i18n( "Check this box to download a free/busy file in the format \"user@domain.ifb\" (for example joe@company.com.ifb). Otherwise, it will download a free/busy file in the format user.ifb (for example joe.ifb). Ask the server Administrator if you are not sure about how to configure this option." ) );
00285 ButtonGroup2_2->setTitle( tr2i18n( "Server Information" ) );
00286 TextLabel7_2->setText( tr2i18n( "Server URL:" ) );
00287 QWhatsThis::add( TextLabel7_2, tr2i18n( "Enter the URL for the server on which the Free/Busy information is published here.\n"
00288 "Ask the server administrator for this information.\n"
00289 "Here is a Kolab2 server URL example: \"webdavs://kolab2.com/freebusy/\"" ) );
00290 QWhatsThis::add( retrieveUrl, tr2i18n( "Enter the URL for the server on which the Free/Busy information is published here.\n"
00291 "Ask the server administrator for this information.\n"
00292 "Here is a Kolab2 server URL example: \"webdavs://kolab2.com/freebusy/\"" ) );
00293 QWhatsThis::add( retrieveUser, tr2i18n( "Enter the login information relative to your account on the server here.\n"
00294 "\n"
00295 "A Kolab2 server specificity: Registered your UID (Unique IDentifier). By default your UID would be your email address on the Kolab2 server but it may also be different. In the last case enter your UID." ) );
00296 textLabel3->setText( tr2i18n( "User&name:" ) );
00297 QWhatsThis::add( textLabel3, tr2i18n( "Enter the login information relative to your account on the server here.\n"
00298 "\n"
00299 "A Kolab2 server specificity: Registered your UID (Unique IDentifier). By default your UID would be your email address on the Kolab2 server but it may also be different. In the last case enter your UID." ) );
00300 textLabel4->setText( tr2i18n( "Passwor&d:" ) );
00301 QWhatsThis::add( textLabel4, tr2i18n( "Enter your groupware server login password here." ) );
00302 QWhatsThis::add( retrievePassword, tr2i18n( "Enter your groupware server login password here." ) );
00303 retrieveSavePassword->setText( tr2i18n( "Re&member password" ) );
00304 QWhatsThis::add( retrieveSavePassword, tr2i18n( "Check this box to make KOrganizer remember your password and skip asking you each time it uploads your Free/Busy information, by storing it in the configuration file.\n"
00305 "For security reasons, it is not recommended to store your password in the configuration file." ) );
00306 groupwareTab->changeTab( tab_2, tr2i18n( "&Retrieve" ) );
00307 }
00308
00309 #include "kogroupwareprefspage.moc"