summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (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,7 +1,22 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qte warn_on release 2CONFIG += qte warn_on release
3HEADERS = 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 3HEADERS = ofontmenu.h ofileselector.h \
4SOURCES = 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 4 ofiledialog.h tododb.h \
5 todoevent.h todoresource.h \
6 todovcalresource.h xmltree.h \
7 colordialog.h colorpopupmenu.h \
8 oclickablelabel.h oprocctrl.h \
9 oprocess.h odevice.h \
10 otimepicker.h otabwidget.h \
11 otabbar.h otabinfo.h
12SOURCES = ofontmenu.cc ofileselector.cc \
13 ofiledialog.cc xmltree.cc \
14 tododb.cpp todoevent.cpp \
15 todovcalresource.cpp colordialog.cpp \
16 colorpopupmenu.cpp oclickablelabel.cpp \
17 oprocctrl.cpp oprocess.cpp \
18 odevice.cpp otimepicker.cpp \
19 otabwidget.cpp otabbar.cpp
5TARGET = opie 20TARGET = opie
6INCLUDEPATH += $(OPIEDIR)/include 21INCLUDEPATH += $(OPIEDIR)/include
7DESTDIR = $(QTDIR)/lib$(PROJMAK) 22DESTDIR = $(QTDIR)/lib$(PROJMAK)
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 9dda68e..2f676ff 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -62,8 +62,6 @@ enum OLedState {
62class ODevice 62class ODevice
63{ 63{
64public: 64public:
65
66public:
67 static ODevice *inst ( ); 65 static ODevice *inst ( );
68 66
69 // system 67 // system
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 3c3a6c4..b3aacd6 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -185,12 +185,8 @@ void OFileSelector::reread()
185 185
186const DocLnk *OFileSelector::selected() 186const DocLnk *OFileSelector::selected()
187{ 187{
188 if( m_selector == NORMAL ){
189 return m_select->selected();
190 }else{
191 DocLnk *lnk = new DocLnk(selectedDocument() ); 188 DocLnk *lnk = new DocLnk(selectedDocument() );
192 return lnk; 189 return lnk;
193 }
194} 190}
195 191
196void OFileSelector::setYesCancelVisible( bool show ) 192void OFileSelector::setYesCancelVisible( bool show )
@@ -326,9 +322,8 @@ QString OFileSelector::selectedName() const
326{ 322{
327 QString name; 323 QString name;
328 if( m_selector == NORMAL ){ 324 if( m_selector == NORMAL ){
329 const DocLnk *lnk = m_select->selected(); 325 DocLnk lnk = m_select->selectedDocument();
330 name = lnk->file(); 326 name = lnk.file();
331 delete lnk;
332 }else if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ){ 327 }else if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ){
333 if ( m_shLne ) { 328 if ( m_shLne ) {
334 name = m_currentDir + "/" +m_edit->text(); 329 name = m_currentDir + "/" +m_edit->text();
@@ -401,9 +396,7 @@ DocLnk OFileSelector::selectedDocument() const
401 DocLnk lnk; 396 DocLnk lnk;
402 switch( m_selector ){ 397 switch( m_selector ){
403 case NORMAL:{ 398 case NORMAL:{
404 const DocLnk *lnk2 = m_select->selected(); 399 lnk = m_select->selectedDocument();
405 lnk = DocLnk(*lnk2 ); // copy
406 delete lnk2;
407 break; 400 break;
408 } 401 }
409 case EXTENDED: 402 case EXTENDED:
diff --git a/libopie/ofileview.h b/libopie/ofileview.h
index ed256f1..e072477 100644
--- a/libopie/ofileview.h
+++ b/libopie/ofileview.h
@@ -2,24 +2,24 @@
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org> 3             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This library is free software; you can 5 _;:,     .>    :=|. This library is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under 6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 7:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_. 11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This library is distributed in the hope that 12    .i_,=:_.      -<s. This library is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more 17..}^=.=       =       ; Library General Public License for more
18++=   -.     .`     .: details. 18++=   -.     .`     .: details.
19 :     =  ...= . :.=- 19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU 20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = Library General Public License along with 21  -_. . .   )=.  = Library General Public License along with
22    --        :-=` this library; see the file COPYING.LIB. 22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
@@ -35,13 +35,21 @@
35class QFileInfo; 35class QFileInfo;
36class QDir; 36class QDir;
37class DocLnk; 37class DocLnk;
38class OFileSelectorView : public QWidget { 38
39/**
40 * A OFileView is a specialised View for the
41 * OFileSelector
42 * With a View you can chage the user visible
43 * representation of a OFileLister
44 * OFileView is just a basic interface which helps you to
45 * write new views
46 */
47class OFileView {
39 Q_OBJECT 48 Q_OBJECT
40 public: 49 public:
41 OFileSelectorView(QWidget *widget, 50 OFileView(QWidget *widget,
42 const char *name ) 51 const char *name );
43 : QWidget(widget, name ) 52 virtual OFileView();
44{ };
45 virtual ~OFileSelectorView() = 0; 53 virtual ~OFileSelectorView() = 0;
46 54
47 virtual void addFile(const QString &mine, 55 virtual void addFile(const QString &mine,
diff --git a/libopie/ofontmenu.h b/libopie/ofontmenu.h
index 609f240..5fd515f 100644
--- a/libopie/ofontmenu.h
+++ b/libopie/ofontmenu.h
@@ -2,7 +2,7 @@
2/* 2/*
3 3
4               =. This file is part of the OPIE Project 4               =. This file is part of the OPIE Project
5             .=l. Copyright (c) 2002 zekce <zecke@handhelds.org> 5             .=l. Copyright (c) 2002 zecke <zecke@handhelds.org>
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This library is free software; you can 7 _;:,     .>    :=|. This library is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under