author | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
commit | 0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff) | |
tree | 503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /core/pim/datebook/datebookdayallday.cpp | |
parent | a0981652d61776d70f25980f035748b21339e946 (diff) | |
download | opie-0d59c780513da78033f4d9040475dee9db0256d4.zip opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2 |
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you
can check the diff (but it had compiled and run here)
Diffstat (limited to 'core/pim/datebook/datebookdayallday.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookdayallday.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp index d43d31a..a0aefd3 100644 --- a/core/pim/datebook/datebookdayallday.cpp +++ b/core/pim/datebook/datebookdayallday.cpp | |||
@@ -15,97 +15,97 @@ | |||
15 | 15 | ||
16 | #include "datebookday.h" | 16 | #include "datebookday.h" |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Constructs a DatebookdayAllday which is a child of 'parent', with the | 19 | * Constructs a DatebookdayAllday which is a child of 'parent', with the |
20 | * name 'name' and widget flags set to 'f' | 20 | * name 'name' and widget flags set to 'f' |
21 | */ | 21 | */ |
22 | DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const char* name, WFlags ) | 22 | DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const char* name, WFlags ) |
23 | : QScrollView( parent, name ),item_count(0),dateBook(db) | 23 | : QScrollView( parent, name ),item_count(0),dateBook(db) |
24 | { | 24 | { |
25 | if ( !name ) | 25 | if ( !name ) |
26 | setName( "DatebookdayAllday" ); | 26 | setName( "DatebookdayAllday" ); |
27 | setMinimumSize( QSize( 0, 0 ) ); | 27 | setMinimumSize( QSize( 0, 0 ) ); |
28 | setMaximumHeight(3* (QFontMetrics(font()).height()+4) ); | 28 | setMaximumHeight(3* (QFontMetrics(font()).height()+4) ); |
29 | 29 | ||
30 | m_MainFrame = new QFrame(viewport()); | 30 | m_MainFrame = new QFrame(viewport()); |
31 | m_MainFrame->setFrameStyle(QFrame::NoFrame|QFrame::Plain); | 31 | m_MainFrame->setFrameStyle(QFrame::NoFrame|QFrame::Plain); |
32 | setFrameStyle(QFrame::NoFrame|QFrame::Plain); | 32 | setFrameStyle(QFrame::NoFrame|QFrame::Plain); |
33 | setResizePolicy( QScrollView::Default ); | 33 | setResizePolicy( QScrollView::Default ); |
34 | setHScrollBarMode( AlwaysOff ); | 34 | setHScrollBarMode( AlwaysOff ); |
35 | addChild(m_MainFrame); | 35 | addChild(m_MainFrame); |
36 | 36 | ||
37 | datebookdayalldayLayout = new QVBoxLayout( m_MainFrame ); | 37 | datebookdayalldayLayout = new QVBoxLayout( m_MainFrame ); |
38 | datebookdayalldayLayout->setSpacing( 0 ); | 38 | datebookdayalldayLayout->setSpacing( 0 ); |
39 | datebookdayalldayLayout->setMargin( 0 ); | 39 | datebookdayalldayLayout->setMargin( 0 ); |
40 | 40 | ||
41 | lblDesc = new DatebookEventDesc(parent->parentWidget(),""); | 41 | lblDesc = new DatebookEventDesc(parent->parentWidget(),""); |
42 | lblDesc->setBackgroundColor(Qt::yellow); | 42 | lblDesc->setBackgroundColor(Qt::yellow); |
43 | lblDesc->hide(); | 43 | lblDesc->hide(); |
44 | subWidgets.setAutoDelete(true); | 44 | subWidgets.setAutoDelete(true); |
45 | } | 45 | } |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Destroys the object and frees any allocated resources | 48 | * Destroys the object and frees any allocated resources |
49 | */ | 49 | */ |
50 | DatebookdayAllday::~DatebookdayAllday() | 50 | DatebookdayAllday::~DatebookdayAllday() |
51 | { | 51 | { |
52 | // 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 |
53 | } | 53 | } |
54 | 54 | ||
55 | DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev) | 55 | DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev) |
56 | { | 56 | { |
57 | DatebookAlldayDisp * lb; | 57 | DatebookAlldayDisp * lb; |
58 | lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL); | 58 | lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL); |
59 | lb->show(); | 59 | lb->show(); |
60 | datebookdayalldayLayout->addWidget(lb); | 60 | datebookdayalldayLayout->addWidget(lb); |
61 | subWidgets.append(lb); | 61 | subWidgets.append(lb); |
62 | 62 | ||
63 | connect(lb,SIGNAL(displayMe(const Event &)),lblDesc,SLOT(disp_event(const Event&))); | 63 | connect(lb,SIGNAL(displayMe(const Event&)),lblDesc,SLOT(disp_event(const Event&))); |
64 | ++item_count; | 64 | ++item_count; |
65 | 65 | ||
66 | return lb; | 66 | return lb; |
67 | } | 67 | } |
68 | 68 | ||
69 | void DatebookdayAllday::removeAllEvents() | 69 | void DatebookdayAllday::removeAllEvents() |
70 | { | 70 | { |
71 | subWidgets.clear(); | 71 | subWidgets.clear(); |
72 | item_count = 0; | 72 | item_count = 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | DatebookAlldayDisp::DatebookAlldayDisp(DateBookDB *db,const EffectiveEvent& ev, | 75 | DatebookAlldayDisp::DatebookAlldayDisp(DateBookDB *db,const EffectiveEvent& ev, |
76 | QWidget* parent,const char* name,WFlags f) | 76 | QWidget* parent,const char* name,WFlags f) |
77 | : QLabel(parent,name,f),m_Ev(ev),dateBook(db) | 77 | : QLabel(parent,name,f),m_Ev(ev),dateBook(db) |
78 | { | 78 | { |
79 | QString strDesc = m_Ev.description(); | 79 | QString strDesc = m_Ev.description(); |
80 | strDesc = strDesc.replace(QRegExp("<"),"<"); | 80 | strDesc = strDesc.replace(QRegExp("<"),"<"); |
81 | setBackgroundColor(yellow); | 81 | setBackgroundColor(yellow); |
82 | setText(strDesc); | 82 | setText(strDesc); |
83 | setFrameStyle(QFrame::Raised|QFrame::Panel); | 83 | setFrameStyle(QFrame::Raised|QFrame::Panel); |
84 | 84 | ||
85 | int s = QFontMetrics(font()).height()+4; | 85 | int s = QFontMetrics(font()).height()+4; |
86 | setMaximumHeight( s ); | 86 | setMaximumHeight( s ); |
87 | setMinimumSize( QSize( 0, s ) ); | 87 | setMinimumSize( QSize( 0, s ) ); |
88 | } | 88 | } |
89 | 89 | ||
90 | DatebookAlldayDisp::~DatebookAlldayDisp() | 90 | DatebookAlldayDisp::~DatebookAlldayDisp() |
91 | { | 91 | { |
92 | } | 92 | } |
93 | 93 | ||
94 | void DatebookAlldayDisp::beam_single_event() | 94 | void DatebookAlldayDisp::beam_single_event() |
95 | { | 95 | { |
96 | // create an Event and beam it... | 96 | // create an Event and beam it... |
97 | /* | 97 | /* |
98 | * Start with the easy stuff. If start and end date is the same we can just use | 98 | * Start with the easy stuff. If start and end date is the same we can just use |
99 | * the values of effective m_Events | 99 | * the values of effective m_Events |
100 | * If it is a multi day m_Event we need to find the real start and end date... | 100 | * If it is a multi day m_Event we need to find the real start and end date... |
101 | */ | 101 | */ |
102 | if ( m_Ev.event().start().date() == m_Ev.event().end().date() ) { | 102 | if ( m_Ev.event().start().date() == m_Ev.event().end().date() ) { |
103 | Event m_Event( m_Ev.event() ); | 103 | Event m_Event( m_Ev.event() ); |
104 | 104 | ||
105 | QDateTime dt( m_Ev.date(), m_Ev.start() ); | 105 | QDateTime dt( m_Ev.date(), m_Ev.start() ); |
106 | m_Event.setStart( dt ); | 106 | m_Event.setStart( dt ); |
107 | 107 | ||
108 | dt.setTime( m_Ev.end() ); | 108 | dt.setTime( m_Ev.end() ); |
109 | m_Event.setEnd( dt ); | 109 | m_Event.setEnd( dt ); |
110 | emit beamMe( m_Event ); | 110 | emit beamMe( m_Event ); |
111 | }else { | 111 | }else { |