-rw-r--r-- | core/pim/datebook/datebook.pro | 4 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.h | 4 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklstdayhdr.ui | 8 | ||||
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 8 | ||||
-rw-r--r-- | core/pim/datebook/opie-datebook.control | 2 | ||||
-rw-r--r-- | core/pim/datebook/timepicker.cpp | 19 | ||||
-rw-r--r-- | core/pim/datebook/timepicker.h | 6 | ||||
-rw-r--r-- | libopie/libopie.pro | 4 | ||||
-rw-r--r-- | libopie/oclickablelabel.cpp (renamed from core/pim/datebook/clickablelabel.cpp) | 18 | ||||
-rw-r--r-- | libopie/oclickablelabel.h (renamed from core/pim/datebook/clickablelabel.h) | 4 |
11 files changed, 40 insertions, 39 deletions
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro index a8a9285..9383053 100644 --- a/core/pim/datebook/datebook.pro +++ b/core/pim/datebook/datebook.pro @@ -10,9 +10,8 @@ HEADERS = datebookday.h \ datebookweek.h \ datebookweeklst.h \ datebookweekheaderimpl.h \ repeatentry.h \ - clickablelabel.h \ timepicker.h SOURCES = main.cpp \ datebookday.cpp \ @@ -23,9 +22,8 @@ SOURCES = main.cpp \ datebookweek.cpp \ datebookweeklst.cpp \ datebookweekheaderimpl.cpp \ repeatentry.cpp \ - clickablelabel.cpp \ timepicker.cpp INTERFACES = dateentry.ui \ datebookdayheader.ui \ @@ -36,9 +34,9 @@ INTERFACES = dateentry.ui \ repeatentrybase.ui INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopie TARGET = datebook TRANSLATIONS = ../i18n/pt_BR/datebook.ts diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 85c745a..8e88377 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp @@ -142,9 +142,9 @@ void DateBookWeekLstDayHdr::newEvent() { DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev, QWidget* parent, const char* name, WFlags fl) : - ClickableLabel(parent,name,fl), + OClickableLabel(parent,name,fl), event(ev) { char s[10]; if ( ev.startDate() != ev.date() ) { // multiday event (not first day) diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h index b0b0417..24f6c83 100644 --- a/core/pim/datebook/datebookweeklst.h +++ b/core/pim/datebook/datebookweeklst.h @@ -9,9 +9,9 @@ #include "datebookweeklstheader.h" #include "datebookweeklstdayhdr.h" -#include "clickablelabel.h" +#include <opie/oclickablelabel.h> class QDateTime; class DateBookDB; @@ -54,9 +54,9 @@ signals: private: QDate date; }; -class DateBookWeekLstEvent: public ClickableLabel +class DateBookWeekLstEvent: public OClickableLabel { Q_OBJECT public: DateBookWeekLstEvent(const EffectiveEvent &ev, diff --git a/core/pim/datebook/datebookweeklstdayhdr.ui b/core/pim/datebook/datebookweeklstdayhdr.ui index 2b68754..9499726 100644 --- a/core/pim/datebook/datebookweeklstdayhdr.ui +++ b/core/pim/datebook/datebookweeklstdayhdr.ui @@ -59,9 +59,9 @@ <enum>Horizontal</enum> </property> </widget> <widget> - <class>ClickableLabel</class> + <class>OClickableLabel</class> <property stdset="1"> <name>name</name> <cstring>label</cstring> </property> @@ -104,9 +104,9 @@ <enum>Horizontal</enum> </property> </widget> <widget> - <class>ClickableLabel</class> + <class>OClickableLabel</class> <property stdset="1"> <name>name</name> <cstring>add</cstring> </property> @@ -121,10 +121,10 @@ </hbox> </widget> <customwidgets> <customwidget> - <class>ClickableLabel</class> - <header location="local">clickablelabel.h</header> + <class>OClickableLabel</class> + <header location="global">opie/oclickablelabel.h</header> <sizehint> <width>-1</width> <height>-1</height> </sizehint> diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index e14e2f5..c4f6c68 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -42,8 +42,9 @@ #include "timepicker.h" #include <stdlib.h> +#include <stdio.h> /* * Constructs a DateEntry which is a child of 'parent', with the * name 'name' and widget flags set to 'f' @@ -56,9 +57,10 @@ DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, const QDateTime &end, bool whichClock, QWidget* parent, const char* name ) : DateEntryBase( parent, name ), ampm( whichClock ), - startWeekOnMonday( startOnMonday ) + startWeekOnMonday( startOnMonday ), + m_showStart(true) { init(); setDates(start,end); setFocusProxy(comboDescription); @@ -112,9 +114,11 @@ static void addOrPick( QComboBox* combo, const QString& t ) DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, QWidget* parent, const char* name ) : DateEntryBase( parent, name ), ampm( whichClock ), - startWeekOnMonday( startOnMonday ) + startWeekOnMonday( startOnMonday ), + m_showStart(true) + { init(); setDates(event.start(),event.end()); comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") ); diff --git a/core/pim/datebook/opie-datebook.control b/core/pim/datebook/opie-datebook.control index 6566d50..9bef119 100644 --- a/core/pim/datebook/opie-datebook.control +++ b/core/pim/datebook/opie-datebook.control @@ -3,7 +3,7 @@ Priority: optional Section: opie/applications Maintainer: Warwick Allison <warwick@trolltech.com> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION -Depends: opie-base ($QPE_VERSION) +Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) Description: A datebook/appointment manager A datebook/appointment manager for the Opie environment. diff --git a/core/pim/datebook/timepicker.cpp b/core/pim/datebook/timepicker.cpp index 43e05ad..f2cb71d 100644 --- a/core/pim/datebook/timepicker.cpp +++ b/core/pim/datebook/timepicker.cpp @@ -2,9 +2,8 @@ #include <qbuttongroup.h> #include <qtoolbutton.h> #include <qlayout.h> -#include "clickablelabel.h" #include <qstring.h> #include <stdio.h> TimePicker::TimePicker(QWidget* parent, const char* name, @@ -12,9 +11,9 @@ TimePicker::TimePicker(QWidget* parent, const char* name, QWidget(parent,name,fl) { QVBoxLayout *vbox=new QVBoxLayout(this); - ClickableLabel *r; + OClickableLabel *r; QString s; // Hour Row QWidget *row=new QWidget(this); @@ -22,9 +21,9 @@ TimePicker::TimePicker(QWidget* parent, const char* name, vbox->addWidget(row); for (int i=0; i<24; i++) { - r=new ClickableLabel(row); + r=new OClickableLabel(row); hourLst.append(r); s.sprintf("%.2d",i); r->setText(s); r->setToggleButton(true); @@ -45,9 +44,9 @@ TimePicker::TimePicker(QWidget* parent, const char* name, l=new QHBoxLayout(row); vbox->addWidget(row); for (int i=0; i<60; i+=5) { - r=new ClickableLabel(row); + r=new OClickableLabel(row); minuteLst.append(r); s.sprintf("%.2d",i); r->setText(s); r->setToggleButton(true); @@ -59,12 +58,12 @@ TimePicker::TimePicker(QWidget* parent, const char* name, } void TimePicker::slotHour(bool b) { - ClickableLabel *r = (ClickableLabel *) sender(); + OClickableLabel *r = (OClickableLabel *) sender(); if (b) { - QValueListIterator<ClickableLabel *> it; + QValueListIterator<OClickableLabel *> it; for (it=hourLst.begin(); it!=hourLst.end(); it++) { if (*it != r) (*it)->setOn(false); else tm.setHMS((*it)->text().toInt(), tm.minute(), 0); } @@ -76,12 +75,12 @@ void TimePicker::slotHour(bool b) { } void TimePicker::slotMinute(bool b) { - ClickableLabel *r = (ClickableLabel *) sender(); + OClickableLabel *r = (OClickableLabel *) sender(); if (b) { - QValueListIterator<ClickableLabel *> it; + QValueListIterator<OClickableLabel *> it; for (it=minuteLst.begin(); it!=minuteLst.end(); it++) { if (*it != r) (*it)->setOn(false); else tm.setHMS(tm.hour(),(*it)->text().toInt(), 0); } @@ -96,9 +95,9 @@ void TimePicker::setMinute(int m) { QString minute; minute.sprintf("%.2d",m); - QValueListIterator<ClickableLabel *> it; + QValueListIterator<OClickableLabel *> it; for (it=minuteLst.begin(); it!=minuteLst.end(); it++) { if ((*it)->text() == minute) (*it)->setOn(true); else (*it)->setOn(false); } @@ -110,9 +109,9 @@ void TimePicker::setHour(int h) { QString hour; hour.sprintf("%.2d",h); - QValueListIterator<ClickableLabel *> it; + QValueListIterator<OClickableLabel *> it; for (it=hourLst.begin(); it!=hourLst.end(); it++) { if ((*it)->text() == hour) (*it)->setOn(true); else (*it)->setOn(false); } diff --git a/core/pim/datebook/timepicker.h b/core/pim/datebook/timepicker.h index 0acadcb..1c35600 100644 --- a/core/pim/datebook/timepicker.h +++ b/core/pim/datebook/timepicker.h @@ -2,9 +2,9 @@ #define TIMEPICKER_H #include <qwidget.h> #include <qvaluelist.h> -#include "clickablelabel.h" +#include <opie/oclickablelabel.h> #include <qdatetime.h> class TimePicker: public QWidget { Q_OBJECT @@ -15,10 +15,10 @@ class TimePicker: public QWidget { void setHour(int h); void setMinute(int m); private: - QValueList<ClickableLabel *> hourLst; - QValueList<ClickableLabel *> minuteLst; + QValueList<OClickableLabel *> hourLst; + QValueList<OClickableLabel *> minuteLst; QTime tm; private slots: void slotHour(bool b); diff --git a/libopie/libopie.pro b/libopie/libopie.pro index ba64bda..337206a 100644 --- a/libopie/libopie.pro +++ b/libopie/libopie.pro @@ -1,8 +1,8 @@ TEMPLATE = lib CONFIG += qte warn_on release -HEADERS = ofontmenu.h ofileselector.h ofiledialog.h ofileview.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h colordialog.h colorpopupmenu.h -SOURCES = ofontmenu.cc ofileselector.cc ofiledialog.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp colordialog.cpp colorpopupmenu.cpp +HEADERS = ofontmenu.h ofileselector.h ofiledialog.h ofileview.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h colordialog.h colorpopupmenu.h oclickablelabel.h +SOURCES = ofontmenu.cc ofileselector.cc ofiledialog.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp colordialog.cpp colorpopupmenu.cpp oclickablelabel.cpp TARGET = opie INCLUDEPATH += $(OPIEDIR)/include DESTDIR = $(QTDIR)/lib$(PROJMAK) #VERSION = 1.0.0 diff --git a/core/pim/datebook/clickablelabel.cpp b/libopie/oclickablelabel.cpp index 128bebb..43a0524 100644 --- a/core/pim/datebook/clickablelabel.cpp +++ b/libopie/oclickablelabel.cpp @@ -1,8 +1,8 @@ -#include "clickablelabel.h" +#include "oclickablelabel.h" #include <stdio.h> -ClickableLabel::ClickableLabel(QWidget* parent, +OClickableLabel::OClickableLabel(QWidget* parent, const char* name, WFlags fl) : QLabel(parent,name,fl) { @@ -12,21 +12,21 @@ ClickableLabel::ClickableLabel(QWidget* parent, showState(false); setFrameShadow(Sunken); } -void ClickableLabel::setToggleButton(bool t) { +void OClickableLabel::setToggleButton(bool t) { isToggle=t; } -void ClickableLabel::mousePressEvent( QMouseEvent *e ) { +void OClickableLabel::mousePressEvent( QMouseEvent *e ) { if (isToggle && isDown) { showState(false); } else { showState(true); } } -void ClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { +void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { if (rect().contains(e->pos()) && isToggle) isDown=!isDown; if (isToggle && isDown) { showState(true); @@ -41,9 +41,9 @@ void ClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { emit clicked(); } } -void ClickableLabel::mouseMoveEvent( QMouseEvent *e ) { +void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) { if (rect().contains(e->pos())) { if (isToggle && isDown) { showState(false); } else { @@ -57,9 +57,9 @@ void ClickableLabel::mouseMoveEvent( QMouseEvent *e ) { } } } -void ClickableLabel::showState(bool on) { +void OClickableLabel::showState(bool on) { if (on) { //setFrameShape(Panel); setInverted(true); setBackgroundMode(PaletteHighlight); @@ -70,9 +70,9 @@ void ClickableLabel::showState(bool on) { } repaint(); } -void ClickableLabel::setInverted(bool on) { +void OClickableLabel::setInverted(bool on) { if ( (!textInverted && on) || (textInverted && !on) ) { QPalette pal=palette(); QColor col=pal.color(QPalette::Normal, QColorGroup::Foreground); col.setRgb(255-col.red(),255-col.green(),255-col.blue()); @@ -81,8 +81,8 @@ void ClickableLabel::setInverted(bool on) { textInverted=!textInverted; } } -void ClickableLabel::setOn(bool on) { +void OClickableLabel::setOn(bool on) { isDown=on; showState(isDown); } diff --git a/core/pim/datebook/clickablelabel.h b/libopie/oclickablelabel.h index d00fee6..f65c440 100644 --- a/core/pim/datebook/clickablelabel.h +++ b/libopie/oclickablelabel.h @@ -2,13 +2,13 @@ #define CLICKABLELABEL #include <qlabel.h> -class ClickableLabel: public QLabel +class OClickableLabel: public QLabel { Q_OBJECT public: - ClickableLabel(QWidget* parent = 0, const char* name = 0, + OClickableLabel(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); void setToggleButton(bool t); protected: void mousePressEvent( QMouseEvent *e ); |