author | zecke <zecke> | 2002-09-10 12:31:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 12:31:45 (UTC) |
commit | f244f5ec5351693d366739cfb7bf509d10601cdf (patch) (side-by-side diff) | |
tree | 93610410c6a6a8d34c8a465e2b55e13c2b6acc9a | |
parent | df13a75ca2c9014c78cb9a6458ceb734e2e0af65 (diff) | |
download | opie-f244f5ec5351693d366739cfb7bf509d10601cdf.zip opie-f244f5ec5351693d366739cfb7bf509d10601cdf.tar.gz opie-f244f5ec5351693d366739cfb7bf509d10601cdf.tar.bz2 |
Fix for QTopia1.6
-rw-r--r-- | libopie/libopie.pro | 19 | ||||
-rw-r--r-- | libopie/odevice.h | 2 | ||||
-rw-r--r-- | libopie/ofileselector.cc | 13 | ||||
-rw-r--r-- | libopie/ofileview.h | 28 | ||||
-rw-r--r-- | libopie/ofontmenu.h | 2 |
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,20 +1,35 @@ 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 \ ../i18n/en/libopie.ts \ ../i18n/es/libopie.ts \ ../i18n/fr/libopie.ts \ ../i18n/hu/libopie.ts \ ../i18n/ja/libopie.ts \ ../i18n/ko/libopie.ts \ ../i18n/no/libopie.ts \ ../i18n/pl/libopie.ts \ diff --git a/libopie/odevice.h b/libopie/odevice.h index 9dda68e..2f676ff 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h @@ -49,34 +49,32 @@ enum OSystem { OSYSTEM_Familiar, OSYSTEM_Zaurus, OSYSTEM_OpenZaurus }; enum OLedState { OLED_Off, OLED_On, OLED_BlinkSlow, OLED_BlinkFast }; class ODevice { public: - -public: static ODevice *inst ( ); // system enum PowerButtonHandler { KERNEL, OPIE }; virtual bool setPowerButtonHandler ( PowerButtonHandler h ); virtual bool suspend ( ); virtual bool setDisplayStatus ( bool on ); virtual bool setDisplayBrightness ( int brightness ); virtual int displayBrightnessResolution ( ) const; // information diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 3c3a6c4..b3aacd6 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -172,38 +172,34 @@ void OFileSelector::setCloseVisible( bool visible ) m_close->show(); } } void OFileSelector::reread() { if( m_selector == NORMAL ){ setNewVisible( m_shNew ); // make it a initializeSelector }else if ( m_selector == EXTENDED || m_selector == EXTENDED_ALL ){ 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(); else m_boxOk->hide(); } void OFileSelector::setToolbarVisible( bool show ) { m_shTool = show; initializeListView(); // FIXME see above waste of memory @@ -313,35 +309,34 @@ QString text; } slotViewCheck( text ); } void OFileSelector::setPopupMenu(QPopupMenu *popup ) { m_custom = popup; m_showPopup = true; } //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 ); } }else { // installed view ; } return name; } QStringList OFileSelector::selectedNames()const { QStringList list; @@ -388,35 +383,33 @@ int OFileSelector::fileCount() count = m_select->fileCount(); break; //case CUSTOM: case EXTENDED: case EXTENDED_ALL: default: count = m_View->childCount(); break; } 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; } return lnk; } QValueList<DocLnk> OFileSelector::selectedDocuments() const { QValueList<DocLnk> docs; docs.append( selectedDocument() ); return docs; } diff --git a/libopie/ofileview.h b/libopie/ofileview.h index ed256f1..e072477 100644 --- a/libopie/ofileview.h +++ b/libopie/ofileview.h @@ -1,60 +1,68 @@ /* =. 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, bool isSymlink = FALSE ) = 0; virtual void addSymlink(const QString &mime, QFileInfo *info, bool isSymlink = FALSE ) = 0; virtual void cd(const QString &path ) = 0; signals: diff --git a/libopie/ofontmenu.h b/libopie/ofontmenu.h index 609f240..5fd515f 100644 --- a/libopie/ofontmenu.h +++ b/libopie/ofontmenu.h @@ -1,21 +1,21 @@ /* =. 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> _;_. .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. : = ...= . :.=- |