author | harlekin <harlekin> | 2002-03-17 14:47:52 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-17 14:47:52 (UTC) |
commit | 31e0537b3406d3e89df6424cded2570d28d61df4 (patch) (unidiff) | |
tree | 7bc5171eabbeb6f8469fdafb963a568e08b71aa1 /core/pim/today/todaybase.cpp | |
parent | 2f18edca6cc3539298deccee89e6f4dd7a2570a2 (diff) | |
download | opie-31e0537b3406d3e89df6424cded2570d28d61df4.zip opie-31e0537b3406d3e89df6424cded2570d28d61df4.tar.gz opie-31e0537b3406d3e89df6424cded2570d28d61df4.tar.bz2 |
new: Owner field with the ability to set any text with a qcop call
Diffstat (limited to 'core/pim/today/todaybase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todaybase.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index 552e2eb..c0b8d34 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -76,82 +76,76 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
76 | Frame->setFrameShadow( QFrame::Raised ); | 76 | Frame->setFrameShadow( QFrame::Raised ); |
77 | Frame->setLineWidth( 0 ); | 77 | Frame->setLineWidth( 0 ); |
78 | Frame->setMaximumHeight(50); | 78 | Frame->setMaximumHeight(50); |
79 | Frame->setMinimumHeight(50); | 79 | Frame->setMinimumHeight(50); |
80 | // date | 80 | // date |
81 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); | 81 | TextLabel1 = new QLabel( Frame, "TextLabel1" ); |
82 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); | 82 | TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); |
83 | QFont TextLabel1_font( TextLabel1->font() ); | 83 | QFont TextLabel1_font( TextLabel1->font() ); |
84 | TextLabel1_font.setBold( TRUE ); | 84 | TextLabel1_font.setBold( TRUE ); |
85 | TextLabel1->setFont( TextLabel1_font ); | 85 | TextLabel1->setFont( TextLabel1_font ); |
86 | TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); | 86 | TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); |
87 | TextLabel1->setTextFormat( RichText ); | 87 | TextLabel1->setTextFormat( RichText ); |
88 | 88 | ||
89 | 89 | OwnerField = new QLabel(this , "Owner" ); | |
90 | OwnerField->setGeometry(QRect(0,0, this->width(), 12 )); | ||
91 | OwnerField->setAlignment(int (QLabel::AlignTop | QLabel::AlignLeft ) ); | ||
92 | OwnerField->setMaximumHeight(12); | ||
93 | |||
90 | // --- dates section --- | 94 | // --- dates section --- |
91 | Frame4 = new QFrame( this, "Frame4" ); | 95 | Frame4 = new QFrame( this, "Frame4" ); |
92 | Frame4->setPalette( pal ); | 96 | Frame4->setPalette( pal ); |
93 | Frame4->setFrameShape( QScrollView::StyledPanel ); | 97 | Frame4->setFrameShape( QScrollView::StyledPanel ); |
94 | Frame4->setFrameShadow( QScrollView::Sunken ); | 98 | Frame4->setFrameShadow( QScrollView::Sunken ); |
95 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); | 99 | Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); |
96 | Frame4->setFrameStyle( QFrame::NoFrame ); | 100 | Frame4->setFrameStyle( QFrame::NoFrame ); |
97 | Frame4->setGeometry (QRect( 0, 0, this->width() , this->height()) ); | 101 | Frame4->setGeometry (QRect( 0, 8, this->width() , this->height()) ); |
98 | 102 | ||
99 | // QScrollView* sv1 = new QScrollView( Frame4 ); | ||
100 | sv1 = new QScrollView( Frame4 ); | 103 | sv1 = new QScrollView( Frame4 ); |
101 | sv1->setResizePolicy(QScrollView::AutoOneFit); | 104 | sv1->setResizePolicy(QScrollView::AutoOneFit); |
102 | sv1->setHScrollBarMode( QScrollView::AlwaysOff ); | 105 | sv1->setHScrollBarMode( QScrollView::AlwaysOff ); |
103 | // need to find a better way!!! | 106 | // need to find a better way!!! |
104 | sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) ); | 107 | sv1->setGeometry (QRect( 40, 2, Frame4->width()-40 , (Frame4->height()/3)+20 ) ); |
105 | sv1->setFrameShape(QFrame::NoFrame); | 108 | sv1->setFrameShape(QFrame::NoFrame); |
106 | 109 | ||
107 | DatesButton = new QPushButton (Frame4, "DatesButton" ); | 110 | DatesButton = new QPushButton (Frame4, "DatesButton" ); |
108 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 111 | DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
109 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); | 112 | DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); |
110 | DatesButton->setPalette( pal ); | 113 | DatesButton->setPalette( pal ); |
111 | DatesButton->setPixmap( datebook ); | 114 | DatesButton->setPixmap( datebook ); |
112 | DatesButton->setFlat( TRUE ); | 115 | DatesButton->setFlat( TRUE ); |
113 | 116 | ||
114 | //DatesField = new QLabel( sv1->viewport(), "DatesField" ); | 117 | // --- mail section ---) |
115 | //DatesField = new QVBox(sv1->viewport()); | ||
116 | //QWidget *dummy = new QWidget(sv1->viewport()); | ||
117 | //sv1->addChild(DatesField); | ||
118 | //DatesField->setText( tr( "No appointments today" ) ); | ||
119 | // DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | ||
120 | |||
121 | |||
122 | // --- mail section ---) | ||
123 | MailFrame = new QFrame( this ,"MailFrame" ); | 118 | MailFrame = new QFrame( this ,"MailFrame" ); |
124 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); | 119 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); |
125 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); | 120 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); |
126 | MailFrame->setFrameStyle( QFrame::NoFrame ); | 121 | MailFrame->setFrameStyle( QFrame::NoFrame ); |
127 | 122 | ||
128 | QFrame* Line1 = new QFrame( MailFrame); | 123 | QFrame* Line1 = new QFrame( MailFrame); |
129 | Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); | 124 | Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); |
130 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 125 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
131 | 126 | ||
132 | MailButton = new QPushButton (MailFrame, "MailButton" ); | 127 | MailButton = new QPushButton (MailFrame, "MailButton" ); |
133 | MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); | 128 | MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); |
134 | MailButton->setPalette( pal ); | 129 | MailButton->setPalette( pal ); |
135 | MailButton->setPixmap( mail ); | 130 | MailButton->setPixmap( mail ); |
136 | MailButton->setFlat( TRUE ); | 131 | MailButton->setFlat( TRUE ); |
137 | 132 | ||
138 | MailField = new QLabel( MailFrame, "MailField" ); | 133 | MailField = new QLabel( MailFrame, "MailField" ); |
139 | MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); | 134 | MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); |
140 | MailField->setText( tr( "Opiemail not installed" ) ); | 135 | MailField->setText( tr( "Opiemail not installed" ) ); |
141 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 136 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
142 | MailField->setMaximumHeight(40); | 137 | MailField->setMaximumHeight(40); |
143 | MailField->setMinimumHeight(15); | 138 | MailField->setMinimumHeight(15); |
144 | 139 | ||
145 | |||
146 | // --- todo section -- | 140 | // --- todo section -- |
147 | Frame15 = new QFrame( this, "Frame15" ); | 141 | Frame15 = new QFrame( this, "Frame15" ); |
148 | Frame15->setFrameStyle( QFrame::NoFrame ); | 142 | Frame15->setFrameStyle( QFrame::NoFrame ); |
149 | Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); | 143 | Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); |
150 | 144 | ||
151 | QFrame* Line2 = new QFrame( Frame15); | 145 | QFrame* Line2 = new QFrame( Frame15); |
152 | Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); | 146 | Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); |
153 | Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 147 | Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
154 | 148 | ||
155 | TodoButton = new QPushButton (Frame15, "TodoButton" ); | 149 | TodoButton = new QPushButton (Frame15, "TodoButton" ); |
156 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 150 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
157 | TodoButton->setPalette( pal ); | 151 | TodoButton->setPalette( pal ); |
@@ -170,24 +164,25 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
170 | //TodoField->setText( tr( "No current todos" ) ); | 164 | //TodoField->setText( tr( "No current todos" ) ); |
171 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 165 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
172 | 166 | ||
173 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); | 167 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); |
174 | PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); | 168 | PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); |
175 | PushButton1->setPixmap( config ); | 169 | PushButton1->setPixmap( config ); |
176 | PushButton1->setPalette( pal ); | 170 | PushButton1->setPalette( pal ); |
177 | PushButton1->setAutoDefault( TRUE ); | 171 | PushButton1->setAutoDefault( TRUE ); |
178 | PushButton1->setFlat( TRUE ); | 172 | PushButton1->setFlat( TRUE ); |
179 | 173 | ||
180 | // -- layout -- | 174 | // -- layout -- |
181 | layout->addWidget(Frame); | 175 | layout->addWidget(Frame); |
176 | layout->addWidget(OwnerField); | ||
182 | layout->addWidget(Frame4); | 177 | layout->addWidget(Frame4); |
183 | layout->addWidget(MailFrame); | 178 | layout->addWidget(MailFrame); |
184 | layout->addWidget(Frame15); | 179 | layout->addWidget(Frame15); |
185 | 180 | ||
186 | layout->setStretchFactor(Frame4,5); | 181 | layout->setStretchFactor(Frame4,5); |
187 | layout->setStretchFactor(MailFrame,1); | 182 | layout->setStretchFactor(MailFrame,1); |
188 | layout->setStretchFactor(Frame15,4); | 183 | layout->setStretchFactor(Frame15,4); |
189 | } | 184 | } |
190 | 185 | ||
191 | /* | 186 | /* |
192 | * Destroys the object and frees any allocated resources | 187 | * Destroys the object and frees any allocated resources |
193 | */ | 188 | */ |