summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore 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.h28
-rw-r--r--libopie/ofontmenu.h2
5 files changed, 39 insertions, 25 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro
index 891c03e..6c47e86 100644
--- a/libopie/libopie.pro
+++ b/libopie/libopie.pro
@@ -1,12 +1,27 @@
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
INTERFACES = otimepickerbase.ui
TRANSLATIONS = ../i18n/de/libopie.ts \
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 9dda68e..2f676ff 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -57,18 +57,16 @@ enum OLedState {
OLED_BlinkSlow,
OLED_BlinkFast
};
class ODevice
{
public:
-
-public:
static ODevice *inst ( );
// system
enum PowerButtonHandler {
KERNEL,
OPIE
};
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 3c3a6c4..b3aacd6 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -180,22 +180,18 @@ void OFileSelector::reread()
reparse();
//}else{
//;
}
}
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 :(
m_shYesNo = show;
if( m_shYesNo )
m_boxOk->show();
@@ -321,19 +317,18 @@ void OFileSelector::setPopupMenu(QPopupMenu *popup )
}
//void OFileSelector::updateL
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{
QListViewItem *item = m_View->currentItem();
if( item != 0 )
name = m_currentDir + "/" + item->text( 1 );
}
@@ -396,19 +391,17 @@ int OFileSelector::fileCount()
}
return count;
}
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:
default:
lnk = DocLnk( selectedName() ); // new DocLnk
break;
}
diff --git a/libopie/ofileview.h b/libopie/ofileview.h
index ed256f1..e072477 100644
--- a/libopie/ofileview.h
+++ b/libopie/ofileview.h
@@ -1,52 +1,60 @@
/*
               =. This file is part of the OPIE Project
             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org>
           .>+-=
- _;:,     .>    :=|. This library is free software; you can
+ _;:,     .>    :=|. 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
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This library is distributed in the hope that
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This library is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
- :     =  ...= . :.=-
+ :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef ofileview_h
#define ofileview_h
#include <qobject.h>
#include <qwidget.h>
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,
bool isSymlink = FALSE ) = 0;
virtual void addDir (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,13 +1,13 @@
/*
               =. 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
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.