-rw-r--r-- | korganizer/mainwindow.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index f945383..0367bea 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -108,53 +108,82 @@ class KOex2phonePrefs : public QDialog | |||
108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
109 | mWriteBackFutureWeeks->setValue( 8 ); | 109 | mWriteBackFutureWeeks->setValue( 8 ); |
110 | lay->addWidget( temphb ); | 110 | lay->addWidget( temphb ); |
111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
112 | lab->setAlignment (AlignHCenter ); | 112 | lab->setAlignment (AlignHCenter ); |
113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
114 | lay->addWidget( ok ); | 114 | lay->addWidget( ok ); |
115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
116 | lay->addWidget( cancel ); | 116 | lay->addWidget( cancel ); |
117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
119 | resize( 220, 240 ); | 119 | resize( 220, 240 ); |
120 | qApp->processEvents(); | 120 | qApp->processEvents(); |
121 | int dw = QApplication::desktop()->width(); | 121 | int dw = QApplication::desktop()->width(); |
122 | int dh = QApplication::desktop()->height(); | 122 | int dh = QApplication::desktop()->height(); |
123 | move( (dw-width())/2, (dh - height() )/2 ); | 123 | move( (dw-width())/2, (dh - height() )/2 ); |
124 | } | 124 | } |
125 | 125 | ||
126 | public: | 126 | public: |
127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
128 | QCheckBox* mWriteBackFuture; | 128 | QCheckBox* mWriteBackFuture; |
129 | QSpinBox* mWriteBackFutureWeeks; | 129 | QSpinBox* mWriteBackFutureWeeks; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | QPixmap* sgListViewCompletedPix[6]; | ||
133 | |||
134 | |||
132 | int globalFlagBlockStartup; | 135 | int globalFlagBlockStartup; |
133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | 136 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : |
134 | QMainWindow( parent, name ) | 137 | QMainWindow( parent, name ) |
135 | { | 138 | { |
136 | 139 | sgListViewCompletedPix[5] = &listviewPix; | |
140 | sgListViewCompletedPix[0] = &listviewPix0; | ||
141 | sgListViewCompletedPix[1] = &listviewPix20; | ||
142 | sgListViewCompletedPix[2] = &listviewPix40; | ||
143 | sgListViewCompletedPix[3] = &listviewPix60; | ||
144 | sgListViewCompletedPix[4] = &listviewPix80; | ||
145 | if ( sgListViewCompletedPix[5]->height() < 5 ) { | ||
146 | int size = 12; | ||
147 | sgListViewCompletedPix[5]->resize( 11, 11 ); | ||
148 | sgListViewCompletedPix[5]->fill( Qt::white ); | ||
149 | QPainter p ( sgListViewCompletedPix[5] ); | ||
150 | p.drawRect( 0,0,11,11); | ||
151 | int half = size/2; | ||
152 | int heihei = size/2; | ||
153 | int x = 1; | ||
154 | p.drawLine ( 2, 5, 4 , 7 ) ; | ||
155 | p.drawLine ( 4 , 7 , 8, 3) ; | ||
156 | int iii = 0; | ||
157 | for ( iii = 0; iii < 5; ++iii ) { | ||
158 | sgListViewCompletedPix[iii]->resize( 11, 11 ); | ||
159 | sgListViewCompletedPix[iii]->fill( Qt::white ); | ||
160 | QPainter p ( sgListViewCompletedPix[iii] ); | ||
161 | p.drawRect( 0,0,11,11); | ||
162 | if ( iii ) | ||
163 | p.fillRect( 1,1,iii*2,9,Qt::gray ); | ||
164 | } | ||
165 | } | ||
137 | mClosed = false; | 166 | mClosed = false; |
138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 167 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
139 | QString confFile = locateLocal("config","korganizerrc"); | 168 | QString confFile = locateLocal("config","korganizerrc"); |
140 | QFileInfo finf ( confFile ); | 169 | QFileInfo finf ( confFile ); |
141 | bool showWarning = !finf.exists(); | 170 | bool showWarning = !finf.exists(); |
142 | setIcon(SmallIcon( "ko24" ) ); | 171 | setIcon(SmallIcon( "ko24" ) ); |
143 | mBlockAtStartup = true; | 172 | mBlockAtStartup = true; |
144 | mFlagKeyPressed = false; | 173 | mFlagKeyPressed = false; |
145 | setCaption("KO/Pi"); | 174 | setCaption("KO/Pi"); |
146 | KOPrefs *p = KOPrefs::instance(); | 175 | KOPrefs *p = KOPrefs::instance(); |
147 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 176 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
148 | p->mCurrentDisplayedView = 0; | 177 | p->mCurrentDisplayedView = 0; |
149 | if ( p->mHourSize > 22 ) | 178 | if ( p->mHourSize > 22 ) |
150 | p->mHourSize = 22; | 179 | p->mHourSize = 22; |
151 | QMainWindow::ToolBarDock tbd; | 180 | QMainWindow::ToolBarDock tbd; |
152 | if ( p->mToolBarHor ) { | 181 | if ( p->mToolBarHor ) { |
153 | if ( p->mToolBarUp ) | 182 | if ( p->mToolBarUp ) |
154 | tbd = Bottom; | 183 | tbd = Bottom; |
155 | else | 184 | else |
156 | tbd = Top; | 185 | tbd = Top; |
157 | } | 186 | } |
158 | else { | 187 | else { |
159 | if ( p->mToolBarUp ) | 188 | if ( p->mToolBarUp ) |
160 | tbd = Right; | 189 | tbd = Right; |