00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "calprinttodoconfig_base.h"
00013
00014
#include <qvariant.h>
00015
#include <qpushbutton.h>
00016
#include <qcheckbox.h>
00017
#include <qbuttongroup.h>
00018
#include <qlabel.h>
00019
#include <qradiobutton.h>
00020
#include <qdatetimeedit.h>
00021
#include <qlineedit.h>
00022
#include <qlayout.h>
00023
#include <qtooltip.h>
00024
#include <qwhatsthis.h>
00025
00026
00027
00028
00029
00030 CalPrintTodoConfig_Base::CalPrintTodoConfig_Base(
QWidget* parent,
const char* name, WFlags fl )
00031 :
QWidget( parent, name, fl )
00032 {
00033
if ( !name )
00034 setName(
"CalPrintTodoConfig_Base" );
00035 CalPrintTodoConfig_BaseLayout =
new QGridLayout(
this, 1, 1, 0, 6,
"CalPrintTodoConfig_BaseLayout");
00036
00037 mDescription =
new QCheckBox(
this,
"mDescription" );
00038
00039 CalPrintTodoConfig_BaseLayout->addMultiCellWidget( mDescription, 2, 2, 0, 1 );
00040
00041 mDueDate =
new QCheckBox(
this,
"mDueDate" );
00042
00043 CalPrintTodoConfig_BaseLayout->addMultiCellWidget( mDueDate, 4, 4, 0, 1 );
00044
00045 mPriority =
new QCheckBox(
this,
"mPriority" );
00046
00047 CalPrintTodoConfig_BaseLayout->addMultiCellWidget( mPriority, 3, 3, 0, 1 );
00048
00049 mPrintType =
new QButtonGroup(
this,
"mPrintType" );
00050 mPrintType->setColumnLayout(0, Qt::Vertical );
00051 mPrintType->layout()->setSpacing( 6 );
00052 mPrintType->layout()->setMargin( 11 );
00053 mPrintTypeLayout =
new QGridLayout( mPrintType->layout() );
00054 mPrintTypeLayout->setAlignment( Qt::AlignTop );
00055
00056 mFromDateLabel =
new QLabel( mPrintType,
"mFromDateLabel" );
00057
00058 mPrintTypeLayout->addWidget( mFromDateLabel, 4, 1 );
00059
00060 mToDateLabel =
new QLabel( mPrintType,
"mToDateLabel" );
00061
00062 mPrintTypeLayout->addWidget( mToDateLabel, 4, 3 );
00063 spacer1 =
new QSpacerItem( 16, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
00064 mPrintTypeLayout->addItem( spacer1, 4, 5 );
00065 spacer2 =
new QSpacerItem( 16, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
00066 mPrintTypeLayout->addItem( spacer2, 4, 0 );
00067
00068 mPrintAll =
new QRadioButton( mPrintType,
"mPrintAll" );
00069 mPrintAll->setChecked( TRUE );
00070
00071 mPrintTypeLayout->addMultiCellWidget( mPrintAll, 0, 0, 0, 4 );
00072
00073 mPrintUnfinished =
new QRadioButton( mPrintType,
"mPrintUnfinished" );
00074 mPrintUnfinished->setEnabled( FALSE );
00075
00076 mPrintTypeLayout->addMultiCellWidget( mPrintUnfinished, 1, 1, 0, 4 );
00077
00078 mToDate =
new QDateEdit( mPrintType,
"mToDate" );
00079 mToDate->setEnabled( FALSE );
00080 mToDate->setOrder( QDateEdit::DMY );
00081
00082 mPrintTypeLayout->addWidget( mToDate, 4, 4 );
00083
00084 mFromDate =
new QDateEdit( mPrintType,
"mFromDate" );
00085 mFromDate->setEnabled( FALSE );
00086 mFromDate->setOrder( QDateEdit::DMY );
00087
00088 mPrintTypeLayout->addWidget( mFromDate, 4, 2 );
00089
00090 mPrintDueRange =
new QRadioButton( mPrintType,
"mPrintDueRange" );
00091 mPrintDueRange->setEnabled( FALSE );
00092
00093 mPrintTypeLayout->addMultiCellWidget( mPrintDueRange, 3, 3, 0, 4 );
00094
00095 CalPrintTodoConfig_BaseLayout->addMultiCellWidget( mPrintType, 1, 1, 0, 1 );
00096
00097 mTitle =
new QLineEdit(
this,
"mTitle" );
00098
00099 CalPrintTodoConfig_BaseLayout->addWidget( mTitle, 0, 1 );
00100
00101 mTitleLabel =
new QLabel(
this,
"mTitleLabel" );
00102
00103 CalPrintTodoConfig_BaseLayout->addWidget( mTitleLabel, 0, 0 );
00104
00105 mConnectSubTodos =
new QCheckBox(
this,
"mConnectSubTodos" );
00106
00107 CalPrintTodoConfig_BaseLayout->addMultiCellWidget( mConnectSubTodos, 5, 5, 0, 1 );
00108 spacer3 =
new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
00109 CalPrintTodoConfig_BaseLayout->addItem( spacer3, 6, 1 );
00110 languageChange();
00111 resize(
QSize(437, 379).expandedTo(minimumSizeHint()) );
00112 clearWState( WState_Polished );
00113
00114
00115 connect( mPrintDueRange, SIGNAL( toggled(
bool) ), mFromDate, SLOT( setEnabled(
bool) ) );
00116 connect( mPrintDueRange, SIGNAL( toggled(
bool) ), mToDate, SLOT( setEnabled(
bool) ) );
00117
00118
00119 mFromDateLabel->setBuddy( mFromDate );
00120 mToDateLabel->setBuddy( mToDate );
00121 mTitleLabel->setBuddy( mTitle );
00122 }
00123
00124
00125
00126
00127 CalPrintTodoConfig_Base::~CalPrintTodoConfig_Base()
00128 {
00129
00130 }
00131
00132
00133
00134
00135
00136
void CalPrintTodoConfig_Base::languageChange()
00137 {
00138 mDescription->setText( tr2i18n(
"Include &description of the item" ) );
00139 mDueDate->setText( tr2i18n(
"Include d&ue date of the item" ) );
00140 mPriority->setText( tr2i18n(
"Include &priority of the item" ) );
00141 mPrintType->setTitle( tr2i18n(
"Items to Print" ) );
00142 mFromDateLabel->setText( tr2i18n(
"&From:" ) );
00143 mToDateLabel->setText( tr2i18n(
"&To:" ) );
00144 mPrintAll->setText( tr2i18n(
"Print &all todo items" ) );
00145 mPrintUnfinished->setText( tr2i18n(
"Print only &unfinished items" ) );
00146 mPrintDueRange->setText( tr2i18n(
"Only items due in the &range:" ) );
00147 mTitle->setText( tr2i18n(
"Todo List" ) );
00148 mTitleLabel->setText( tr2i18n(
"&Title:" ) );
00149 mConnectSubTodos->setText( tr2i18n(
"Co&nnect subtodos with its parent" ) );
00150 }
00151
00152
#include "calprinttodoconfig_base.moc"