summaryrefslogtreecommitdiff
path: root/noncore
authordrw <drw>2005-06-05 22:18:10 (UTC)
committer drw <drw>2005-06-05 22:18:10 (UTC)
commit31e8d6aad8220f747113870cfa10261435a2a162 (patch) (side-by-side diff)
treebf9e755760817c91db67114e417cd6c383eca66e /noncore
parente2b65062bd7554062fcc87bbf406c2e3a54d79a2 (diff)
downloadopie-31e8d6aad8220f747113870cfa10261435a2a162.zip
opie-31e8d6aad8220f747113870cfa10261435a2a162.tar.gz
opie-31e8d6aad8220f747113870cfa10261435a2a162.tar.bz2
Fix doc box headers
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/entrydlg.cpp51
-rw-r--r--noncore/settings/packagemanager/entrydlg.h51
-rw-r--r--noncore/settings/packagemanager/filterdlg.cpp51
-rw-r--r--noncore/settings/packagemanager/filterdlg.h49
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp51
-rw-r--r--noncore/settings/packagemanager/installdlg.h49
-rw-r--r--noncore/settings/packagemanager/main.cpp49
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp51
-rw-r--r--noncore/settings/packagemanager/mainwindow.h51
-rw-r--r--noncore/settings/packagemanager/oconfitem.cpp43
-rw-r--r--noncore/settings/packagemanager/oconfitem.h43
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp43
-rw-r--r--noncore/settings/packagemanager/oipkg.h43
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp43
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.h44
-rw-r--r--noncore/settings/packagemanager/opackage.cpp43
-rw-r--r--noncore/settings/packagemanager/opackage.h43
-rw-r--r--noncore/settings/packagemanager/opackagemanager.cpp43
-rw-r--r--noncore/settings/packagemanager/opackagemanager.h43
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.cpp51
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.h49
-rw-r--r--noncore/settings/packagemanager/promptdlg.cpp51
-rw-r--r--noncore/settings/packagemanager/promptdlg.h51
23 files changed, 544 insertions, 542 deletions
diff --git a/noncore/settings/packagemanager/entrydlg.cpp b/noncore/settings/packagemanager/entrydlg.cpp
index 3b794b4..5d61342 100644
--- a/noncore/settings/packagemanager/entrydlg.cpp
+++ b/noncore/settings/packagemanager/entrydlg.cpp
@@ -1,75 +1,76 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2004 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "entrydlg.h"
#include <opie2/ofiledialog.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qpushbutton.h>
EntryDlg::EntryDlg( const QString &label, QWidget* parent, const char* name, bool modal )
: QDialog( parent, name, modal )
{
QGridLayout *layout = new QGridLayout( this, 3, 2, 2, 4 );
QLabel *l = new QLabel( label, this );
l->setAlignment( AlignLeft | AlignTop | WordBreak );
layout->addMultiCellWidget( l, 0, 0, 0, 1 );
m_entry = new QLineEdit( this );
layout->addWidget( m_entry, 1, 0 );
connect( m_entry, SIGNAL(returnPressed()), this, SLOT(slotTryAccept()) );
QPixmap pic;
pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
QPushButton *btn = new QPushButton( pic, QString::null, this );
btn->setMaximumWidth( btn->height() );
connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) );
layout->addWidget( btn, 1, 1 );
layout->setRowStretch( 2, 10 );
resize( width(), l->height() + btn->height() + 8 );
}
void EntryDlg::setText( const QString &text )
{
m_entry->setText( text );
m_entry->selectAll();
}
QString EntryDlg::getText()
{
return m_entry->text();
diff --git a/noncore/settings/packagemanager/entrydlg.h b/noncore/settings/packagemanager/entrydlg.h
index 012589b..3f897ae 100644
--- a/noncore/settings/packagemanager/entrydlg.h
+++ b/noncore/settings/packagemanager/entrydlg.h
@@ -1,58 +1,59 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2004 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef ENTRYDLG_H
#define ENTRYDLG_H
#include <qdialog.h>
class QLineEdit;
class EntryDlg : public QDialog
{
Q_OBJECT
public:
static QString getText( const QString &caption, const QString &label, const QString &text = QString::null,
bool *ok = 0, QWidget *parent = 0, const char *name = 0 );
EntryDlg( const QString &label, QWidget* parent = 0, const char* name = 0, bool modal = true );
void setText( const QString &text );
QString getText();
private slots:
void slotTryAccept();
void slotSelectPath();
private:
QLineEdit *m_entry;
};
#endif // EntryDlg_H
diff --git a/noncore/settings/packagemanager/filterdlg.cpp b/noncore/settings/packagemanager/filterdlg.cpp
index e69b6eb..4924972 100644
--- a/noncore/settings/packagemanager/filterdlg.cpp
+++ b/noncore/settings/packagemanager/filterdlg.cpp
@@ -1,75 +1,76 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "filterdlg.h"
#include <qwhatsthis.h>
FilterDlg::FilterDlg( QWidget *parent, OPackageManager *pm, const QString &name,
const QString &server, const QString &destination,
OPackageManager::Status status, const QString &category )
: QDialog( parent, QString::null, true, WStyle_ContextHelp )
{
setCaption( tr( "Filter packages" ) );
QVBoxLayout *layout = new QVBoxLayout( this );
QScrollView *sv = new QScrollView( this );
layout->addWidget( sv, 0, 0 );
sv->setResizePolicy( QScrollView::AutoOneFit );
sv->setFrameStyle( QFrame::NoFrame );
QWidget *container = new QWidget( sv->viewport() );
sv->addChild( container );
layout = new QVBoxLayout( container, 4, 4 );
// Category
m_categoryCB = new QCheckBox( tr( "Category:" ), container );
QWhatsThis::add( m_categoryCB, tr( "Tap here to filter package list by application category." ) );
connect( m_categoryCB, SIGNAL(toggled(bool)), this, SLOT(slotCategorySelected(bool)) );
m_category = new QComboBox( container );
QWhatsThis::add( m_category, tr( "Select the application category to filter by here." ) );
m_category->insertStringList( pm->categories() );
initItem( m_category, m_categoryCB, category );
layout->addWidget( m_categoryCB );
layout->addWidget( m_category );
// Package name
m_nameCB = new QCheckBox( tr( "Names containing:" ), container );
QWhatsThis::add( m_nameCB, tr( "Tap here to filter package list by package name." ) );
connect( m_nameCB, SIGNAL(toggled(bool)), this, SLOT(slotNameSelected(bool)) );
m_name = new QLineEdit( name, container );
QWhatsThis::add( m_name, tr( "Enter the package name to filter by here." ) );
if ( !name.isNull() )
m_nameCB->setChecked( true );
m_name->setEnabled( !name.isNull() );
layout->addWidget( m_nameCB );
layout->addWidget( m_name );
// Status
m_statusCB = new QCheckBox( tr( "With the status:" ), container );
QWhatsThis::add( m_statusCB, tr( "Tap here to filter package list by the package status." ) );
diff --git a/noncore/settings/packagemanager/filterdlg.h b/noncore/settings/packagemanager/filterdlg.h
index bd89b42..6f39464 100644
--- a/noncore/settings/packagemanager/filterdlg.h
+++ b/noncore/settings/packagemanager/filterdlg.h
@@ -1,75 +1,76 @@
/*
-                This file is part of the OPIE Project
+                 This file is part of the Opie Project
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
-             .=l.
-           .>+-=
- _;:,     .>    :=|. This file is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU 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 file 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 General
-..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
- :     =  ...= . :.=- You should have received a copy of the GNU
- -.   .:....=;==+<; General Public License along with this file;
-  -_. . .   )=.  = see the file COPYING. If not, write to the
-    --        :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef FILTERDLG_H
#define FILTERDLG_H
#include "opackagemanager.h"
#include <qcheckbox.h>
#include <qdialog.h>
#include <qcombobox.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qscrollview.h>
class FilterDlg : public QDialog
{
Q_OBJECT
public:
FilterDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &name = 0x0,
const QString &server = 0x0, const QString &destination = 0x0,
OPackageManager::Status status = OPackageManager::All,
const QString &category = 0x0 );
QString name()
{ return m_nameCB->isChecked() ? m_name->text() : QString::null; };
QString server()
{ return m_serverCB->isChecked() ? m_server->currentText() : QString::null; };
QString destination()
{ return m_destCB->isChecked() ? m_destination->currentText() : QString::null; };
OPackageManager::Status status()
{
if ( m_statusCB->isChecked() )
{
if ( m_status->currentText() == tr( "All" ) )
return OPackageManager::All;
else if ( m_status->currentText() == tr( "Installed" ) )
return OPackageManager::Installed;
else if ( m_status->currentText() == tr( "Not installed" ) )
return OPackageManager::NotInstalled;
else if ( m_status->currentText() == tr( "Updated" ) )
return OPackageManager::Updated;
}
return OPackageManager::NotDefined;
};
QString category()
{ return m_categoryCB->isChecked() ? m_category->currentText() : QString::null; };
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp
index 8aed10d..205d7ed 100644
--- a/noncore/settings/packagemanager/installdlg.cpp
+++ b/noncore/settings/packagemanager/installdlg.cpp
@@ -1,75 +1,76 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "installdlg.h"
#include <opie2/ofiledialog.h>
#include <qpe/fileselector.h>
#include <qpe/resource.h>
#include <qpe/storage.h>
#include <qapplication.h>
#include <qcombobox.h>
#include <qfileinfo.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qmap.h>
#include <qmultilineedit.h>
#include <qpushbutton.h>
#include <sys/vfs.h>
#include "opackagemanager.h"
InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption,
OPackage::Command command1, const QStringList &packages1,
OPackage::Command command2, const QStringList &packages2,
OPackage::Command command3, const QStringList &packages3 )
: QWidget( 0l )
, m_packman( pm )
, m_installFound( false )
, m_numCommands( 0 )
, m_currCommand( 0 )
, m_destItem( 0l )
{
// Save command/package list information
if ( command1 != OPackage::NotDefined )
{
m_command[ m_numCommands ] = command1;
m_packages[ m_numCommands ] = packages1;
++m_numCommands;
if ( command1 == OPackage::Install )
m_installFound = true;
}
if ( command2 != OPackage::NotDefined )
{
m_command[ m_numCommands ] = command2;
diff --git a/noncore/settings/packagemanager/installdlg.h b/noncore/settings/packagemanager/installdlg.h
index e633809..a41a38f 100644
--- a/noncore/settings/packagemanager/installdlg.h
+++ b/noncore/settings/packagemanager/installdlg.h
@@ -1,75 +1,76 @@
/*
- This file is part of the OPIE Project
+                 This file is part of the Opie Project
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef INSTALLDLG_H
#define INSTALLDLG_H
#include <qwidget.h>
#include "opackage.h"
class QComboBox;
class QLabel;
class QMultiLineEdit;
class QPushButton;
class OConfItem;
class OPackageManager;
class InstallDlg : public QWidget
{
Q_OBJECT
public:
InstallDlg( QWidget *parent = 0l, OPackageManager *pm = 0l,
const QString &caption = QString::null,
OPackage::Command command1 = OPackage::NotDefined,
const QStringList &packages1 = QStringList(),
OPackage::Command command2 = OPackage::NotDefined,
const QStringList &packages2 = QStringList(),
OPackage::Command command3 = OPackage::NotDefined,
const QStringList &packages3 = QStringList() );
private:
OPackageManager *m_packman; // Pointer to application instance of package manager
bool m_installFound; // Indicates if an install is being done, controls display of
// destination selection, available space
// UI controls
QComboBox *m_destination; // Destination selection list
QLabel *m_availSpace; // Text label to display available space on selected destination
QMultiLineEdit *m_output; // Multi-line edit to display status
QPushButton *m_btnStart; // Start/abort/close button
QPushButton *m_btnOptions; // Installation options button
// Commands and packages to execute
int m_numCommands; // Number of commands to be executed
int m_currCommand; // Number of currently executing command
OPackage::Command m_command[3]; // List of commands to be executed
diff --git a/noncore/settings/packagemanager/main.cpp b/noncore/settings/packagemanager/main.cpp
index 3792881..5863662 100644
--- a/noncore/settings/packagemanager/main.cpp
+++ b/noncore/settings/packagemanager/main.cpp
@@ -1,34 +1,35 @@
/*
-                This file is part of the OPIE Project
+                 This file is part of the Opie Project
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
-             .=l.
-           .>+-=
- _;:,     .>    :=|. This file is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU 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 file 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 General
-..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
- :     =  ...= . :.=- You should have received a copy of the GNU
- -.   .:....=;==+<; General Public License along with this file;
-  -_. . .   )=.  = see the file COPYING. If not, write to the
-    --        :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "mainwindow.h"
#include <opie2/oapplicationfactory.h>
OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<MainWindow> )
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp
index 8a5b90c..0e40c01 100644
--- a/noncore/settings/packagemanager/mainwindow.cpp
+++ b/noncore/settings/packagemanager/mainwindow.cpp
@@ -1,75 +1,76 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "mainwindow.h"
#include "installdlg.h"
#include "filterdlg.h"
#include "promptdlg.h"
#include "entrydlg.h"
#include "packageinfodlg.h"
#include <opie2/ofiledialog.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qaction.h>
#include <qdir.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qmenubar.h>
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <qtimer.h>
#include <qtoolbar.h>
#include <qwhatsthis.h>
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ )
: QMainWindow( parent, name, WStyle_ContextHelp )
, m_config( "packman" )
, m_packman( &m_config, this )
, m_menuBar( this )
, m_toolBar( this )
, m_findBar( this )
, m_widgetStack( this )
, m_packageList( this )
, m_statusWidget( this )
, m_statusText( &m_statusWidget )
, m_statusBar( &m_statusWidget )
, m_iconUpdated( Resource::loadPixmap( "packagemanager/updated" ) )
, m_iconInstalled( Resource::loadPixmap( "installed" ) )
, m_iconNull( m_iconUpdated.size() )
, m_filterName( QString::null )
, m_filterServer( QString::null )
, m_filterDest( QString::null )
, m_filterStatus( OPackageManager::NotDefined )
, m_filterCategory( QString::null )
{
diff --git a/noncore/settings/packagemanager/mainwindow.h b/noncore/settings/packagemanager/mainwindow.h
index f00e344..e7003e4 100644
--- a/noncore/settings/packagemanager/mainwindow.h
+++ b/noncore/settings/packagemanager/mainwindow.h
@@ -1,75 +1,76 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "opackagemanager.h"
#include <qpe/config.h>
#include <qlabel.h>
#include <qlistview.h>
#include <qmainwindow.h>
#include <qpixmap.h>
#include <qprogressbar.h>
#include <qtoolbar.h>
#include <qwidgetstack.h>
class QAction;
class QLineEdit;
class MainWindow :public QMainWindow
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0x0, const char *name = 0x0, WFlags fl = 0 );
static QString appName() { return QString::fromLatin1( QUICKAPP_NAME ); };
protected:
void closeEvent( QCloseEvent *event );
private:
Config m_config; // Configuration file
OPackageManager m_packman; // Package manager
// Toolbars
QToolBar m_menuBar; // Main toolbar containing menu
QToolBar m_toolBar; // Main toolbar
QToolBar m_findBar; // Find toolbar
QWidgetStack m_widgetStack; // Main widget stack which contains m_packageList & m_statusWidget
QListView m_packageList; // Main list view of all packages
QLineEdit *m_findEdit; // Line edit box used for find toolbar
// Status widget controls
QWidget m_statusWidget; // Widget to display status during long operations
diff --git a/noncore/settings/packagemanager/oconfitem.cpp b/noncore/settings/packagemanager/oconfitem.cpp
index ffa936e..76c8c65 100644
--- a/noncore/settings/packagemanager/oconfitem.cpp
+++ b/noncore/settings/packagemanager/oconfitem.cpp
@@ -1,42 +1,41 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "oconfitem.h"
OConfItem::OConfItem( Type type, const QString &name, const QString &value,
const QString &features, bool active )
: m_type( type )
, m_name( name )
, m_value( value )
, m_features( features )
, m_active( active )
{
}
diff --git a/noncore/settings/packagemanager/oconfitem.h b/noncore/settings/packagemanager/oconfitem.h
index b306e93..c95039e 100644
--- a/noncore/settings/packagemanager/oconfitem.h
+++ b/noncore/settings/packagemanager/oconfitem.h
@@ -1,77 +1,76 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef OCONFITEM_H
#define OCONFITEM_H
#include <qlist.h>
#include <qstring.h>
class OConfItem
{
public:
enum Type { Source, Destination, Option, Arch, Other, NotDefined };
OConfItem( Type type = NotDefined, const QString &name = QString::null,
const QString &value = QString::null, const QString &features = QString::null,
bool active = true );
Type type() { return m_type; }
const QString &name() { return m_name; }
const QString &value() { return m_value; }
const QString &features() { return m_features; }
bool active() { return m_active; }
void setType( Type type ) { m_type = type; }
void setName( const QString &name ) { m_name = name; }
void setValue( const QString &value ) { m_value = value; }
void setFeatures( const QString &features ) { m_features = features; }
void setActive( bool active ) { m_active = active; }
private:
Type m_type; // Type of configuration item
QString m_name; // Name of item
QString m_value; // Value of item
QString m_features; // Comma-deliminated list of features this item supports
bool m_active; // Indicates whether item is currently active
};
class OConfItemList : public QList<OConfItem>
{
private:
int compareItems( QCollection::Item item1, QCollection::Item item2 )
{
// Sort by OConfItem location then by type
OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type();
OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type();
if ( type1 < type2 )
return -1;
diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp
index 7bc2040..ffb3687 100644
--- a/noncore/settings/packagemanager/oipkg.cpp
+++ b/noncore/settings/packagemanager/oipkg.cpp
@@ -1,77 +1,76 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "oipkg.h"
#include <qdir.h>
#include <qfile.h>
#include <qtextstream.h>
#include <stdlib.h>
#include <unistd.h>
extern "C" {
#include <libipkg.h>
};
args_t m_ipkgArgs; // libipkg configuration arguments
const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file
const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files
const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists
const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location
const QString IPKG_INFO_PATH = "usr/lib/ipkg/info"; // Package file lists location
OIpkg *oipkg;
// Ipkg callback functions
int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg )
{
// Display message only if it is below the message level threshold
if ( conf && ( conf->verbosity < level ) )
return 0;
else
oipkg->ipkgMessage( msg );
return 0;
}
char *fIpkgResponse( char */*question*/ )
{
return 0l;
}
int fIpkgStatus( char */*name*/, int /*status*/, char *desc, void */*userdata*/ )
{
oipkg->ipkgStatus( desc );
return 0;
}
diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h
index 4e390fa..9a7802c 100644
--- a/noncore/settings/packagemanager/oipkg.h
+++ b/noncore/settings/packagemanager/oipkg.h
@@ -1,77 +1,76 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef OIPKG_H
#define OIPKG_H
#include "oconfitem.h"
#include "opackage.h"
#include <qpe/config.h>
#include <qobject.h>
// Ipkg execution options (m_ipkgExecOptions)
#define FORCE_DEPENDS 0x0001
#define FORCE_REMOVE 0x0002
#define FORCE_REINSTALL 0x0004
#define FORCE_OVERWRITE 0x0008
class OConfItemList;
class OIpkg : public QObject
{
Q_OBJECT
public:
OIpkg( Config *config = 0l, QObject *parent = 0l, const char *name = 0l );
~OIpkg();
OConfItemList *configItems();
OConfItemList *servers();
OConfItemList *destinations();
OConfItemList *options();
int ipkgExecOptions() { return m_ipkgExecOptions; }
int ipkgExecVerbosity() { return m_ipkgExecVerbosity; }
void setConfigItems( OConfItemList *configList );
void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; }
void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; }
void saveSettings();
OPackageList *availablePackages( const QString &server = QString::null );
OPackageList *installedPackages( const QString &destName = QString::null,
const QString &destPath = QString::null );
OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined,
const QString &name = QString::null );
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index 0ad1c82..945571f 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -1,77 +1,76 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "oipkgconfigdlg.h"
#include <opie2/ofiledialog.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qscrollview.h>
#include <qwhatsthis.h>
OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent )
: QDialog( parent, QString::null, true, WStyle_ContextHelp )
, m_ipkg( ipkg )
, m_configs( 0l )
, m_installOptions( installOptions )
, m_serverCurrent( -1 )
, m_destCurrent( -1 )
, m_layout( this, 2, 4 )
, m_tabWidget( this )
{
setCaption( tr( "Configuration" ) );
// Initialize configuration widgets
if ( !installOptions )
{
initServerWidget();
initDestinationWidget();
initProxyWidget();
}
initOptionsWidget();
// Load configuration information
initData();
// Setup tabs for all info
m_layout.addWidget( &m_tabWidget );
if ( !m_installOptions )
{
m_tabWidget.addTab( m_serverWidget, "packagemanager/servertab", tr( "Servers" ) );
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.h b/noncore/settings/packagemanager/oipkgconfigdlg.h
index 9e23b62..88381ab 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.h
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.h
@@ -1,80 +1,78 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
-
#ifndef OIPKGCONFIGDLG_H
#define OIPKGCONFIGDLG_H
#include <opie2/otabwidget.h>
#include <qdialog.h>
#include <qlayout.h>
#include "oipkg.h"
class QCheckBox;
class QComboBox;
class QLineEdit;
class QListBox;
class QPushButton;
class OIpkgConfigDlg : public QDialog
{
Q_OBJECT
public:
OIpkgConfigDlg( OIpkg *ipkg = 0l, bool installOptions = false, QWidget *parent = 0l );
protected slots:
void accept();
void reject();
private:
OIpkg *m_ipkg; // Pointer to Ipkg class for retrieving/saving configuration options
OConfItemList *m_configs; // Local list of configuration items
bool m_installOptions; // If true, will only display the Options tab
// Server/Destination cached information
int m_serverCurrent; // Index of currently selected server in m_serverList
int m_destCurrent; // Index of currently selected destination in m_destList
// UI controls
QVBoxLayout m_layout; // Main dialog layout control
Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control
QWidget *m_serverWidget; // Widget containing server configuration controls
QWidget *m_destWidget; // Widget containing destination configuration controls
QWidget *m_proxyWidget; // Widget containing proxy configuration controls
QWidget *m_optionsWidget; // Widget containing ipkg execution configuration controls
// Server configuration UI controls
QListBox *m_serverList; // Server list selection
QPushButton *m_serverEditBtn; // Server edit button
diff --git a/noncore/settings/packagemanager/opackage.cpp b/noncore/settings/packagemanager/opackage.cpp
index 37963fa..f3c2024 100644
--- a/noncore/settings/packagemanager/opackage.cpp
+++ b/noncore/settings/packagemanager/opackage.cpp
@@ -1,46 +1,45 @@
/*
-                This file is part of the Opie Project
+                 This file is part of the Opie Project
-              Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "opackage.h"
OPackage::OPackage( const QString &name, const QString &version, const QString &versionInstalled,
const QString &source, const QString &destination, const QString &category,
const QString &information, const QString &files )
: m_name( name )
, m_version( version )
, m_versionInstalled( versionInstalled )
, m_source( source )
, m_destination( destination )
, m_category( category )
, m_information( information )
, m_files( files )
{
}
diff --git a/noncore/settings/packagemanager/opackage.h b/noncore/settings/packagemanager/opackage.h
index fbd9ec0..4da5a2b 100644
--- a/noncore/settings/packagemanager/opackage.h
+++ b/noncore/settings/packagemanager/opackage.h
@@ -1,77 +1,76 @@
/*
-                This file is part of the Opie Project
+                 This file is part of the Opie Project
-              Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef OPACKAGE_H
#define OPACKAGE_H
#include <qlist.h>
#include <qstring.h>
class OPackage
{
public:
enum Command { Install, Remove, Update, Upgrade, Download, Info, Files, Version, NotDefined };
OPackage( const QString &name= QString::null,
const QString &version= QString::null, const QString &versionInstalled= QString::null,
const QString &source= QString::null, const QString &destination= QString::null,
const QString &category = "misc", const QString &information = QString::null,
const QString &files = QString::null );
const QString &name() { return m_name; }
const QString &version() { return m_version; }
const QString &versionInstalled() { return m_versionInstalled; }
const QString &source() { return m_source; }
const QString &destination() { return m_destination; }
const QString &category() { return m_category; }
const QString &information() { return m_information; }
const QString &files() { return m_files; }
void setName( const QString &name ) { m_name = name; }
void setVersion( const QString &version ) { m_version = version; }
void setVersionInstalled( const QString &version ) { m_versionInstalled = version; }
void setSource( const QString &source ) { m_source = source; }
void setDestination( const QString &destination ) { m_destination = destination; }
void setCategory( const QString &category ) { m_category = category; }
void setInformation( const QString &information ) { m_information = information; }
void setFiles( const QString &files ) { m_files = files; }
private:
QString m_name; // Name of item
QString m_version; // Available version number of item
QString m_versionInstalled; // Installed version number of item, null if not installed
QString m_source; // Source feed of available version
QString m_destination; // Location item is installed to, null if not installed
QString m_category; // Item category
QString m_information; // Package information
QString m_files; // File list information
};
diff --git a/noncore/settings/packagemanager/opackagemanager.cpp b/noncore/settings/packagemanager/opackagemanager.cpp
index c9fdec1..abd8852 100644
--- a/noncore/settings/packagemanager/opackagemanager.cpp
+++ b/noncore/settings/packagemanager/opackagemanager.cpp
@@ -1,77 +1,76 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "opackagemanager.h"
#include "oipkgconfigdlg.h"
#include <qpe/qpeapplication.h>
#include <ctype.h>
OPackageManager::OPackageManager( Config *config, QObject *parent, const char *name )
: QObject( parent, name )
, m_config( config )
, m_ipkg( m_config, this )
, m_packages( 9973 )
, m_categories()
{
m_packages.setAutoDelete( true );
}
void OPackageManager::loadAvailablePackages()
{
m_packages.clear();
OConfItemList *serverList = m_ipkg.servers();
if ( serverList )
{
// Initialize status messaging
emit initStatus( serverList->count() );
int serverCount = 0;
bool categoryAdded = false;
for ( OConfItemListIterator serverIt( *serverList ); serverIt.current(); ++serverIt )
{
OConfItem *server = serverIt.current();
// Process server only if it is active
if ( server->active() )
{
// Update status
QString status = tr( "Reading available packages:\n\t" );
status.append( server->name() );
emit statusText( status );
++serverCount;
emit statusBar( serverCount );
qApp->processEvents();
diff --git a/noncore/settings/packagemanager/opackagemanager.h b/noncore/settings/packagemanager/opackagemanager.h
index bc394e8..60c1643 100644
--- a/noncore/settings/packagemanager/opackagemanager.h
+++ b/noncore/settings/packagemanager/opackagemanager.h
@@ -1,77 +1,76 @@
/*
- This file is part of the Opie Project
+                 This file is part of the Opie Project
- Copyright (c) 2003 Dan Williams <drw@handhelds.org>
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
=.
.=l.
- .>+-=
-_;:, .> :=|. This program 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 program 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 program 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 program 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.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef OPACKAGEMANAGER_H
#define OPACKAGEMANAGER_H
#include "oipkg.h"
#include <qpe/config.h>
#include <qdict.h>
#include <qobject.h>
#include <qstringlist.h>
class OPackageManager : public QObject
{
Q_OBJECT
public:
OPackageManager( Config *config = 0x0, QObject *parent = 0x0, const char *name = 0x0 );
void loadAvailablePackages();
void loadInstalledPackages();
enum Status { All, NotInstalled, Installed, Updated, NotDefined };
OPackageList *packages();
OPackageList *filterPackages( const QString &name = QString::null,
const QString &server = QString::null,
const QString &destination = QString::null,
Status status = NotDefined,
const QString &category = QString::null );
const QStringList &categories() { return m_categories; }
QStringList servers();
QStringList destinations();
int compareVersions( const QString &version1, const QString &version2 );
OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined,
const QString &name = QString::null );
OPackage *findPackage( const QString &name = QString::null );
bool configureDlg( bool installOptions = false );
void saveSettings();
bool executeCommand( OPackage::Command command = OPackage::NotDefined,
const QStringList &parameters = QStringList(),
const QString &destination = QString::null, const QObject *receiver = 0x0,
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp
index 3eef939..e034f34 100644
--- a/noncore/settings/packagemanager/packageinfodlg.cpp
+++ b/noncore/settings/packagemanager/packageinfodlg.cpp
@@ -1,75 +1,76 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "packageinfodlg.h"
#include "opackage.h"
#include "opackagemanager.h"
#include <opie2/otabwidget.h>
#include <qpe/resource.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qwhatsthis.h>
PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package )
: QWidget( 0l )
, m_packman( pm )
, m_information( this )
, m_files( this )
, m_retrieveFiles( 0l )
{
// Initialize UI
if ( parent )
parent->setCaption( package );
QVBoxLayout *layout = new QVBoxLayout( this, 4, 2 );
Opie::Ui::OTabWidget *tabWidget = new Opie::Ui::OTabWidget( this );
layout->addWidget( tabWidget );
// Information tab
QWhatsThis::add( &m_information, tr( "This area contains information about the package." ) );
m_information.reparent( tabWidget, QPoint( 0, 0 ) );
m_information.setReadOnly( true );
tabWidget->addTab( &m_information, "UtilsIcon", tr( "Information" ) );
// Retrive package information
m_package = m_packman->findPackage( package );
if ( !m_package )
{
m_information.setText( tr( "Unable to retrieve package information." ) );
return;
}
// Display package information
if ( !m_package->information().isNull() )
m_information.setText( m_package->information() );
else
diff --git a/noncore/settings/packagemanager/packageinfodlg.h b/noncore/settings/packagemanager/packageinfodlg.h
index 2962f9a..e4c6bba 100644
--- a/noncore/settings/packagemanager/packageinfodlg.h
+++ b/noncore/settings/packagemanager/packageinfodlg.h
@@ -1,66 +1,67 @@
/*
- This file is part of the OPIE Project
+                 This file is part of the Opie Project
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef PACKAGEINFODLG_H
#define PACKAGEINFODLG_H
#include "opackage.h"
#include <qmultilineedit.h>
#include <qwidget.h>
class QPushButton;
class OPackage;
class OPackageManager;
class PackageInfoDlg : public QWidget
{
Q_OBJECT
public:
PackageInfoDlg( QWidget *parent = 0l, OPackageManager *pm = 0l, const QString &package = QString::null );
~PackageInfoDlg();
private:
OPackageManager *m_packman; // Pointer to application instance of package manager
OPackage *m_package; // Pointer to package to display information for
// UI controls
QMultiLineEdit m_information; // Multi-line edit to display package information
QMultiLineEdit m_files; // Multi-line edit to display package file list
QPushButton *m_retrieveFiles; // Push button to retrieve file list
private slots:
void slotBtnFileScan();
void slotInfo( const QString &info );
void slotFiles( const QString &filelist );
};
#endif
diff --git a/noncore/settings/packagemanager/promptdlg.cpp b/noncore/settings/packagemanager/promptdlg.cpp
index 841b98e..5053caa 100644
--- a/noncore/settings/packagemanager/promptdlg.cpp
+++ b/noncore/settings/packagemanager/promptdlg.cpp
@@ -1,75 +1,76 @@
/*
-                This file is part of the OPIE Project
-
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
-             .=l.
-           .>+-=
- _;:,     .>    :=|. This file is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU 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 file 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 General
-..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
- :     =  ...= . :.=- You should have received a copy of the GNU
- -.   .:....=;==+<; General Public License along with this file;
-  -_. . .   )=.  = see the file COPYING. If not, write to the
-    --        :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#include "promptdlg.h"
#include <qpe/qpeapplication.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qwidgetlist.h>
PromptDlg::PromptDlg( const QString &caption, const QString &text, const QString &btn1, const QString &btn2,
QWidget *parent )
: QWidget( parent, QString::null, WType_Modal | WType_TopLevel | WStyle_Dialog )
, m_btnClicked( -1 )
{
setCaption( caption );
QGridLayout *layout = new QGridLayout( this, 2, 2, 4, 2 );
QLabel *label = new QLabel( text, this );
label->setAlignment( AlignCenter | WordBreak );
layout->addMultiCellWidget( label, 0, 0, 0, 1 );
QPushButton *btn = new QPushButton( btn1, this );
layout->addWidget( btn, 1, 0 );
connect( btn, SIGNAL(clicked()), this, SLOT(slotBtn1Clicked()) );
btn = new QPushButton( btn2, this );
layout->addWidget( btn, 1, 1 );
connect( btn, SIGNAL(clicked()), this, SLOT(slotBtn2Clicked()) );
}
int PromptDlg::display()
{
// Determine position of dialog. Derived from QT's QDialog::show() method.
QWidget *w = parentWidget();
QPoint p( 0, 0 );
int extraw = 0, extrah = 0;
QWidget * desk = QApplication::desktop();
if ( w )
w = w->topLevelWidget();
QWidgetList *list = QApplication::topLevelWidgets();
QWidgetListIt it( *list );
while ( (extraw == 0 || extrah == 0) && it.current() != 0 )
{
int w, h;
QWidget * current = it.current();
diff --git a/noncore/settings/packagemanager/promptdlg.h b/noncore/settings/packagemanager/promptdlg.h
index f7bc0c0..9f870fa 100644
--- a/noncore/settings/packagemanager/promptdlg.h
+++ b/noncore/settings/packagemanager/promptdlg.h
@@ -1,59 +1,60 @@
/*
- This file is part of the OPIE Project
-
- =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
- .=l.
- .>+-=
-_;:, .> :=|. This file is free software; you can
-.> <`_, > . <= redistribute it and/or modify it under
-:`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General
-..}^=.= = ; Public License for more details.
-++= -. .` .:
-: = ...= . :.=- You should have received a copy of the GNU
--. .:....=;==+<; General Public License along with this file;
- -_. . . )=. = see the file COPYING. If not, write to the
- -- :-=` Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330,
+                 This file is part of the Opie Project
+
+ Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
+ =.
+ .=l.
+           .>+-=
+ _;:,     .>    :=|. This program 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 program 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.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-
*/
#ifndef PROMPTDLG_H
#define PROMPTDLG_H
#include <qwidget.h>
class PromptDlg : public QWidget
{
Q_OBJECT
public:
PromptDlg( const QString &caption = QString::null, const QString &text = QString::null,
const QString &btn1 = QString::null, const QString &btn2 = QString::null,
QWidget *parent = 0x0 );
int display();
int btnPressed() { return m_btnClicked; }
static int ask( const QString &caption = QString::null, const QString &text = QString::null,
const QString &btn1 = QString::null, const QString &btn2 = QString::null,
QWidget *parent = 0x0 );
private:
int m_btnClicked; // Indicator for which button was pressed
private slots:
void slotBtn1Clicked();
void slotBtn2Clicked();
};
#endif