summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookdayallday.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/datebookdayallday.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookdayallday.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp
index 1244fd3..d43d31a 100644
--- a/core/pim/datebook/datebookdayallday.cpp
+++ b/core/pim/datebook/datebookdayallday.cpp
@@ -1,72 +1,62 @@
1/**************************************************************************** 1/****************************************************************************
2** GPL by Rajko Albrecht 2** GPL by Rajko Albrecht
3** 3**
4** 4**
5** 5**
6** 6**
7** 7**
8****************************************************************************/ 8****************************************************************************/
9#include "datebookdayallday.h" 9#include "datebookdayallday.h"
10 10
11#include <qpushbutton.h>
12#include <qlayout.h> 11#include <qlayout.h>
13#include <qvariant.h>
14#include <qtooltip.h>
15#include <qwhatsthis.h>
16#include <qobjectlist.h>
17#include <qpe/event.h>
18#include <qpe/ir.h> 12#include <qpe/ir.h>
19#include <qpe/datebookdb.h>
20#include <qpe/resource.h>
21#include <qpopupmenu.h> 13#include <qpopupmenu.h>
22#include <qtimer.h> 14#include <qtimer.h>
23#include <qregexp.h>
24#include <qdatetime.h>
25 15
26#include "datebookday.h" 16#include "datebookday.h"
27 17
28/* 18/*
29 * Constructs a DatebookdayAllday which is a child of 'parent', with the 19 * Constructs a DatebookdayAllday which is a child of 'parent', with the
30 * name 'name' and widget flags set to 'f' 20 * name 'name' and widget flags set to 'f'
31 */ 21 */
32DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const char* name, WFlags ) 22DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const char* name, WFlags )
33 : QScrollView( parent, name ),item_count(0),dateBook(db) 23 : QScrollView( parent, name ),item_count(0),dateBook(db)
34{ 24{
35 if ( !name ) 25 if ( !name )
36 setName( "DatebookdayAllday" ); 26 setName( "DatebookdayAllday" );
37 setMinimumSize( QSize( 0, 0 ) ); 27 setMinimumSize( QSize( 0, 0 ) );
38 setMaximumHeight(3* (QFontMetrics(font()).height()+4) ); 28 setMaximumHeight(3* (QFontMetrics(font()).height()+4) );
39 29
40 m_MainFrame = new QFrame(viewport()); 30 m_MainFrame = new QFrame(viewport());
41 m_MainFrame->setFrameStyle(QFrame::NoFrame|QFrame::Plain); 31 m_MainFrame->setFrameStyle(QFrame::NoFrame|QFrame::Plain);
42 setFrameStyle(QFrame::NoFrame|QFrame::Plain); 32 setFrameStyle(QFrame::NoFrame|QFrame::Plain);
43 setResizePolicy( QScrollView::Default ); 33 setResizePolicy( QScrollView::Default );
44 setHScrollBarMode( AlwaysOff ); 34 setHScrollBarMode( AlwaysOff );
45 addChild(m_MainFrame); 35 addChild(m_MainFrame);
46 36
47 datebookdayalldayLayout = new QVBoxLayout( m_MainFrame ); 37 datebookdayalldayLayout = new QVBoxLayout( m_MainFrame );
48 datebookdayalldayLayout->setSpacing( 0 ); 38 datebookdayalldayLayout->setSpacing( 0 );
49 datebookdayalldayLayout->setMargin( 0 ); 39 datebookdayalldayLayout->setMargin( 0 );
50 40
51 lblDesc = new DatebookEventDesc(parent->parentWidget(),""); 41 lblDesc = new DatebookEventDesc(parent->parentWidget(),"");
52 lblDesc->setBackgroundColor(Qt::yellow); 42 lblDesc->setBackgroundColor(Qt::yellow);
53 lblDesc->hide(); 43 lblDesc->hide();
54 subWidgets.setAutoDelete(true); 44 subWidgets.setAutoDelete(true);
55} 45}
56 46
57/* 47/*
58 * Destroys the object and frees any allocated resources 48 * Destroys the object and frees any allocated resources
59 */ 49 */
60DatebookdayAllday::~DatebookdayAllday() 50DatebookdayAllday::~DatebookdayAllday()
61{ 51{
62 // no need to delete child widgets, Qt does it all for us 52 // no need to delete child widgets, Qt does it all for us
63} 53}
64 54
65DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev) 55DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev)
66{ 56{
67 DatebookAlldayDisp * lb; 57 DatebookAlldayDisp * lb;
68 lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL); 58 lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL);
69 lb->show(); 59 lb->show();
70 datebookdayalldayLayout->addWidget(lb); 60 datebookdayalldayLayout->addWidget(lb);
71 subWidgets.append(lb); 61 subWidgets.append(lb);
72 62