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 /libopie | |
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 | 18 | ||||
-rw-r--r-- | libopie/ofontmenu.h | 2 |
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,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,23 +180,19 @@ 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(); else @@ -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 @@ -30,23 +30,31 @@ #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> _;_. |