author | tille <tille> | 2002-06-28 17:47:22 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-28 17:47:22 (UTC) |
commit | 8a34a47d873d8d767d0a84a828e6724b73295b8d (patch) (side-by-side diff) | |
tree | aa637b0c3de1315a7d8d11f02f730fb5e00fa52d | |
parent | 54ab82774f52332dbbb97de057ee2b1c5d29347d (diff) | |
download | opie-8a34a47d873d8d767d0a84a828e6724b73295b8d.zip opie-8a34a47d873d8d767d0a84a828e6724b73295b8d.tar.gz opie-8a34a47d873d8d767d0a84a828e6724b73295b8d.tar.bz2 |
it's working! now it's got a license -- it's gpl'd
22 files changed, 192 insertions, 22 deletions
diff --git a/noncore/unsupported/oipkg/installdialog.cpp b/noncore/unsupported/oipkg/installdialog.cpp index bb50103..c676e84 100644 --- a/noncore/unsupported/oipkg/installdialog.cpp +++ b/noncore/unsupported/oipkg/installdialog.cpp @@ -1,40 +1,41 @@ -/**************************************************************************** -** Form implementation generated from reading ui file 'installdialog.ui' +/*************************************************************************** ** -** Created: Thu May 2 22:19:02 2002 -** by: The User Interface Compiler (uic) + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * ** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "installdialog.h" #include <qcheckbox.h> #include <qgroupbox.h> #include <qheader.h> #include <qlistview.h> #include <qpushbutton.h> #include <qlayout.h> #include <qvariant.h> #include <qtooltip.h> #include <qwhatsthis.h> InstallDialog::InstallDialog( PackageManagerSettings* s, QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { settings = s; if ( !name ) setName( "InstallDialog" ); resize( 223, 269 ); setCaption( tr( "Install" ) ); InstallDialogLayout = new QGridLayout( this ); InstallDialogLayout->setSpacing( 2 ); InstallDialogLayout->setMargin( 2 ); ListViewPackages = new PackageListView( this,"listViewPackages",settings ); InstallDialogLayout->addWidget( ListViewPackages, 0, 0 ); GroupBoxOptions = new QGroupBox( this, "GroupBoxOptions" ); GroupBoxOptions->setTitle( tr( "Ipkg options" ) ); GroupBoxOptions->setColumnLayout(0, Qt::Vertical ); diff --git a/noncore/unsupported/oipkg/installdialog.h b/noncore/unsupported/oipkg/installdialog.h index 5af2c35..828c8df 100644 --- a/noncore/unsupported/oipkg/installdialog.h +++ b/noncore/unsupported/oipkg/installdialog.h @@ -1,40 +1,43 @@ -/**************************************************************************** -** Form interface generated from reading ui file 'installdialog.ui' +/*************************************************************************** ** -** Created: Thu May 2 22:19:01 2002 -** by: The User Interface Compiler (uic) + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * ** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> + + #ifndef INSTALLDIALOG_H #define INSTALLDIALOG_H #include "pksettings.h" #include "packagelistview.h" #include <qvariant.h> #include <qdialog.h> class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QCheckBox; class QGroupBox; class QListView; class QListViewItem; class InstallDialog : public QDialog { Q_OBJECT public: InstallDialog( PackageManagerSettings* s, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~InstallDialog(); PackageListView* ListViewPackages; QGroupBox* GroupBoxOptions; QCheckBox* _force_depends; QCheckBox* _force_reinstall; QCheckBox* _force_remove; QCheckListItem *toRemoveItem; QCheckListItem *toInstallItem; protected: QGridLayout* InstallDialogLayout; diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 8778b85..084900d 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp @@ -1,33 +1,43 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// Copyright (C) 2000 Trolltech AS. // adadpted form qpe/qipkg +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "mainwindow.h" #include <qpe/qpemenubar.h> #include <qpe/qpemessagebox.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/qpetoolbar.h> #include <qpe/qcopenvelope_qws.h> #include <qaction.h> #include <qmessagebox.h> #include <qpopupmenu.h> #include <qtoolbutton.h> #include <qstring.h> #include <qlabel.h> #include <qfile.h> #include <qlistview.h> #include <qtextview.h> #include <qcheckbox.h> #include <qlineedit.h> #include <qtabwidget.h> #include <qcombobox.h> #include <qmessagebox.h> #include <qpushbutton.h> #include <qlayout.h> #include "pksettingsbase.h" #include "utils.h" #include "packagelistitem.h" diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h index 4a5e8bf..090ddd3 100644 --- a/noncore/unsupported/oipkg/mainwindow.h +++ b/noncore/unsupported/oipkg/mainwindow.h @@ -1,32 +1,44 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// Copyright (C) 2000 Trolltech AS. +// adadpted form qpe/qipkg +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> + #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <qmainwindow.h> #include <qaction.h> #include <qtimer.h> #include <qpopupmenu.h> #include "packagelist.h" #include "packagelistremote.h" #include "packagelistlocal.h" #include "packagelistdoclnk.h" #include "pmipkg.h" #include "pksettings.h" #include "packagelistview.h" class QComboBox; class QPEToolBar; class QLineEdit; class PackageListItem; class QCopChannel; class QMessageBox; class QCheckBox; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); ~MainWindow(); diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 0cd93bf..7aaa240 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "package.h" #include <qpe/process.h> #include <qpe/stringutil.h> #include <qfile.h> #include <qtextstream.h> #include <stdlib.h> #include <unistd.h> #include "debug.h" Package::Package( QObject *parent, const char *name ) : QObject(parent,name) { } Package::~Package() { } Package::Package( PackageManagerSettings *s, QObject *parent, const char *name ) : QObject(parent,name) { Package(parent,name); init(s); } void Package::init( PackageManagerSettings *s ) { settings = s; _size = ""; diff --git a/noncore/unsupported/oipkg/package.h b/noncore/unsupported/oipkg/package.h index 0f76ece..c147420 100644 --- a/noncore/unsupported/oipkg/package.h +++ b/noncore/unsupported/oipkg/package.h @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PK_ITEM_H #define PK_ITEM_H #include <qstring.h> #include <qlistview.h> #include <qpainter.h> #include <qpixmap.h> #include <qdict.h> #include <qobject.h> #include "pksettings.h" class Package : public QObject { Q_OBJECT public: Package(QObject *parent=0, const char *name=0); Package(PackageManagerSettings *s, QObject *parent=0, const char *name=0); ~Package(); Package( QStringList, PackageManagerSettings *s, QObject *parent=0, const char *name=0 ); Package( QString, PackageManagerSettings *s, QObject *parent=0, const char *name=0 ); Package( Package*s, QObject *parent=0, const char *name=0 ); void setValue( QString, QString ); void copyValues( Package* ); QString name(); QString installName(); QString packageName(); bool installed(); bool otherInstalled(); diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index e445570..f6c4c37 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "packagelist.h" #include <assert.h> #include <qfile.h> #include <qfileinfo.h> #include <qtextstream.h> #include "debug.h" static QDict<Package> *packageListAll; static int packageListAllRefCount = 0; PackageList::PackageList(QObject *parent, const char *name) : QObject(parent,name), packageIter( packageList ) { empty=true; if (!packageListAll) packageListAll = new QDict<Package>(); packageListAllRefCount++; sections << "All"; subSections.insert("All", new QStringList() ); QStringList *ss = subSections["All"]; *ss << "All"; aktSection = "All"; aktSubSection = "All"; } PackageList::PackageList( PackageManagerSettings* s, QObject *parent, const char *name) : QObject(parent,name), packageIter( packageList ) { settings = s; PackageList(parent, name); } diff --git a/noncore/unsupported/oipkg/packagelist.h b/noncore/unsupported/oipkg/packagelist.h index 46a00e9..0c13688 100644 --- a/noncore/unsupported/oipkg/packagelist.h +++ b/noncore/unsupported/oipkg/packagelist.h @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PACKAGELIST_H #define PACKAGELIST_H #include <qdict.h> #include "package.h" #include "pksettings.h" #include "debug.h" class PackageList : public QObject { Q_OBJECT public: // static QString all = QObject::tr("All"); PackageList (QObject *parent=0, const char *name=0); PackageList( PackageManagerSettings *s, QObject *parent=0, const char *name=0); virtual ~PackageList(); void insertPackage( Package* ); Package* find( QString ); Package* next(); Package* first(); QStringList getSections(); QStringList getSubSections(); void setSettings( PackageManagerSettings* ); void filterPackages( QString ); Package* getByName( QString ); void clear(); void allPackages(); QDict<Package> *versions; diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp index deb8a6d..76e91ff 100644 --- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp +++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp @@ -1,33 +1,41 @@ - +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "packagelistdoclnk.h" #include <qpe/applnk.h> #include <qpe/config.h> #include <qlist.h> #include "package.h" #include "pksettings.h" PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s, QObject *parent, const char *name) : PackageList(s) { PackageListDocLnk(parent, name); } PackageListDocLnk::PackageListDocLnk(QObject *parent, const char *name) : PackageList(parent, name) { Config cfg( "oipkg", Config::User ); cfg.setGroup( "Common" ); docLnkDir = cfg.readEntry( "docLnkDir", "/root/" ); pvDebug(2,"opening DocLnkSet "+docLnkDir); doclnkset = new DocLnkSet(docLnkDir,"application/ipkg"); } PackageListDocLnk::~PackageListDocLnk() { Config cfg( "oipkg", Config::User ); cfg.setGroup( "Common" ); cfg.writeEntry( "docLnkDir", docLnkDir ); delete doclnkset; } diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.h b/noncore/unsupported/oipkg/packagelistdoclnk.h index a63fb59..af06a45 100644 --- a/noncore/unsupported/oipkg/packagelistdoclnk.h +++ b/noncore/unsupported/oipkg/packagelistdoclnk.h @@ -1,23 +1,32 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PACKAGELISTDOCLNK_H #define PACKAGELISTDOCLNK_H #include "packagelist.h" #include "debug.h" class DocLnkSet; class PackageListDocLnk : public PackageList { public: PackageListDocLnk(QObject *parent=0, const char *name=0); PackageListDocLnk( PackageManagerSettings *s, QObject *parent=0, const char *name=0); virtual ~PackageListDocLnk(); public slots: void update(); private: DocLnkSet *doclnkset; QString docLnkDir; }; #endif diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp index 7c54441..b5e86f5 100644 --- a/noncore/unsupported/oipkg/packagelistitem.cpp +++ b/noncore/unsupported/oipkg/packagelistitem.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "packagelistitem.h" #include <qpe/resource.h> #include <qobject.h> #include "debug.h" static QPixmap *pm_uninstalled=0; static QPixmap *pm_uninstalled_old=0; static QPixmap *pm_installed=0; static QPixmap *pm_installed_old=0; static QPixmap *pm_uninstall=0; static QPixmap *pm_install=0; static QPixmap *pm_uninstalled_old_installed_new=0; static QPixmap *pm_uninstalled_installed_old=0; PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSettings *s) : QCheckListItem(lv,pi->name(),CheckBox) { init(pi,s); } PackageListItem::PackageListItem(QListViewItem *lvi, Package *pi, PackageManagerSettings *s) : QCheckListItem(lvi,pi->name(),CheckBox) { init(pi,s); } void PackageListItem::init( Package *pi, PackageManagerSettings *s) { package = pi; settings = s; diff --git a/noncore/unsupported/oipkg/packagelistitem.h b/noncore/unsupported/oipkg/packagelistitem.h index 65e9711..dba44f7 100644 --- a/noncore/unsupported/oipkg/packagelistitem.h +++ b/noncore/unsupported/oipkg/packagelistitem.h @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PK_LISTITEM_H #define PK_LISTITEM_H #include "package.h" #include <qstring.h> #include <qlistview.h> #include <qpainter.h> #include <qpixmap.h> #include <qdict.h> #include "pksettings.h" class PackageListItem : public QCheckListItem { public: PackageListItem(QListViewItem*, Package*, PackageManagerSettings*); PackageListItem(QListView*, Package*, PackageManagerSettings*); void paintCell( QPainter*, const QColorGroup&, int, int, int ); void paintFocus( QPainter*, const QColorGroup&, const QRect& ); QPixmap statePixmap() const; QString key( int, bool ) const; Package* getPackage() { return package; } ; QString getName() { return package->name(); } ; bool isInstalled(){ return package->installed(); }; virtual void setOn ( bool ); void displayDetails(); private: void init(Package*, PackageManagerSettings*); QCheckListItem *nameItem; diff --git a/noncore/unsupported/oipkg/packagelistlocal.cpp b/noncore/unsupported/oipkg/packagelistlocal.cpp index 6d931c8..b8a19253 100644 --- a/noncore/unsupported/oipkg/packagelistlocal.cpp +++ b/noncore/unsupported/oipkg/packagelistlocal.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include <qpe/config.h> #include <qfile.h> #include <qfileinfo.h> #include <qtextstream.h> #include <qstringlist.h> #include "packagelistlocal.h" PackageListLocal::PackageListLocal() : PackageList() { Config cfg( "oipkg", Config::User ); cfg.setGroup( "Common" ); statusDir = cfg.readEntry( "statusDir", "" ); listsDir = cfg.readEntry( "listsDir", "" ); if ( statusDir=="" || ! QFileInfo(statusDir+"/status").isFile() ) { statusDir="/usr/lib/ipkg/"; listsDir="/usr/lib/ipkg/lists/"; cfg.writeEntry( "statusDir", statusDir ); cfg.writeEntry( "listsDir", listsDir ); } } PackageListLocal::PackageListLocal(PackageManagerSettings* s) : PackageList(s) { PackageListLocal(); } PackageListLocal::~PackageListLocal() { } diff --git a/noncore/unsupported/oipkg/packagelistlocal.h b/noncore/unsupported/oipkg/packagelistlocal.h index 887126b..69f871c 100644 --- a/noncore/unsupported/oipkg/packagelistlocal.h +++ b/noncore/unsupported/oipkg/packagelistlocal.h @@ -1,30 +1,39 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PACKAGELISTLOCAL_H #define PACKAGELISTLOCAL_H #include "packagelist.h" #define HACK #ifdef HACK static QString listsDir="/usr/lib/ipkg/"; static QString statusDir="/usr/lib/ipkg/"; #endif class PackageListLocal : public PackageList { public: PackageListLocal(); PackageListLocal( PackageManagerSettings* ); virtual ~PackageListLocal(); public slots: void update(); private: #ifndef HACK QString listsDir; QString statusDir; #endif void parseStatus(); void parseList(); }; #endif diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp index bb29e80..b4b6979 100644 --- a/noncore/unsupported/oipkg/packagelistremote.cpp +++ b/noncore/unsupported/oipkg/packagelistremote.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "packagelistremote.h" #include <qstring.h> #include <stdlib.h> #include <unistd.h> PackageListRemote::PackageListRemote(PackageManagerSettings* s) : PackageList(s) { PackageListRemote(); } PackageListRemote::PackageListRemote() : PackageList() { } PackageListRemote::~PackageListRemote() { } void PackageListRemote::query(QString s) { pvDebug(4,"set query "+s); searchString = s; } void PackageListRemote::update() { pvDebug(2,"PackageListRemote::update"); if (searchString.isEmpty()) return; diff --git a/noncore/unsupported/oipkg/packagelistremote.h b/noncore/unsupported/oipkg/packagelistremote.h index 87bf10d..98632ca 100644 --- a/noncore/unsupported/oipkg/packagelistremote.h +++ b/noncore/unsupported/oipkg/packagelistremote.h @@ -1,21 +1,30 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PACKAGELISTREMOTE_H #define PACKAGELISTREMOTE_H #include "packagelist.h" #include "package.h" #include "pksettings.h" #include "debug.h" class PackageListRemote : public PackageList { public: PackageListRemote(); PackageListRemote( PackageManagerSettings* s); virtual ~PackageListRemote(); void query(QString); public slots: void update(); private: QString searchString; }; #endif diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp index 2bb74e9..0d6fa80 100644 --- a/noncore/unsupported/oipkg/packagelistview.cpp +++ b/noncore/unsupported/oipkg/packagelistview.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "packagelistview.h" #include <qpopupmenu.h> #include <qaction.h> #include "packagelistitem.h" #include "pksettings.h" PackageListView::PackageListView(QWidget *p, const char* n, PackageManagerSettings *s) : QListView(p,n) { settings = s; popupMenu = new QPopupMenu( this ); destsMenu = new QPopupMenu( popupMenu ); popupTimer = new QTimer( this ); setSelectionMode(QListView::NoSelection); addColumn( tr("Package") ); setRootIsDecorated( true ); connect( popupTimer, SIGNAL(timeout()), this, SLOT(showPopup()) ); connect( this, SIGNAL( pressed( QListViewItem* ) ), this, SLOT( setCurrent( QListViewItem* ) ) ); connect( this, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( stopTimer( QListViewItem* ) ) ); } //PackageListView::~PackageListView() //{ //} diff --git a/noncore/unsupported/oipkg/packagelistview.h b/noncore/unsupported/oipkg/packagelistview.h index 00c0320..3c09ba8 100644 --- a/noncore/unsupported/oipkg/packagelistview.h +++ b/noncore/unsupported/oipkg/packagelistview.h @@ -1,48 +1,41 @@ /*************************************************************************** - packagelistview.h - description - ------------------- - begin : Sat Apr 27 2002 - copyright : (C) 2002 by tille - email : tille@handhelds.org - ***************************************************************************/ - -/*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PACKAGELISTVIEW_H #define PACKAGELISTVIEW_H #include <qlistview.h> #include <qaction.h> #include <qdict.h> #include <qstring.h> #include <qtimer.h> #include <qwidget.h> #include <qpopupmenu.h> #include "packagelist.h" #include "debug.h" class PackageListItem; class Package; class PackageManagerSettings; class PackageListView : public QListView { Q_OBJECT public: PackageListView(QWidget*, const char*, PackageManagerSettings*); void addList( QString, PackageList* ); // ~PackageListView(); QTimer *popupTimer; private: QDict<PackageList> PackageLists; QDict<QCheckListItem> rootItems; PackageManagerSettings *settings; Package *activePackage; diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 89309a2..de1f162 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "pmipkg.h" #include "pksettings.h" #include "package.h" #include "packagelistitem.h" #include <opie/oprocess.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/stringutil.h> #include <qpe/qpeapplication.h> #include <qdir.h> #include <qfile.h> #include <qgroupbox.h> #include <qmultilineedit.h> #include <qstring.h> #include <qcheckbox.h> #include <qtextstream.h> #include <qtextview.h> #include <qprogressbar.h> #include <qpushbutton.h> #include <qlayout.h> #include <stdlib.h> #include <unistd.h> #include "mainwindow.h" //#define OPROCESS PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h index 2c92348..28bc5dd 100644 --- a/noncore/unsupported/oipkg/pmipkg.h +++ b/noncore/unsupported/oipkg/pmipkg.h @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PMIPKG_H #define PMIPKG_H #include <opie/oprocess.h> #include <qobject.h> #include <qlist.h> #include <qstring.h> #include <qwidget.h> #include "pksettings.h" #include "runwindow.h" #include "packagelist.h" #include "installdialog.h" #include "debug.h" #define createLink 0 #define removeLink 1 class Package; class PmIpkg : public QObject { Q_OBJECT public: PmIpkg( PackageManagerSettings* , QWidget* p=0, const char * name=0, WFlags f=0 ); ~PmIpkg(); int linkOpp; void loadList( PackageList* ); void commit(); void update(); void show(); /** No descriptions */ diff --git a/noncore/unsupported/oipkg/settings.cpp b/noncore/unsupported/oipkg/settings.cpp index 85daa98..4bd60c0 100644 --- a/noncore/unsupported/oipkg/settings.cpp +++ b/noncore/unsupported/oipkg/settings.cpp @@ -1,32 +1,41 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "pksettings.h" #include <qpe/config.h> #include <qcombobox.h> #include <qfile.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qlistbox.h> #include <qcheckbox.h> #include <qstring.h> #include <qobject.h> #include <qtextstream.h> #include <qtabwidget.h> PackageManagerSettings::PackageManagerSettings( QWidget* parent, const char* name, WFlags fl ) : PackageManagerSettingsBase( parent, name, fl ) { connect( newserver, SIGNAL(clicked()), this, SLOT(newServer()) ); connect( removeserver, SIGNAL(clicked()), this, SLOT(removeServer()) ); connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) ); connect( newdestination, SIGNAL(clicked()), this, SLOT(newDestination()) ); connect( removedestination, SIGNAL(clicked()), this, SLOT(removeDestination()) ); connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); // connect( CheckBoxLink, SIGNAL(toggled(bool)), // activeLinkDestination, SLOT(setEnabled(bool)) ); connect( settingName, SIGNAL(activated(int)), this, SLOT(installationSettingChange(int)) ); connect( settingName, SIGNAL(textChanged(const QString &)), this, SLOT(installationSettingSetName(const QString &)) ); connect( newsetting, SIGNAL(clicked()), this, SLOT(newInstallationSetting()) ); connect( renamesetting, SIGNAL(clicked()), this, SLOT(renameInstallationSetting()) ); connect( removesetting, SIGNAL(clicked()), this, SLOT(removeInstallationSetting()) ); diff --git a/noncore/unsupported/oipkg/settings.h b/noncore/unsupported/oipkg/settings.h index 9cb7a9b..44459b2 100644 --- a/noncore/unsupported/oipkg/settings.h +++ b/noncore/unsupported/oipkg/settings.h @@ -1,41 +1,49 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// (c) 2002 Patrick S. Vogt <tille@handhelds.org> #ifndef PACKAGEMANAGERSETTINGS_H #define PACKAGEMANAGERSETTINGS_H #include "pksettingsbase.h" #include <qintdict.h> class PackageManagerSettings : public PackageManagerSettingsBase -//class PackageManagerSettings : private PackageManagerSettingsBase { Q_OBJECT public: PackageManagerSettings( QWidget* , const char* , WFlags ); ~PackageManagerSettings(); bool showDialog( int ) ; QString getDestinationUrl(); QString getDestinationName(); QString getLinkDestinationName(); bool createLinks(); QStringList getActiveServers(); QStringList getDestinationUrls(); public slots: /** No descriptions */ void createLinks(); void removeLinks(); void writeInstallationSettings(); void readInstallationSettings(); void writeCurrentInstallationSetting(); void readInstallationSetting(int); void installationSettingSetName(const QString &); void activeDestinationChange(int) void newServer(); void editServer(int); void removeDestination(); void newDestination(); void editDestination(int); void linkEnabled(bool); void removeServer(); void serverNameChanged(const QString&); void serverUrlChanged(const QString&); |