summaryrefslogtreecommitdiff
path: root/core/pim/today/todaybase.cpp
Unidiff
Diffstat (limited to 'core/pim/today/todaybase.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/todaybase.cpp44
1 files changed, 28 insertions, 16 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index 9331ee3..b0de1bf 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -47,55 +47,59 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
47 // config icon 47 // config icon
48 QPixmap config = Resource::loadPixmap( "today/config" ); 48 QPixmap config = Resource::loadPixmap( "today/config" );
49 // mail icon 49 // mail icon
50 QPixmap mail = Resource::loadPixmap( "today/mail" ); 50 QPixmap mail = Resource::loadPixmap( "today/mail" );
51 51
52 52
53 //if ( !name ) 53QPalette pal2;
54 // setName( "TodayBase" ); 54 QColorGroup cg;
55 //resize( 223, 307 ); 55 cg.setColor( QColorGroup::Text, white );
56 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) );
57 pal2.setActive( cg );
58
59
60QPalette pal = this->palette();
61QColor col = pal.color(QPalette::Active, QColorGroup::Background);
62pal.setColor(QPalette::Active, QColorGroup::Button, col);
63this->setPalette(pal);
56 64
57 QVBoxLayout * layout = new QVBoxLayout(this); 65 QVBoxLayout * layout = new QVBoxLayout(this);
58 66
67
59 Frame4 = new QFrame( this, "Frame4" ); 68 Frame4 = new QFrame( this, "Frame4" );
60 Frame4->setFrameShape( QScrollView::StyledPanel ); 69 Frame4->setFrameShape( QScrollView::StyledPanel );
61 Frame4->setFrameShadow( QScrollView::Sunken ); 70 Frame4->setFrameShadow( QScrollView::Sunken );
62 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); 71 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin );
63 72
64 // hehe, qt is ... 73 // hehe, qt is ...
65 getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); 74 getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" );
66 getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); 75 getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) );
67 76
68 DatesButton = new QPushButton (Frame4, "DatesButton" ); 77 DatesButton = new QPushButton (Frame4, "DatesButton" );
69 DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); 78 DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) );
70 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 79 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
80 DatesButton->setPalette( pal );
71 DatesButton->setPixmap( datebook ); 81 DatesButton->setPixmap( datebook );
72 DatesButton->setFlat( TRUE ); 82 DatesButton->setFlat( TRUE );
73 83
74 DatesField = new QLabel( Frame4, "DatesField" ); 84 DatesField = new QLabel( Frame4, "DatesField" );
75 DatesField->setGeometry( QRect( 40, 4, 203, 120 ) ); 85 DatesField->setGeometry( QRect( 40, 4, 203, 120 ) );
76 DatesField->setText( tr( "No appointments today" ) ); 86 DatesField->setText( tr( "No appointments today" ) );
77 DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 87 DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
78 88
79 // today logo 89 // today logo
80 Frame = new QLabel( this, "Frame" ); 90 Frame = new QLabel( this, "Frame" );
81 QPalette pal; 91 Frame->setPalette( pal2 );
82 QColorGroup cg;
83 cg.setColor( QColorGroup::Text, white );
84 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) );
85 pal.setActive( cg );
86
87 Frame->setPalette( pal );
88 Frame->setFrameShape( QFrame::StyledPanel ); 92 Frame->setFrameShape( QFrame::StyledPanel );
89 Frame->setFrameShadow( QFrame::Raised ); 93 Frame->setFrameShadow( QFrame::Raised );
90 Frame->setLineWidth( 0 ); 94 Frame->setLineWidth( 0 );
91 Frame->setMaximumHeight(50); 95 Frame->setMaximumHeight(50);
92 Frame->setMinimumHeight(50); 96 Frame->setMinimumHeight(50);
97
93 // date 98 // date
94 TextLabel1 = new QLabel( Frame, "TextLabel1" ); 99 TextLabel1 = new QLabel( Frame, "TextLabel1" );
95 TextLabel1->setPalette( pal );
96 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); 100 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) );
97 QFont TextLabel1_font( TextLabel1->font() ); 101 QFont TextLabel1_font( TextLabel1->font() );
98 TextLabel1_font.setBold( TRUE ); 102 TextLabel1_font.setBold( TRUE );
99 TextLabel1->setFont( TextLabel1_font ); 103 TextLabel1->setFont( TextLabel1_font );
100 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); 104 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin );
101 TextLabel1->setTextFormat( QLabel::AutoText ); 105 TextLabel1->setTextFormat( QLabel::AutoText );
@@ -104,60 +108,68 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
104 Frame15 = new QFrame( this, "Frame15" ); 108 Frame15 = new QFrame( this, "Frame15" );
105 Frame15->setFrameShape( QFrame::StyledPanel ); 109 Frame15->setFrameShape( QFrame::StyledPanel );
106 Frame15->setFrameShadow( QFrame::Sunken ); 110 Frame15->setFrameShadow( QFrame::Sunken );
107 111
108 TodoButton = new QPushButton (Frame15, "TodoButton" ); 112 TodoButton = new QPushButton (Frame15, "TodoButton" );
109 TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); 113 TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) );
110 TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 114 //TodoButton->setBackgroundMode(NoBackground);
115 TodoButton->setPalette( pal );
116 //TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
111 TodoButton->setPixmap( todo ); 117 TodoButton->setPixmap( todo );
112 TodoButton->setFlat( TRUE ); 118 TodoButton->setFlat( TRUE );
113 119
114 TodoField = new QLabel( Frame15, "TodoField" ); 120 TodoField = new QLabel( Frame15, "TodoField" );
115 TodoField->setGeometry( QRect( 40, 4, 196, 120 ) ); 121 TodoField->setGeometry( QRect( 40, 4, 196, 120 ) );
116 TodoField->setFrameShadow( QLabel::Plain ); 122 TodoField->setFrameShadow( QLabel::Plain );
117 TodoField->setText( tr( "No current todos" ) ); 123 TodoField->setText( tr( "No current todos" ) );
118 TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 124 TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
119 125
120 PushButton1 = new QPushButton (Frame15, "PushButton1" ); 126 PushButton1 = new QPushButton (Frame15, "PushButton1" );
121 PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) ); 127 PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) );
122 PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin ); 128 //PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin );
123 PushButton1->setPixmap( config ); 129 PushButton1->setPixmap( config );
130 PushButton1->setPalette( pal );
124 PushButton1->setAutoDefault( TRUE ); 131 PushButton1->setAutoDefault( TRUE );
125 PushButton1->setFlat( TRUE ); 132 PushButton1->setFlat( TRUE );
126 133
127 // mail 134 // mail
128 MailFrame = new QFrame( this, "MailFrame" ); 135 MailFrame = new QFrame( this, "MailFrame" );
129 MailFrame->setFrameShape( QScrollView::StyledPanel ); 136 MailFrame->setFrameShape( QScrollView::StyledPanel );
130 MailFrame->setFrameShadow( QScrollView::Sunken ); 137 MailFrame->setFrameShadow( QScrollView::Sunken );
131 MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); 138 //MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin );
132 139
133 MailButton = new QPushButton (MailFrame, "MailButton" ); 140 MailButton = new QPushButton (MailFrame, "MailButton" );
134 MailButton->setGeometry( QRect( 2, 10, 36, 19 ) ); 141 MailButton->setGeometry( QRect( 2, 10, 36, 19 ) );
135 MailButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 142 //MailButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
143 MailButton->setPalette( pal );
136 MailButton->setPixmap( mail ); 144 MailButton->setPixmap( mail );
137 MailButton->setFlat( TRUE ); 145 MailButton->setFlat( TRUE );
138 146
139 MailField = new QLabel( MailFrame, "DatesField" ); 147 MailField = new QLabel( MailFrame, "DatesField" );
140 MailField->setGeometry( QRect( 40, 10, 203, 120 ) ); 148 MailField->setGeometry( QRect( 40, 10, 203, 120 ) );
141 MailField->setText( tr( "Opiemail not installed" ) ); 149 MailField->setText( tr( "Opiemail not installed" ) );
142 MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 150 MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
143 MailField->setMaximumHeight(15); 151 MailField->setMaximumHeight(15);
144 MailField->setMinimumHeight(10); 152 MailField->setMinimumHeight(10);
145 153
154
155
156
146 layout->addWidget(Frame); 157 layout->addWidget(Frame);
147 layout->addWidget(Frame4); 158 layout->addWidget(Frame4);
148 layout->addWidget(MailFrame); 159 layout->addWidget(MailFrame);
149 layout->addWidget(Frame15); 160 layout->addWidget(Frame15);
161 //layout->addWidget(split);
150 162
151 layout->setStretchFactor(Frame4,4); 163 layout->setStretchFactor(Frame4,4);
152 layout->setStretchFactor(MailFrame,1); 164 layout->setStretchFactor(MailFrame,1);
153 layout->setStretchFactor(Frame15,3); 165 layout->setStretchFactor(Frame15,3);
154} 166}
155 167
156/* 168/*
157 * Destroys the object and frees any allocated resources 169 * Destroys the object and frees any allocated resources
158 */ 170 */
159TodayBase::~TodayBase() 171TodayBase::~TodayBase()
160{ 172{
161 // no need to delete child widgets, Qt does it all for us 173
162} 174}
163 175