-rw-r--r-- | core/pim/today/todaybase.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index c6ea11f..3d0bfb3 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -48,24 +48,33 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
48 | 48 | ||
49 | QWidget *d = QApplication::desktop(); | 49 | QWidget *d = QApplication::desktop(); |
50 | int w=d->width(); | 50 | int w=d->width(); |
51 | int h=d->height(); | 51 | int h=d->height(); |
52 | resize( w , h ); | 52 | resize( w , h ); |
53 | 53 | ||
54 | // hehe, qt is ... | 54 | // hehe, qt is ... |
55 | getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" ); | 55 | getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" ); |
56 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); | 56 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); |
57 | 57 | ||
58 | QVBoxLayout * layout = new QVBoxLayout(this); | 58 | QVBoxLayout * layout = new QVBoxLayout(this); |
59 | 59 | ||
60 | |||
61 | QPalette pal = this->palette(); | ||
62 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); | ||
63 | pal.setColor(QPalette::Active, QColorGroup::Button, col); | ||
64 | pal.setColor(QPalette::Inactive, QColorGroup::Button, col); | ||
65 | pal.setColor(QPalette::Normal, QColorGroup::Button, col); | ||
66 | pal.setColor(QPalette::Disabled, QColorGroup::Button, col); | ||
67 | this->setPalette(pal); | ||
68 | |||
60 | // --- logo Section --- | 69 | // --- logo Section --- |
61 | QPalette pal2; | 70 | QPalette pal2; |
62 | QColorGroup cg; | 71 | QColorGroup cg; |
63 | cg.setColor( QColorGroup::Text, white ); | 72 | cg.setColor( QColorGroup::Text, white ); |
64 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); | 73 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); |
65 | pal2.setActive( cg ); | 74 | pal2.setActive( cg ); |
66 | // today logo | 75 | // today logo |
67 | Frame = new QLabel( this, "Frame" ); | 76 | Frame = new QLabel( this, "Frame" ); |
68 | Frame->setPalette( pal2 ); | 77 | Frame->setPalette( pal2 ); |
69 | Frame->setFrameShape( QFrame::StyledPanel ); | 78 | Frame->setFrameShape( QFrame::StyledPanel ); |
70 | Frame->setFrameShadow( QFrame::Raised ); | 79 | Frame->setFrameShadow( QFrame::Raised ); |
71 | Frame->setLineWidth( 0 ); | 80 | Frame->setLineWidth( 0 ); |
@@ -112,82 +121,82 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
112 | Frame4->setGeometry (QRect( 0, 8, this->width() , this->height()) ); | 121 | Frame4->setGeometry (QRect( 0, 8, this->width() , this->height()) ); |
113 | 122 | ||
114 | sv1 = new QScrollView( Frame4 ); | 123 | sv1 = new QScrollView( Frame4 ); |
115 | sv1->setResizePolicy(QScrollView::AutoOneFit); | 124 | sv1->setResizePolicy(QScrollView::AutoOneFit); |
116 | sv1->setHScrollBarMode( QScrollView::AlwaysOff ); | 125 | sv1->setHScrollBarMode( QScrollView::AlwaysOff ); |
117 | // need to find a better way!!! | 126 | // need to find a better way!!! |
118 | sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) ); | 127 | sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) ); |
119 | sv1->setFrameShape(QFrame::NoFrame); | 128 | sv1->setFrameShape(QFrame::NoFrame); |
120 | 129 | ||
121 | DatesButton = new QPushButton (Frame4, "DatesButton" ); | 130 | DatesButton = new QPushButton (Frame4, "DatesButton" ); |
122 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 131 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
123 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 132 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
124 | // DatesButton->setPalette( pal ); | 133 | DatesButton->setPalette( pal ); |
125 | DatesButton->setPixmap( datebook ); | 134 | DatesButton->setPixmap( datebook ); |
126 | DatesButton->setFlat( TRUE ); | 135 | DatesButton->setFlat( TRUE ); |
127 | 136 | ||
128 | // --- mail section ---) | 137 | // --- mail section ---) |
129 | MailFrame = new QFrame( this ,"MailFrame" ); | 138 | MailFrame = new QFrame( this ,"MailFrame" ); |
130 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); | 139 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); |
131 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); | 140 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); |
132 | MailFrame->setFrameStyle( QFrame::NoFrame ); | 141 | MailFrame->setFrameStyle( QFrame::NoFrame ); |
133 | 142 | ||
134 | QFrame* Line1 = new QFrame( MailFrame); | 143 | QFrame* Line1 = new QFrame( MailFrame); |
135 | Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); | 144 | Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); |
136 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 145 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
137 | 146 | ||
138 | MailButton = new QPushButton (MailFrame, "MailButton" ); | 147 | MailButton = new QPushButton (MailFrame, "MailButton" ); |
139 | MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); | 148 | MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); |
140 | // MailButton->setPalette( pal ); | 149 | MailButton->setPalette( pal ); |
141 | MailButton->setPixmap( mail ); | 150 | MailButton->setPixmap( mail ); |
142 | MailButton->setFlat( TRUE ); | 151 | MailButton->setFlat( TRUE ); |
143 | 152 | ||
144 | MailField = new QLabel( MailFrame, "MailField" ); | 153 | MailField = new QLabel( MailFrame, "MailField" ); |
145 | MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); | 154 | MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); |
146 | MailField->setText( tr( "Opiemail not installed" ) ); | 155 | MailField->setText( tr( "Opiemail not installed" ) ); |
147 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 156 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
148 | MailField->setMaximumHeight(40); | 157 | MailField->setMaximumHeight(40); |
149 | MailField->setMinimumHeight(15); | 158 | MailField->setMinimumHeight(15); |
150 | 159 | ||
151 | // --- todo section -- | 160 | // --- todo section -- |
152 | Frame15 = new QFrame( this, "Frame15" ); | 161 | Frame15 = new QFrame( this, "Frame15" ); |
153 | Frame15->setFrameStyle( QFrame::NoFrame ); | 162 | Frame15->setFrameStyle( QFrame::NoFrame ); |
154 | Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); | 163 | Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); |
155 | 164 | ||
156 | QFrame* Line2 = new QFrame( Frame15); | 165 | QFrame* Line2 = new QFrame( Frame15); |
157 | Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); | 166 | Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); |
158 | Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 167 | Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
159 | 168 | ||
160 | TodoButton = new QPushButton (Frame15, "TodoButton" ); | 169 | TodoButton = new QPushButton (Frame15, "TodoButton" ); |
161 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 170 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
162 | // TodoButton->setPalette( pal ); | 171 | TodoButton->setPalette( pal ); |
163 | TodoButton->setPixmap( todo ); | 172 | TodoButton->setPixmap( todo ); |
164 | TodoButton->setFlat( TRUE ); | 173 | TodoButton->setFlat( TRUE ); |
165 | 174 | ||
166 | QScrollView* sv2 = new QScrollView( Frame15 ); | 175 | QScrollView* sv2 = new QScrollView( Frame15 ); |
167 | sv2->setResizePolicy(QScrollView::AutoOneFit); | 176 | sv2->setResizePolicy(QScrollView::AutoOneFit); |
168 | sv2->setHScrollBarMode( QScrollView::AlwaysOff ); | 177 | sv2->setHScrollBarMode( QScrollView::AlwaysOff ); |
169 | sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) ); | 178 | sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) ); |
170 | sv2->setFrameShape(QFrame::NoFrame); | 179 | sv2->setFrameShape(QFrame::NoFrame); |
171 | 180 | ||
172 | TodoField = new QLabel( sv2->viewport(), "TodoField" ); | 181 | TodoField = new QLabel( sv2->viewport(), "TodoField" ); |
173 | sv2->addChild(TodoField); | 182 | sv2->addChild(TodoField); |
174 | TodoField->setFrameShadow( QLabel::Plain ); | 183 | TodoField->setFrameShadow( QLabel::Plain ); |
175 | //TodoField->setText( tr( "No current todos" ) ); | 184 | //TodoField->setText( tr( "No current todos" ) ); |
176 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 185 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
177 | 186 | ||
178 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); | 187 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); |
179 | PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); | 188 | PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); |
180 | PushButton1->setPixmap( config ); | 189 | PushButton1->setPixmap( config ); |
181 | // PushButton1->setPalette( pal ); | 190 | PushButton1->setPalette( pal ); |
182 | PushButton1->setAutoDefault( TRUE ); | 191 | PushButton1->setAutoDefault( TRUE ); |
183 | PushButton1->setFlat( TRUE ); | 192 | PushButton1->setFlat( TRUE ); |
184 | 193 | ||
185 | // -- layout -- | 194 | // -- layout -- |
186 | layout->addWidget(Frame); | 195 | layout->addWidget(Frame); |
187 | layout->addWidget(OwnerField); | 196 | layout->addWidget(OwnerField); |
188 | layout->addWidget(Frame4); | 197 | layout->addWidget(Frame4); |
189 | layout->addWidget(MailFrame); | 198 | layout->addWidget(MailFrame); |
190 | layout->addWidget(Frame15); | 199 | layout->addWidget(Frame15); |
191 | 200 | ||
192 | layout->setStretchFactor(Frame4,5); | 201 | layout->setStretchFactor(Frame4,5); |
193 | layout->setStretchFactor(MailFrame,1); | 202 | layout->setStretchFactor(MailFrame,1); |