Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index c115b32..93d80d9 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -7,4 +7,5 @@ | |||
7 | #include <opie2/odebug.h> | 7 | #include <opie2/odebug.h> |
8 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
9 | #include <qpe/qcopenvelope_qws.h> | ||
9 | 10 | ||
10 | #include "defines.h" | 11 | #include "defines.h" |
@@ -87,5 +88,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
87 | 88 | ||
88 | QWidget *view = new QWidget( wrapperBox ); | 89 | QWidget *view = new QWidget( wrapperBox ); |
89 | |||
90 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); | 90 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); |
91 | 91 | ||
@@ -114,4 +114,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
114 | layout->setStretchFactor( mailView, 2 ); | 114 | layout->setStretchFactor( mailView, 2 ); |
115 | 115 | ||
116 | m_Rotate = (QApplication::desktop()->width() > QApplication::desktop()->height()?0:90); | ||
117 | |||
116 | slotAdjustLayout(); | 118 | slotAdjustLayout(); |
117 | 119 | ||
@@ -134,4 +136,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
134 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), | 136 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), |
135 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); | 137 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); |
138 | m_sysChannel = new QCopChannel( "QPE/System", this ); | ||
139 | connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ), | ||
140 | this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); | ||
136 | #endif | 141 | #endif |
137 | 142 | ||
@@ -143,4 +148,18 @@ MainWindow::~MainWindow() | |||
143 | } | 148 | } |
144 | 149 | ||
150 | void MainWindow::systemMessage( const QCString& msg, const QByteArray& data ) | ||
151 | { | ||
152 | int _newrotation; | ||
153 | QDataStream stream( data, IO_ReadOnly ); | ||
154 | if ( msg == "setCurrentRotation(int)" ) | ||
155 | { | ||
156 | stream >> _newrotation; | ||
157 | if (m_Rotate != _newrotation) { | ||
158 | slotAdjustLayout(); | ||
159 | m_Rotate = _newrotation; | ||
160 | } | ||
161 | } | ||
162 | } | ||
163 | |||
145 | void MainWindow::appMessage(const QCString &, const QByteArray &) | 164 | void MainWindow::appMessage(const QCString &, const QByteArray &) |
146 | { | 165 | { |
@@ -151,5 +170,4 @@ void MainWindow::slotAdjustLayout() { | |||
151 | 170 | ||
152 | QWidget *d = QApplication::desktop(); | 171 | QWidget *d = QApplication::desktop(); |
153 | |||
154 | if ( d->width() < d->height() ) { | 172 | if ( d->width() < d->height() ) { |
155 | layout->setDirection( QBoxLayout::TopToBottom ); | 173 | layout->setDirection( QBoxLayout::TopToBottom ); |