summaryrefslogtreecommitdiff
path: root/core/pim/today/todaybase.cpp
Unidiff
Diffstat (limited to 'core/pim/today/todaybase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/todaybase.cpp55
1 files changed, 1 insertions, 54 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index f61840b..a44f598 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -47,13 +47,12 @@ 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 49
50 if ( !name ) 50 if ( !name )
51 setName( "TodayBase" ); 51 setName( "TodayBase" );
52 resize( 223, 307 ); 52 resize( 223, 307 );
53 //setCaption( tr( "My Test App" ) );
54 53
55 Frame4 = new QFrame( this, "Frame4" ); 54 Frame4 = new QFrame( this, "Frame4" );
56 Frame4->setGeometry( QRect( -9, 50, 250, 150 ) ); 55 Frame4->setGeometry( QRect( -9, 50, 250, 150 ) );
57 Frame4->setFrameShape( QScrollView::StyledPanel ); 56 Frame4->setFrameShape( QScrollView::StyledPanel );
58 Frame4->setFrameShadow( QScrollView::Sunken ); 57 Frame4->setFrameShadow( QScrollView::Sunken );
59 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); 58 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin );
@@ -65,41 +64,23 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
65 DatesButton = new QPushButton (Frame4, "DatesButton" ); 64 DatesButton = new QPushButton (Frame4, "DatesButton" );
66 DatesButton->setGeometry( QRect( 10, 10, 36, 32 ) ); 65 DatesButton->setGeometry( QRect( 10, 10, 36, 32 ) );
67 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 66 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
68 DatesButton->setPixmap( datebook ); 67 DatesButton->setPixmap( datebook );
69 DatesButton->setFlat( TRUE ); 68 DatesButton->setFlat( TRUE );
70 69
71
72 //PixmapLabel7 = new QLabel( Frame4, "PixmapLabel7" );
73 //PixmapLabel7->setGeometry( QRect( 10, 10, 36, 32 ) );
74 //PixmapLabel7->setPixmap( datebook );
75 //PixmapLabel7->setScaledContents( FALSE );
76
77 DatesField = new QLabel( Frame4, "DatesField" ); 70 DatesField = new QLabel( Frame4, "DatesField" );
78 DatesField->setGeometry( QRect( 47, 10, 203, 120 ) ); 71 DatesField->setGeometry( QRect( 47, 10, 203, 120 ) );
79 DatesField->setText( tr( "No appointments today" ) ); 72 DatesField->setText( tr( "No appointments today" ) );
80 DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 73 DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
81 74
82 Frame = new QLabel( this, "Frame" ); 75 Frame = new QLabel( this, "Frame" );
83 Frame->setGeometry( QRect( 0, 0, 240, 50 ) ); 76 Frame->setGeometry( QRect( 0, 0, 240, 50 ) );
84 QPalette pal; 77 QPalette pal;
85 QColorGroup cg; 78 QColorGroup cg;
86 //cg.setColor( QColorGroup::Foreground, white );
87 // cg.setColor( QColorGroup::Button, QColor( 238, 234, 222) );
88 //cg.setColor( QColorGroup::Light, white );
89 //cg.setColor( QColorGroup::Midlight, QColor( 246, 244, 238) );
90 // cg.setColor( QColorGroup::Dark, QColor( 119, 117, 111) );
91 //cg.setColor( QColorGroup::Mid, QColor( 158, 155, 147) );
92 cg.setColor( QColorGroup::Text, white ); 79 cg.setColor( QColorGroup::Text, white );
93 //cg.setColor( QColorGroup::BrightText, white );
94 //cg.setColor( QColorGroup::ButtonText, black );
95 //cg.setColor( QColorGroup::Base, white );
96 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); 80 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) );
97 //cg.setColor( QColorGroup::Shadow, black );
98 //cg.setColor( QColorGroup::Highlight, QColor( 74, 121, 205) );
99 //cg.setColor( QColorGroup::HighlightedText, white );
100 pal.setActive( cg ); 81 pal.setActive( cg );
101 82
102 Frame->setPalette( pal ); 83 Frame->setPalette( pal );
103 Frame->setFrameShape( QFrame::StyledPanel ); 84 Frame->setFrameShape( QFrame::StyledPanel );
104 Frame->setFrameShadow( QFrame::Raised ); 85 Frame->setFrameShadow( QFrame::Raised );
105 Frame->setLineWidth( 0 ); 86 Frame->setLineWidth( 0 );
@@ -109,39 +90,20 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
109 TextLabel1->setPalette( pal ); 90 TextLabel1->setPalette( pal );
110 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); 91 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) );
111 QFont TextLabel1_font( TextLabel1->font() ); 92 QFont TextLabel1_font( TextLabel1->font() );
112 TextLabel1_font.setBold( TRUE ); 93 TextLabel1_font.setBold( TRUE );
113 TextLabel1->setFont( TextLabel1_font ); 94 TextLabel1->setFont( TextLabel1_font );
114 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); 95 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin );
115 //TextLabel1->setText( tr( "" ) );
116 TextLabel1->setTextFormat( QLabel::AutoText ); 96 TextLabel1->setTextFormat( QLabel::AutoText );
117 //QToolTip::add( TextLabel1, tr( "Test" ) ); 97
118
119
120
121 // todo 98 // todo
122 Frame15 = new QFrame( this, "Frame15" ); 99 Frame15 = new QFrame( this, "Frame15" );
123 Frame15->setGeometry( QRect( -9, 200, 250, 130 ) ); 100 Frame15->setGeometry( QRect( -9, 200, 250, 130 ) );
124 Frame15->setFrameShape( QFrame::StyledPanel ); 101 Frame15->setFrameShape( QFrame::StyledPanel );
125 Frame15->setFrameShadow( QFrame::Sunken ); 102 Frame15->setFrameShadow( QFrame::Sunken );
126 //Frame15->setBackgroundMode( PaletteBase );
127 //Frame15->setBackgroundMode( PaletteBackground );
128
129
130 // PixmapLabel1 = new QLabel( Frame15, "PixmapLabel1" );
131 //PixmapLabel1->setGeometry( QRect( 10, 4, 36, 32 ) );
132 //PixmapLabel1->setBackgroundOrigin( QLabel::ParentOrigin );
133 //PixmapLabel1->setPixmap( todo );
134 //PixmapLabel1->setScaledContents( FALSE );
135 103
136
137 TodoField = new QLabel( Frame15, "TodoButtonBack" );
138 TodoField->setGeometry( QRect( 10, 4, 36, 32 ) );
139 TodoField->setFrameShadow( QLabel::Plain );
140 TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
141
142 TodoButton = new QPushButton (Frame15, "TodoButton" ); 104 TodoButton = new QPushButton (Frame15, "TodoButton" );
143 TodoButton->setGeometry( QRect( 10, 4, 36, 32 ) ); 105 TodoButton->setGeometry( QRect( 10, 4, 36, 32 ) );
144 TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 106 TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
145 TodoButton->setPixmap( todo ); 107 TodoButton->setPixmap( todo );
146 TodoButton->setFlat( TRUE ); 108 TodoButton->setFlat( TRUE );
147 109
@@ -164,21 +126,6 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
164 */ 126 */
165TodayBase::~TodayBase() 127TodayBase::~TodayBase()
166{ 128{
167 // no need to delete child widgets, Qt does it all for us 129 // no need to delete child widgets, Qt does it all for us
168} 130}
169 131
170/*
171 * Main event handler. Reimplemented to handle application
172 * font changes
173 */
174bool TodayBase::event( QEvent* ev )
175{
176 bool ret = QWidget::event( ev );
177 //if ( ev->type() == QEvent::ApplicationFontChange ) {
178 // QFont TextLabel1_font( TextLabel1->font() );
179 // TextLabel1_font.setBold( TRUE );
180 // TextLabel1->setFont( TextLabel1_font );
181 // }
182 return ret;
183}
184