summaryrefslogtreecommitdiff
authorhakan <hakan>2002-05-07 10:43:49 (UTC)
committer hakan <hakan>2002-05-07 10:43:49 (UTC)
commitcfe30703da090180b66bc571e85654c71a7ee8e0 (patch) (side-by-side diff)
treed6954140f2208becb9a6beb5b8a21529bfd5bceb
parentc9849cc04b668f1cda7a16d868299c436d1de042 (diff)
downloadopie-cfe30703da090180b66bc571e85654c71a7ee8e0.zip
opie-cfe30703da090180b66bc571e85654c71a7ee8e0.tar.gz
opie-cfe30703da090180b66bc571e85654c71a7ee8e0.tar.bz2
Moved ClickableLabel to libopie/OClickableLabel
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.pro4
-rw-r--r--core/pim/datebook/datebookweeklst.cpp2
-rw-r--r--core/pim/datebook/datebookweeklst.h4
-rw-r--r--core/pim/datebook/datebookweeklstdayhdr.ui8
-rw-r--r--core/pim/datebook/dateentryimpl.cpp8
-rw-r--r--core/pim/datebook/opie-datebook.control2
-rw-r--r--core/pim/datebook/timepicker.cpp19
-rw-r--r--core/pim/datebook/timepicker.h6
-rw-r--r--libopie/libopie.pro4
-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
@@ -12,5 +12,4 @@ HEADERS = datebookday.h \
datebookweekheaderimpl.h \
repeatentry.h \
- clickablelabel.h \
timepicker.h
@@ -25,5 +24,4 @@ SOURCES = main.cpp \
datebookweekheaderimpl.cpp \
repeatentry.cpp \
- clickablelabel.cpp \
timepicker.cpp
@@ -38,5 +36,5 @@ INTERFACES = dateentry.ui \
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopie
TARGET = datebook
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
@@ -144,5 +144,5 @@ DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev,
const char* name,
WFlags fl) :
- ClickableLabel(parent,name,fl),
+ OClickableLabel(parent,name,fl),
event(ev)
{
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
@@ -11,5 +11,5 @@
#include "datebookweeklstdayhdr.h"
-#include "clickablelabel.h"
+#include <opie/oclickablelabel.h>
class QDateTime;
@@ -56,5 +56,5 @@ private:
};
-class DateBookWeekLstEvent: public ClickableLabel
+class DateBookWeekLstEvent: public OClickableLabel
{
Q_OBJECT
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
@@ -61,5 +61,5 @@
</widget>
<widget>
- <class>ClickableLabel</class>
+ <class>OClickableLabel</class>
<property stdset="1">
<name>name</name>
@@ -106,5 +106,5 @@
</widget>
<widget>
- <class>ClickableLabel</class>
+ <class>OClickableLabel</class>
<property stdset="1">
<name>name</name>
@@ -123,6 +123,6 @@
<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>
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
@@ -44,4 +44,5 @@
#include <stdlib.h>
+#include <stdio.h>
/*
@@ -58,5 +59,6 @@ DateEntry::DateEntry( bool startOnMonday, const QDateTime &start,
: DateEntryBase( parent, name ),
ampm( whichClock ),
- startWeekOnMonday( startOnMonday )
+ startWeekOnMonday( startOnMonday ),
+ m_showStart(true)
{
init();
@@ -114,5 +116,7 @@ DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock,
: DateEntryBase( parent, name ),
ampm( whichClock ),
- startWeekOnMonday( startOnMonday )
+ startWeekOnMonday( startOnMonday ),
+ m_showStart(true)
+
{
init();
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
@@ -5,5 +5,5 @@ 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
@@ -4,5 +4,4 @@
#include <qtoolbutton.h>
#include <qlayout.h>
-#include "clickablelabel.h"
#include <qstring.h>
#include <stdio.h>
@@ -14,5 +13,5 @@ TimePicker::TimePicker(QWidget* parent, const char* name,
QVBoxLayout *vbox=new QVBoxLayout(this);
- ClickableLabel *r;
+ OClickableLabel *r;
QString s;
@@ -24,5 +23,5 @@ TimePicker::TimePicker(QWidget* parent, const char* name,
for (int i=0; i<24; i++) {
- r=new ClickableLabel(row);
+ r=new OClickableLabel(row);
hourLst.append(r);
s.sprintf("%.2d",i);
@@ -47,5 +46,5 @@ TimePicker::TimePicker(QWidget* parent, const char* name,
for (int i=0; i<60; i+=5) {
- r=new ClickableLabel(row);
+ r=new OClickableLabel(row);
minuteLst.append(r);
s.sprintf("%.2d",i);
@@ -61,8 +60,8 @@ 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);
@@ -78,8 +77,8 @@ 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);
@@ -98,5 +97,5 @@ void TimePicker::setMinute(int m) {
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);
@@ -112,5 +111,5 @@ void TimePicker::setHour(int h) {
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);
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
@@ -4,5 +4,5 @@
#include <qwidget.h>
#include <qvaluelist.h>
-#include "clickablelabel.h"
+#include <opie/oclickablelabel.h>
#include <qdatetime.h>
@@ -17,6 +17,6 @@ class TimePicker: public QWidget {
private:
- QValueList<ClickableLabel *> hourLst;
- QValueList<ClickableLabel *> minuteLst;
+ QValueList<OClickableLabel *> hourLst;
+ QValueList<OClickableLabel *> minuteLst;
QTime tm;
diff --git a/libopie/libopie.pro b/libopie/libopie.pro
index ba64bda..337206a 100644
--- a/libopie/libopie.pro
+++ b/libopie/libopie.pro
@@ -1,6 +1,6 @@
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
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,6 +1,6 @@
-#include "clickablelabel.h"
+#include "oclickablelabel.h"
#include <stdio.h>
-ClickableLabel::ClickableLabel(QWidget* parent,
+OClickableLabel::OClickableLabel(QWidget* parent,
const char* name,
WFlags fl) :
@@ -14,9 +14,9 @@ ClickableLabel::ClickableLabel(QWidget* parent,
}
-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);
@@ -26,5 +26,5 @@ void ClickableLabel::mousePressEvent( QMouseEvent *e ) {
}
-void ClickableLabel::mouseReleaseEvent( QMouseEvent *e ) {
+void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) {
if (rect().contains(e->pos()) && isToggle) isDown=!isDown;
@@ -43,5 +43,5 @@ void ClickableLabel::mouseReleaseEvent( QMouseEvent *e ) {
}
-void ClickableLabel::mouseMoveEvent( QMouseEvent *e ) {
+void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) {
if (rect().contains(e->pos())) {
if (isToggle && isDown) {
@@ -59,5 +59,5 @@ void ClickableLabel::mouseMoveEvent( QMouseEvent *e ) {
}
-void ClickableLabel::showState(bool on) {
+void OClickableLabel::showState(bool on) {
if (on) {
//setFrameShape(Panel);
@@ -72,5 +72,5 @@ void ClickableLabel::showState(bool on) {
}
-void ClickableLabel::setInverted(bool on) {
+void OClickableLabel::setInverted(bool on) {
if ( (!textInverted && on) || (textInverted && !on) ) {
QPalette pal=palette();
@@ -83,5 +83,5 @@ void ClickableLabel::setInverted(bool on) {
}
-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
@@ -4,9 +4,9 @@
#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);