author | harlekin <harlekin> | 2002-02-16 19:59:21 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-02-16 19:59:21 (UTC) |
commit | 4e6ec847f469a3669be864db69dee0d8b0e4a93b (patch) (unidiff) | |
tree | db92798a54f2eca93aa71fcf4d9aab3d116f0c5e /core/pim/today/todaybase.cpp | |
parent | be1704ffdb21c6d304ba36bfd5ef1f5db622baea (diff) | |
download | opie-4e6ec847f469a3669be864db69dee0d8b0e4a93b.zip opie-4e6ec847f469a3669be864db69dee0d8b0e4a93b.tar.gz opie-4e6ec847f469a3669be864db69dee0d8b0e4a93b.tar.bz2 |
new features: auto update and opiemail support
Diffstat (limited to 'core/pim/today/todaybase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todaybase.cpp | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index b60c915..9331ee3 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -45,12 +45,15 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
45 | // todo | 45 | // todo |
46 | QPixmap todo = Resource::loadPixmap( "TodoList" ); | 46 | QPixmap todo = Resource::loadPixmap( "TodoList" ); |
47 | // config icon | 47 | // config icon |
48 | QPixmap config = Resource::loadPixmap( "today/config" ); | 48 | QPixmap config = Resource::loadPixmap( "today/config" ); |
49 | // mail icon | ||
50 | QPixmap mail = Resource::loadPixmap( "today/mail" ); | ||
49 | 51 | ||
50 | if ( !name ) | 52 | |
51 | setName( "TodayBase" ); | 53 | //if ( !name ) |
52 | resize( 223, 307 ); | 54 | // setName( "TodayBase" ); |
55 | //resize( 223, 307 ); | ||
53 | 56 | ||
54 | QVBoxLayout * layout = new QVBoxLayout(this); | 57 | QVBoxLayout * layout = new QVBoxLayout(this); |
55 | 58 | ||
56 | Frame4 = new QFrame( this, "Frame4" ); | 59 | Frame4 = new QFrame( this, "Frame4" ); |
@@ -62,15 +65,15 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
62 | getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); | 65 | getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); |
63 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); | 66 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); |
64 | 67 | ||
65 | DatesButton = new QPushButton (Frame4, "DatesButton" ); | 68 | DatesButton = new QPushButton (Frame4, "DatesButton" ); |
66 | DatesButton->setGeometry( QRect( 2, 10, 36, 32 ) ); | 69 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
67 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 70 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
68 | DatesButton->setPixmap( datebook ); | 71 | DatesButton->setPixmap( datebook ); |
69 | DatesButton->setFlat( TRUE ); | 72 | DatesButton->setFlat( TRUE ); |
70 | 73 | ||
71 | DatesField = new QLabel( Frame4, "DatesField" ); | 74 | DatesField = new QLabel( Frame4, "DatesField" ); |
72 | DatesField->setGeometry( QRect( 40, 10, 203, 120 ) ); | 75 | DatesField->setGeometry( QRect( 40, 4, 203, 120 ) ); |
73 | DatesField->setText( tr( "No appointments today" ) ); | 76 | DatesField->setText( tr( "No appointments today" ) ); |
74 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 77 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
75 | 78 | ||
76 | // today logo | 79 | // today logo |
@@ -108,9 +111,9 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
108 | TodoButton->setPixmap( todo ); | 111 | TodoButton->setPixmap( todo ); |
109 | TodoButton->setFlat( TRUE ); | 112 | TodoButton->setFlat( TRUE ); |
110 | 113 | ||
111 | TodoField = new QLabel( Frame15, "TodoField" ); | 114 | TodoField = new QLabel( Frame15, "TodoField" ); |
112 | TodoField->setGeometry( QRect( 40, 10, 196, 120 ) ); | 115 | TodoField->setGeometry( QRect( 40, 4, 196, 120 ) ); |
113 | TodoField->setFrameShadow( QLabel::Plain ); | 116 | TodoField->setFrameShadow( QLabel::Plain ); |
114 | TodoField->setText( tr( "No current todos" ) ); | 117 | TodoField->setText( tr( "No current todos" ) ); |
115 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 118 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
116 | 119 | ||
@@ -120,14 +123,35 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
120 | PushButton1->setPixmap( config ); | 123 | PushButton1->setPixmap( config ); |
121 | PushButton1->setAutoDefault( TRUE ); | 124 | PushButton1->setAutoDefault( TRUE ); |
122 | PushButton1->setFlat( TRUE ); | 125 | PushButton1->setFlat( TRUE ); |
123 | 126 | ||
127 | |||
128 | MailFrame = new QFrame( this, "MailFrame" ); | ||
129 | MailFrame->setFrameShape( QScrollView::StyledPanel ); | ||
130 | MailFrame->setFrameShadow( QScrollView::Sunken ); | ||
131 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); | ||
132 | |||
133 | MailButton = new QPushButton (MailFrame, "MailButton" ); | ||
134 | MailButton->setGeometry( QRect( 2, 10, 36, 19 ) ); | ||
135 | MailButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | ||
136 | MailButton->setPixmap( mail ); | ||
137 | MailButton->setFlat( TRUE ); | ||
138 | |||
139 | MailField = new QLabel( MailFrame, "DatesField" ); | ||
140 | MailField->setGeometry( QRect( 40, 10, 203, 120 ) ); | ||
141 | MailField->setText( tr( "Opiemail not installed" ) ); | ||
142 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | ||
143 | MailField->setMaximumHeight(15); | ||
144 | MailField->setMinimumHeight(10); | ||
145 | |||
124 | layout->addWidget(Frame); | 146 | layout->addWidget(Frame); |
125 | layout->addWidget(Frame4); | 147 | layout->addWidget(Frame4); |
148 | layout->addWidget(MailFrame); | ||
126 | layout->addWidget(Frame15); | 149 | layout->addWidget(Frame15); |
127 | 150 | ||
128 | layout->setStretchFactor(Frame4,3); | 151 | layout->setStretchFactor(Frame4,4); |
129 | layout->setStretchFactor(Frame15,2); | 152 | layout->setStretchFactor(MailFrame,1); |
153 | layout->setStretchFactor(Frame15,3); | ||
130 | } | 154 | } |
131 | 155 | ||
132 | /* | 156 | /* |
133 | * Destroys the object and frees any allocated resources | 157 | * Destroys the object and frees any allocated resources |