summaryrefslogtreecommitdiff
authorzecke <zecke>2002-09-10 12:31:45 (UTC)
committer zecke <zecke>2002-09-10 12:31:45 (UTC)
commitf244f5ec5351693d366739cfb7bf509d10601cdf (patch) (side-by-side diff)
tree93610410c6a6a8d34c8a465e2b55e13c2b6acc9a
parentdf13a75ca2c9014c78cb9a6458ceb734e2e0af65 (diff)
downloadopie-f244f5ec5351693d366739cfb7bf509d10601cdf.zip
opie-f244f5ec5351693d366739cfb7bf509d10601cdf.tar.gz
opie-f244f5ec5351693d366739cfb7bf509d10601cdf.tar.bz2
Fix for QTopia1.6
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/libopie.pro19
-rw-r--r--libopie/odevice.h2
-rw-r--r--libopie/ofileselector.cc13
-rw-r--r--libopie/ofileview.h18
-rw-r--r--libopie/ofontmenu.h2
5 files changed, 34 insertions, 20 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro
index 891c03e..6c47e86 100644
--- a/libopie/libopie.pro
+++ b/libopie/libopie.pro
@@ -1,8 +1,23 @@
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 oclickablelabel.h oprocctrl.h oprocess.h odevice.h otimepicker.h otabwidget.h otabbar.h otabinfo.h
-SOURCES = ofontmenu.cc ofileselector.cc ofiledialog.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp colordialog.cpp colorpopupmenu.cpp oclickablelabel.cpp oprocctrl.cpp oprocess.cpp odevice.cpp otimepicker.cpp otabwidget.cpp otabbar.cpp
+HEADERS = ofontmenu.h ofileselector.h \
+ ofiledialog.h tododb.h \
+ todoevent.h todoresource.h \
+ todovcalresource.h xmltree.h \
+ colordialog.h colorpopupmenu.h \
+ oclickablelabel.h oprocctrl.h \
+ oprocess.h odevice.h \
+ otimepicker.h otabwidget.h \
+ otabbar.h otabinfo.h
+SOURCES = ofontmenu.cc ofileselector.cc \
+ ofiledialog.cc xmltree.cc \
+ tododb.cpp todoevent.cpp \
+ todovcalresource.cpp colordialog.cpp \
+ colorpopupmenu.cpp oclickablelabel.cpp \
+ oprocctrl.cpp oprocess.cpp \
+ odevice.cpp otimepicker.cpp \
+ otabwidget.cpp otabbar.cpp
TARGET = opie
INCLUDEPATH += $(OPIEDIR)/include
DESTDIR = $(QTDIR)/lib$(PROJMAK)
#VERSION = 1.0.0
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 9dda68e..2f676ff 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -61,10 +61,8 @@ enum OLedState {
class ODevice
{
public:
-
-public:
static ODevice *inst ( );
// system
enum PowerButtonHandler {
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 3c3a6c4..b3aacd6 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -184,15 +184,11 @@ void OFileSelector::reread()
}
const DocLnk *OFileSelector::selected()
{
- if( m_selector == NORMAL ){
- return m_select->selected();
- }else{
DocLnk *lnk = new DocLnk(selectedDocument() );
return lnk;
}
-}
void OFileSelector::setYesCancelVisible( bool show )
{
initializeYes(); // FIXME if YesCancel is not shown we will initialize it to hide it :(
@@ -325,11 +321,10 @@ void OFileSelector::setPopupMenu(QPopupMenu *popup )
QString OFileSelector::selectedName() const
{
QString name;
if( m_selector == NORMAL ){
- const DocLnk *lnk = m_select->selected();
- name = lnk->file();
- delete lnk;
+ DocLnk lnk = m_select->selectedDocument();
+ name = lnk.file();
}else if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ){
if ( m_shLne ) {
name = m_currentDir + "/" +m_edit->text();
}else{
@@ -400,11 +395,9 @@ DocLnk OFileSelector::selectedDocument() const
{
DocLnk lnk;
switch( m_selector ){
case NORMAL:{
- const DocLnk *lnk2 = m_select->selected();
- lnk = DocLnk(*lnk2 ); // copy
- delete lnk2;
+ lnk = m_select->selectedDocument();
break;
}
case EXTENDED:
case EXTENDED_ALL:
diff --git a/libopie/ofileview.h b/libopie/ofileview.h
index ed256f1..e072477 100644
--- a/libopie/ofileview.h
+++ b/libopie/ofileview.h
@@ -34,15 +34,23 @@
class QFileInfo;
class QDir;
class DocLnk;
-class OFileSelectorView : public QWidget {
+
+/**
+ * A OFileView is a specialised View for the
+ * OFileSelector
+ * With a View you can chage the user visible
+ * representation of a OFileLister
+ * OFileView is just a basic interface which helps you to
+ * write new views
+ */
+class OFileView {
Q_OBJECT
public:
- OFileSelectorView(QWidget *widget,
- const char *name )
- : QWidget(widget, name )
-{ };
+ OFileView(QWidget *widget,
+ const char *name );
+ virtual OFileView();
virtual ~OFileSelectorView() = 0;
virtual void addFile(const QString &mine,
QFileInfo *info,
diff --git a/libopie/ofontmenu.h b/libopie/ofontmenu.h
index 609f240..5fd515f 100644
--- a/libopie/ofontmenu.h
+++ b/libopie/ofontmenu.h
@@ -1,9 +1,9 @@
/*
               =. This file is part of the OPIE Project
-             .=l. Copyright (c) 2002 zekce <zecke@handhelds.org>
+             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org>
           .>+-=
 _;:,     .>    :=|. This library is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public