summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/changelog1
-rw-r--r--core/pim/today/todaybase.cpp51
2 files changed, 28 insertions, 24 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index 2270551..b3da1fb 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,5 +1,6 @@
10.3.1 10.3.1
2 2
3* fixed the wrong color of the buttons
3* better translation (thanks carsten and others) 4* better translation (thanks carsten and others)
4* fixes memory leaks 5* fixes memory leaks
5* bugfixes in calendar part, now location and note are working again. 6* bugfixes in calendar part, now location and note are working again.
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index dfcc34e..755c860 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -32,9 +32,9 @@
32 32
33#include <qpe/resource.h> 33#include <qpe/resource.h>
34 34
35/* 35/*
36 * Constructs a TodayBase which is a child of 'parent', with the 36 * Constructs a TodayBase which is a child of 'parent', with the
37 * name 'name' and widget flags set to 'f' 37 * name 'name' and widget flags set to 'f'
38 */ 38 */
39TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) 39TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
40 : QWidget( parent, name, fl ) 40 : QWidget( parent, name, fl )
@@ -44,18 +44,21 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
44 QPixmap todo = Resource::loadPixmap( "TodoList" ); // todo 44 QPixmap todo = Resource::loadPixmap( "TodoList" ); // todo
45 QPixmap config = Resource::loadPixmap( "today/config" ); // config icon 45 QPixmap config = Resource::loadPixmap( "today/config" ); // config icon
46 QPixmap mail = Resource::loadPixmap( "today/mail" ); // mail icon 46 QPixmap mail = Resource::loadPixmap( "today/mail" ); // mail icon
47 47
48 QPalette pal = this->palette(); 48 QPalette pal = this->palette();
49 QColor col = pal.color(QPalette::Active, QColorGroup::Background); 49 QColor col = pal.color(QPalette::Active, QColorGroup::Background);
50 pal.setColor(QPalette::Active, QColorGroup::Button, col); 50 pal.setColor(QPalette::Active, QColorGroup::Button, col);
51 pal.setColor(QPalette::Inactive, QColorGroup::Button, col);
52 pal.setColor(QPalette::Normal, QColorGroup::Button, col);
53 pal.setColor(QPalette::Disabled, QColorGroup::Button, col);
51 this->setPalette(pal); 54 this->setPalette(pal);
52 55
53 56
54 QWidget *d = QApplication::desktop(); 57 QWidget *d = QApplication::desktop();
55 int w=d->width(); 58 int w=d->width();
56 int h=d->height(); 59 int h=d->height();
57 resize( w , h ); 60 resize( w , h );
58 61
59 // hehe, qt is ... 62 // hehe, qt is ...
60 getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" ); 63 getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" );
61 getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); 64 getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) );
@@ -78,18 +81,18 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
78 Frame->setMinimumHeight(50); 81 Frame->setMinimumHeight(50);
79 // date 82 // date
80 TextLabel1 = new QLabel( Frame, "TextLabel1" ); 83 TextLabel1 = new QLabel( Frame, "TextLabel1" );
81 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); 84 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) );
82 QFont TextLabel1_font( TextLabel1->font() ); 85 QFont TextLabel1_font( TextLabel1->font() );
83 TextLabel1_font.setBold( TRUE ); 86 TextLabel1_font.setBold( TRUE );
84 TextLabel1->setFont( TextLabel1_font ); 87 TextLabel1->setFont( TextLabel1_font );
85 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); 88 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin );
86 TextLabel1->setTextFormat( RichText ); 89 TextLabel1->setTextFormat( RichText );
87 90
88 OwnerField = new QLabel(this , "Owner" ); 91 OwnerField = new QLabel(this , "Owner" );
89 OwnerField->setGeometry(QRect(0,0, this->width(), 12 )); 92 OwnerField->setGeometry(QRect(0,0, this->width(), 12 ));
90 OwnerField->setAlignment(int (QLabel::AlignTop | QLabel::AlignLeft ) ); 93 OwnerField->setAlignment(int (QLabel::AlignTop | QLabel::AlignLeft ) );
91 OwnerField->setMaximumHeight(12); 94 OwnerField->setMaximumHeight(12);
92 95
93 // --- dates section --- 96 // --- dates section ---
94 Frame4 = new QFrame( this, "Frame4" ); 97 Frame4 = new QFrame( this, "Frame4" );
95 Frame4->setPalette( pal ); 98 Frame4->setPalette( pal );
@@ -97,28 +100,28 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
97 Frame4->setFrameShadow( QScrollView::Sunken ); 100 Frame4->setFrameShadow( QScrollView::Sunken );
98 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); 101 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin );
99 Frame4->setFrameStyle( QFrame::NoFrame ); 102 Frame4->setFrameStyle( QFrame::NoFrame );
100 Frame4->setGeometry (QRect( 0, 8, this->width() , this->height()) ); 103 Frame4->setGeometry (QRect( 0, 8, this->width() , this->height()) );
101 104
102 sv1 = new QScrollView( Frame4 ); 105 sv1 = new QScrollView( Frame4 );
103 sv1->setResizePolicy(QScrollView::AutoOneFit); 106 sv1->setResizePolicy(QScrollView::AutoOneFit);
104 sv1->setHScrollBarMode( QScrollView::AlwaysOff ); 107 sv1->setHScrollBarMode( QScrollView::AlwaysOff );
105 // need to find a better way!!! 108 // need to find a better way!!!
106 sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) ); 109 sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) );
107 sv1->setFrameShape(QFrame::NoFrame); 110 sv1->setFrameShape(QFrame::NoFrame);
108 111
109 DatesButton = new QPushButton (Frame4, "DatesButton" ); 112 DatesButton = new QPushButton (Frame4, "DatesButton" );
110 DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); 113 DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) );
111 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 114 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
112 DatesButton->setPalette( pal ); 115 DatesButton->setPalette( pal );
113 DatesButton->setPixmap( datebook ); 116 DatesButton->setPixmap( datebook );
114 DatesButton->setFlat( TRUE ); 117 DatesButton->setFlat( TRUE );
115 118
116 // --- mail section ---) 119 // --- mail section ---)
117 MailFrame = new QFrame( this ,"MailFrame" ); 120 MailFrame = new QFrame( this ,"MailFrame" );
118 MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); 121 MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin );
119 MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); 122 MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) );
120 MailFrame->setFrameStyle( QFrame::NoFrame ); 123 MailFrame->setFrameStyle( QFrame::NoFrame );
121 124
122 QFrame* Line1 = new QFrame( MailFrame); 125 QFrame* Line1 = new QFrame( MailFrame);
123 Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); 126 Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) );
124 Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); 127 Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken );
@@ -130,7 +133,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
130 MailButton->setFlat( TRUE ); 133 MailButton->setFlat( TRUE );
131 134
132 MailField = new QLabel( MailFrame, "MailField" ); 135 MailField = new QLabel( MailFrame, "MailField" );
133 MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); 136 MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) );
134 MailField->setText( tr( "Opiemail not installed" ) ); 137 MailField->setText( tr( "Opiemail not installed" ) );
135 MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 138 MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
136 MailField->setMaximumHeight(40); 139 MailField->setMaximumHeight(40);
@@ -139,7 +142,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
139 // --- todo section -- 142 // --- todo section --
140 Frame15 = new QFrame( this, "Frame15" ); 143 Frame15 = new QFrame( this, "Frame15" );
141 Frame15->setFrameStyle( QFrame::NoFrame ); 144 Frame15->setFrameStyle( QFrame::NoFrame );
142 Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); 145 Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) );
143 146
144 QFrame* Line2 = new QFrame( Frame15); 147 QFrame* Line2 = new QFrame( Frame15);
145 Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); 148 Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) );
@@ -154,7 +157,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
154 QScrollView* sv2 = new QScrollView( Frame15 ); 157 QScrollView* sv2 = new QScrollView( Frame15 );
155 sv2->setResizePolicy(QScrollView::AutoOneFit); 158 sv2->setResizePolicy(QScrollView::AutoOneFit);
156 sv2->setHScrollBarMode( QScrollView::AlwaysOff ); 159 sv2->setHScrollBarMode( QScrollView::AlwaysOff );
157 sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) ); 160 sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) );
158 sv2->setFrameShape(QFrame::NoFrame); 161 sv2->setFrameShape(QFrame::NoFrame);
159 162
160 TodoField = new QLabel( sv2->viewport(), "TodoField" ); 163 TodoField = new QLabel( sv2->viewport(), "TodoField" );
@@ -164,7 +167,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
164 TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 167 TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
165 168
166 PushButton1 = new QPushButton (Frame15, "PushButton1" ); 169 PushButton1 = new QPushButton (Frame15, "PushButton1" );
167 PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); 170 PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) );
168 PushButton1->setPixmap( config ); 171 PushButton1->setPixmap( config );
169 PushButton1->setPalette( pal ); 172 PushButton1->setPalette( pal );
170 PushButton1->setAutoDefault( TRUE ); 173 PushButton1->setAutoDefault( TRUE );
@@ -182,7 +185,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
182 layout->setStretchFactor(Frame15,4); 185 layout->setStretchFactor(Frame15,4);
183} 186}
184 187
185/* 188/*
186 * Destroys the object and frees any allocated resources 189 * Destroys the object and frees any allocated resources
187 */ 190 */
188TodayBase::~TodayBase() 191TodayBase::~TodayBase()