author | zautrix <zautrix> | 2005-01-27 08:29:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-27 08:29:50 (UTC) |
commit | 3cc7fcfca62701f39c2626d48286b949a43313da (patch) (unidiff) | |
tree | 5c16e322d8d1c18b47fa825c64cc9d7b6db6fea0 /kmicromail | |
parent | 5b73e9576949ec5123dbd34fd0fe94828af97f49 (diff) | |
download | kdepimpi-3cc7fcfca62701f39c2626d48286b949a43313da.zip kdepimpi-3cc7fcfca62701f39c2626d48286b949a43313da.tar.gz kdepimpi-3cc7fcfca62701f39c2626d48286b949a43313da.tar.bz2 |
fix
-rw-r--r-- | kmicromail/mainwindow.cpp | 39 | ||||
-rw-r--r-- | kmicromail/mainwindow.h | 3 |
2 files changed, 40 insertions, 2 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 875ab77..250d114 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -22,2 +22,3 @@ extern QStatusBar* globalSstatusBarMainWindow; | |||
22 | #include "mainwindow.h" | 22 | #include "mainwindow.h" |
23 | #include "mailistviewitem.h" | ||
23 | #include <KDGanttMinimizeSplitter.h> | 24 | #include <KDGanttMinimizeSplitter.h> |
@@ -118,6 +119,16 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
118 | // QWidget *view = new QWidget( wrapperBox ); | 119 | // QWidget *view = new QWidget( wrapperBox ); |
119 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); | 120 | KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); |
121 | splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); | ||
122 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); | ||
120 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); | 123 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); |
121 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); | 124 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); |
122 | 125 | QWidget* infoBox = new QWidget( splithor ); | |
126 | QGridLayout *griLay = new QGridLayout( infoBox, 2,2); | ||
127 | griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); | ||
128 | griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); | ||
129 | griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); | ||
130 | griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; | ||
131 | griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; | ||
132 | griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; | ||
133 | infoBox->setMaximumHeight( infoBox->sizeHint().height() ); | ||
123 | folderView = new AccountView( split ); | 134 | folderView = new AccountView( split ); |
@@ -151,2 +162,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
151 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 162 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |
163 | QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); | ||
164 | QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); | ||
165 | QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); | ||
152 | #endif | 166 | #endif |
@@ -160,2 +174,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
160 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); | 174 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); |
175 | |||
176 | connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, | ||
177 | SLOT( setInfoFields(QListViewItem*) ) ); | ||
178 | |||
161 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 179 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
@@ -208,2 +226,19 @@ MainWindow::~MainWindow() | |||
208 | 226 | ||
227 | void MainWindow::setInfoFields(QListViewItem* item ) | ||
228 | { | ||
229 | if ( item == 0) { | ||
230 | subLE->setText(""); | ||
231 | fromLE->setText(""); | ||
232 | toLE->setText(""); | ||
233 | return; | ||
234 | } | ||
235 | RecMailP mail = ((MailListViewItem*)item)->data(); | ||
236 | subLE->setText(mail->getSubject()); | ||
237 | fromLE->setText(mail->getFrom()); | ||
238 | toLE->setText(mail->To().join(";" )); | ||
239 | subLE->setCursorPosition(0); | ||
240 | fromLE->setCursorPosition(0); | ||
241 | toLE->setCursorPosition(0); | ||
242 | |||
243 | } | ||
209 | void MainWindow::slotSetCodec( int codec ) | 244 | void MainWindow::slotSetCodec( int codec ) |
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index 016e44c..ddb3fca 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h | |||
@@ -8,2 +8,3 @@ | |||
8 | #include <qaction.h> | 8 | #include <qaction.h> |
9 | #include <qlineedit.h> | ||
9 | 10 | ||
@@ -39,2 +40,3 @@ public slots: | |||
39 | protected slots: | 40 | protected slots: |
41 | virtual void setInfoFields(QListViewItem* ); | ||
40 | virtual void slotSendQueued(); | 42 | virtual void slotSendQueued(); |
@@ -66,2 +68,3 @@ protected: | |||
66 | QListView *mailView; | 68 | QListView *mailView; |
69 | QLineEdit* toLE,*fromLE,*subLE; | ||
67 | //QBoxLayout *layout; | 70 | //QBoxLayout *layout; |