author | harlekin <harlekin> | 2002-02-16 17:27:51 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-02-16 17:27:51 (UTC) |
commit | 91842bea503d3d214b919c888124c652435a27a6 (patch) (unidiff) | |
tree | 5f0c698eadf78b07607ac95339d0033e5858aefc | |
parent | 58a0e33d4b79c7c47006fdf9d4c75e08395fd8d9 (diff) | |
download | opie-91842bea503d3d214b919c888124c652435a27a6.zip opie-91842bea503d3d214b919c888124c652435a27a6.tar.gz opie-91842bea503d3d214b919c888124c652435a27a6.tar.bz2 |
started to make the gui a qvbox layout
-rw-r--r-- | core/pim/today/todaybase.cpp | 34 | ||||
-rw-r--r-- | core/pim/today/todaybase.h | 3 |
2 files changed, 23 insertions, 14 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index a44f598..b60c915 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <qwhatsthis.h> | 27 | #include <qwhatsthis.h> |
28 | #include <qimage.h> | 28 | #include <qimage.h> |
29 | #include <qpixmap.h> | 29 | #include <qpixmap.h> |
30 | #include <qscrollview.h> | 30 | //#include <qscrollview.h> |
31 | 31 | ||
32 | #include <qpe/resource.h> | 32 | #include <qpe/resource.h> |
33 | 33 | ||
@@ -51,41 +51,43 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
51 | setName( "TodayBase" ); | 51 | setName( "TodayBase" ); |
52 | resize( 223, 307 ); | 52 | resize( 223, 307 ); |
53 | 53 | ||
54 | QVBoxLayout * layout = new QVBoxLayout(this); | ||
55 | |||
54 | Frame4 = new QFrame( this, "Frame4" ); | 56 | Frame4 = new QFrame( this, "Frame4" ); |
55 | Frame4->setGeometry( QRect( -9, 50, 250, 150 ) ); | ||
56 | Frame4->setFrameShape( QScrollView::StyledPanel ); | 57 | Frame4->setFrameShape( QScrollView::StyledPanel ); |
57 | Frame4->setFrameShadow( QScrollView::Sunken ); | 58 | Frame4->setFrameShadow( QScrollView::Sunken ); |
58 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); | 59 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); |
59 | 60 | ||
60 | // hehe, qt is ... | 61 | // hehe, qt is ... |
61 | getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); | 62 | getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); |
62 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( 2, 10, 0, 0 ) ); | 63 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); |
63 | 64 | ||
64 | DatesButton = new QPushButton (Frame4, "DatesButton" ); | 65 | DatesButton = new QPushButton (Frame4, "DatesButton" ); |
65 | DatesButton->setGeometry( QRect( 10, 10, 36, 32 ) ); | 66 | DatesButton->setGeometry( QRect( 2, 10, 36, 32 ) ); |
66 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 67 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
67 | DatesButton->setPixmap( datebook ); | 68 | DatesButton->setPixmap( datebook ); |
68 | DatesButton->setFlat( TRUE ); | 69 | DatesButton->setFlat( TRUE ); |
69 | 70 | ||
70 | DatesField = new QLabel( Frame4, "DatesField" ); | 71 | DatesField = new QLabel( Frame4, "DatesField" ); |
71 | DatesField->setGeometry( QRect( 47, 10, 203, 120 ) ); | 72 | DatesField->setGeometry( QRect( 40, 10, 203, 120 ) ); |
72 | DatesField->setText( tr( "No appointments today" ) ); | 73 | DatesField->setText( tr( "No appointments today" ) ); |
73 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 74 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
74 | 75 | ||
76 | // today logo | ||
75 | Frame = new QLabel( this, "Frame" ); | 77 | Frame = new QLabel( this, "Frame" ); |
76 | Frame->setGeometry( QRect( 0, 0, 240, 50 ) ); | ||
77 | QPalette pal; | 78 | QPalette pal; |
78 | QColorGroup cg; | 79 | QColorGroup cg; |
79 | cg.setColor( QColorGroup::Text, white ); | 80 | cg.setColor( QColorGroup::Text, white ); |
80 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); | 81 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); |
81 | pal.setActive( cg ); | 82 | pal.setActive( cg ); |
82 | 83 | ||
83 | Frame->setPalette( pal ); | 84 | Frame->setPalette( pal ); |
84 | Frame->setFrameShape( QFrame::StyledPanel ); | 85 | Frame->setFrameShape( QFrame::StyledPanel ); |
85 | Frame->setFrameShadow( QFrame::Raised ); | 86 | Frame->setFrameShadow( QFrame::Raised ); |
86 | Frame->setLineWidth( 0 ); | 87 | Frame->setLineWidth( 0 ); |
87 | 88 | Frame->setMaximumHeight(50); | |
88 | // datum | 89 | Frame->setMinimumHeight(50); |
90 | // date | ||
89 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); | 91 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); |
90 | TextLabel1->setPalette( pal ); | 92 | TextLabel1->setPalette( pal ); |
91 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); | 93 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); |
@@ -97,28 +99,34 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
97 | 99 | ||
98 | // todo | 100 | // todo |
99 | Frame15 = new QFrame( this, "Frame15" ); | 101 | Frame15 = new QFrame( this, "Frame15" ); |
100 | Frame15->setGeometry( QRect( -9, 200, 250, 130 ) ); | ||
101 | Frame15->setFrameShape( QFrame::StyledPanel ); | 102 | Frame15->setFrameShape( QFrame::StyledPanel ); |
102 | Frame15->setFrameShadow( QFrame::Sunken ); | 103 | Frame15->setFrameShadow( QFrame::Sunken ); |
103 | 104 | ||
104 | TodoButton = new QPushButton (Frame15, "TodoButton" ); | 105 | TodoButton = new QPushButton (Frame15, "TodoButton" ); |
105 | TodoButton->setGeometry( QRect( 10, 4, 36, 32 ) ); | 106 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
106 | TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 107 | TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
107 | TodoButton->setPixmap( todo ); | 108 | TodoButton->setPixmap( todo ); |
108 | TodoButton->setFlat( TRUE ); | 109 | TodoButton->setFlat( TRUE ); |
109 | 110 | ||
110 | TodoField = new QLabel( Frame15, "TodoField" ); | 111 | TodoField = new QLabel( Frame15, "TodoField" ); |
111 | TodoField->setGeometry( QRect( 47, 10, 196, 120 ) ); | 112 | TodoField->setGeometry( QRect( 40, 10, 196, 120 ) ); |
112 | TodoField->setFrameShadow( QLabel::Plain ); | 113 | TodoField->setFrameShadow( QLabel::Plain ); |
113 | TodoField->setText( tr( "No current todos" ) ); | 114 | TodoField->setText( tr( "No current todos" ) ); |
114 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 115 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
115 | 116 | ||
116 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); | 117 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); |
117 | PushButton1->setGeometry( QRect( 225, 68, 25, 21 ) ); | 118 | PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) ); |
118 | PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 119 | PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
119 | PushButton1->setPixmap( config ); | 120 | PushButton1->setPixmap( config ); |
120 | PushButton1->setAutoDefault( TRUE ); | 121 | PushButton1->setAutoDefault( TRUE ); |
121 | PushButton1->setFlat( TRUE ); | 122 | PushButton1->setFlat( TRUE ); |
123 | |||
124 | layout->addWidget(Frame); | ||
125 | layout->addWidget(Frame4); | ||
126 | layout->addWidget(Frame15); | ||
127 | |||
128 | layout->setStretchFactor(Frame4,3); | ||
129 | layout->setStretchFactor(Frame15,2); | ||
122 | } | 130 | } |
123 | 131 | ||
124 | /* | 132 | /* |
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h index 947efc5..69c6363 100644 --- a/core/pim/today/todaybase.h +++ b/core/pim/today/todaybase.h | |||
@@ -31,7 +31,8 @@ public: | |||
31 | QFrame* Frame4; | 31 | QFrame* Frame4; |
32 | QPushButton* DatesButton; | 32 | QPushButton* DatesButton; |
33 | QLabel* DatesField; | 33 | QLabel* DatesField; |
34 | QFrame* Frame; | 34 | QLabel* Frame; |
35 | //QFrame* Frame; | ||
35 | QLabel* TextLabel1; | 36 | QLabel* TextLabel1; |
36 | QFrame* Frame15; | 37 | QFrame* Frame15; |
37 | QLabel* TodoField; | 38 | QLabel* TodoField; |