author | waspe <waspe> | 2003-11-04 16:37:14 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-04 16:37:14 (UTC) |
commit | efcd8d6a743261194b55df3afeec956fde9886d4 (patch) (unidiff) | |
tree | 7bf7232a92c40c8236813fc06aac18b4f8d16d1d | |
parent | d2c52ff34d0ef37d055f74bb9fd957c6ffc583a9 (diff) | |
download | opie-efcd8d6a743261194b55df3afeec956fde9886d4.zip opie-efcd8d6a743261194b55df3afeec956fde9886d4.tar.gz opie-efcd8d6a743261194b55df3afeec956fde9886d4.tar.bz2 |
remove merge conflict
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index f4008e9..4d64099 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp | |||
@@ -16,31 +16,20 @@ | |||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qmessagebox.h> | ||
21 | 20 | ||
22 | #include "datebookday.h" | 21 | #include "datebookday.h" |
23 | #include "datebookdayheaderimpl.h" | 22 | #include "datebookdayheaderimpl.h" |
24 | #include "datebookdayallday.h" | 23 | #include "datebookdayallday.h" |
25 | 24 | ||
26 | #include <qpe/datebookdb.h> | ||
27 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
28 | #include <qpe/event.h> | ||
29 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
30 | #include <qpe/timestring.h> | ||
31 | #include <qpe/qpedebug.h> | ||
32 | #include <qpe/ir.h> | 27 | #include <qpe/ir.h> |
33 | 28 | ||
34 | #include <qheader.h> | ||
35 | #include <qdatetime.h> | ||
36 | #include <qpainter.h> | ||
37 | #include <qsimplerichtext.h> | 29 | #include <qsimplerichtext.h> |
38 | #include <qpopupmenu.h> | 30 | #include <qpopupmenu.h> |
39 | #include <qtextcodec.h> | ||
40 | #include <qpalette.h> | ||
41 | 31 | ||
42 | #include <qlineedit.h> | ||
43 | 32 | ||
44 | #include <qtimer.h> | 33 | #include <qtimer.h> |
45 | 34 | ||
46 | DateBookDayView::DateBookDayView( bool whichClock, QWidget *parent, const char *name ) | 35 | DateBookDayView::DateBookDayView( bool whichClock, QWidget *parent, const char *name ) |
@@ -52,9 +41,9 @@ DateBookDayView::DateBookDayView( bool whichClock, QWidget *parent, const char * | |||
52 | setLeftMargin(38); | 41 | setLeftMargin(38); |
53 | setColumnStretchable( 0, TRUE ); | 42 | setColumnStretchable( 0, TRUE ); |
54 | setHScrollBarMode( QScrollView::AlwaysOff ); | 43 | setHScrollBarMode( QScrollView::AlwaysOff ); |
55 | verticalHeader()->setPalette(white); | 44 | verticalHeader()->setPalette(white); |
56 | verticalHeader()->setResizeEnabled(FALSE); | 45 | verticalHeader()->setResizeEnabled(FALSE); |
57 | setSelectionMode( Single ); | 46 | setSelectionMode( Single ); |
58 | 47 | ||
59 | // get rid of being able to edit things... | 48 | // get rid of being able to edit things... |
60 | QTableItem *tmp; | 49 | QTableItem *tmp; |
@@ -71,8 +60,9 @@ DateBookDayView::DateBookDayView( bool whichClock, QWidget *parent, const char * | |||
71 | 60 | ||
72 | void DateBookDayView::initHeader() | 61 | void DateBookDayView::initHeader() |
73 | { | 62 | { |
74 | QString strTmp; | 63 | QString strTmp; |
64 | int preferredWidth = 0; | ||
75 | for ( int i = 0; i < 24; ++i ) { | 65 | for ( int i = 0; i < 24; ++i ) { |
76 | if ( ampm ) { | 66 | if ( ampm ) { |
77 | if ( i == 0 ) | 67 | if ( i == 0 ) |
78 | strTmp = QString::number(12) + ":00"; | 68 | strTmp = QString::number(12) + ":00"; |
@@ -89,10 +79,20 @@ void DateBookDayView::initHeader() | |||
89 | strTmp = QString::number(i) + ":00"; | 79 | strTmp = QString::number(i) + ":00"; |
90 | } | 80 | } |
91 | strTmp = strTmp.rightJustify( 6, ' ' ); | 81 | strTmp = strTmp.rightJustify( 6, ' ' ); |
92 | verticalHeader()->setLabel( i, strTmp ); | 82 | verticalHeader()->setLabel( i, strTmp ); |
83 | |||
84 | // Compute correct width for current Font (Add some space right) | ||
85 | int actWidth = QFontMetrics( QFont::defaultFont() ).width( strTmp + QString(" ") ); | ||
86 | if ( preferredWidth < actWidth ) | ||
87 | preferredWidth = actWidth; | ||
93 | setRowStretchable( i, FALSE ); | 88 | setRowStretchable( i, FALSE ); |
94 | } | 89 | } |
90 | |||
91 | // It seems as if the header has a bug. It does not resize | ||
92 | // correct horizontally if it is used vertical.. | ||
93 | // Thus, we do it manually.. | ||
94 | setLeftMargin( preferredWidth ); | ||
95 | } | 95 | } |
96 | 96 | ||
97 | void DateBookDayView::slotDateChanged( int y, int m, int d ) | 97 | void DateBookDayView::slotDateChanged( int y, int m, int d ) |
98 | { | 98 | { |
@@ -172,9 +172,9 @@ void DateBookDayView::setRowStyle( int style ) | |||
172 | for (int i=0; i<numRows(); i++) | 172 | for (int i=0; i<numRows(); i++) |
173 | setRowHeight(i, style*10+20); | 173 | setRowHeight(i, style*10+20); |
174 | } | 174 | } |
175 | 175 | ||
176 | void DateBookDayView::contentsMouseReleaseEvent( QMouseEvent *e ) | 176 | void DateBookDayView::contentsMouseReleaseEvent( QMouseEvent* /* e */ ) |
177 | { | 177 | { |
178 | int sh=99,eh=-1; | 178 | int sh=99,eh=-1; |
179 | 179 | ||
180 | for(int i=0;i<this->numSelections();i++) { | 180 | for(int i=0;i<this->numSelections();i++) { |
@@ -218,9 +218,9 @@ void DateBookDayViewQuickLineEdit::slotReturnPressed() | |||
218 | void DateBookDayViewQuickLineEdit::finallyCallClose() { | 218 | void DateBookDayViewQuickLineEdit::finallyCallClose() { |
219 | close(true); // also deletes this widget... | 219 | close(true); // also deletes this widget... |
220 | } | 220 | } |
221 | 221 | ||
222 | void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent * e ) | 222 | void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */) |
223 | { | 223 | { |
224 | slotReturnPressed(); // Reuse code to add event and close this widget. | 224 | slotReturnPressed(); // Reuse code to add event and close this widget. |
225 | } | 225 | } |
226 | 226 | ||