summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager
authorzecke <zecke>2004-03-14 16:01:52 (UTC)
committer zecke <zecke>2004-03-14 16:01:52 (UTC)
commitf12af18557c8f376f0c6c30e80a85737ff6c592e (patch) (side-by-side diff)
treed60806f34f4ff6af82491579e80c9ef72cd4071e /noncore/settings/packagemanager
parent13aeeabab5f2a6262b33de83cc9559a49365e325 (diff)
downloadopie-f12af18557c8f376f0c6c30e80a85737ff6c592e.zip
opie-f12af18557c8f376f0c6c30e80a85737ff6c592e.tar.gz
opie-f12af18557c8f376f0c6c30e80a85737ff6c592e.tar.bz2
Make use of ODP
Diffstat (limited to 'noncore/settings/packagemanager') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/installdlg.cpp3
-rw-r--r--noncore/settings/packagemanager/main.cpp1
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp1
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.h2
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.cpp1
5 files changed, 6 insertions, 2 deletions
diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp
index aedd972..4a55c10 100644
--- a/noncore/settings/packagemanager/installdlg.cpp
+++ b/noncore/settings/packagemanager/installdlg.cpp
@@ -28,48 +28,49 @@
*/
#include "installdlg.h"
#include <sys/vfs.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 <qpe/fileselector.h>
#include <qpe/resource.h>
#include <qpe/storage.h>
#include <opie2/ofiledialog.h>
#include "opackagemanager.h"
+using namespace Opie::Ui;
InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, bool showDestInfo,
OPackage::Command command1, QStringList *packages1,
OPackage::Command command2, QStringList *packages2,
OPackage::Command command3, QStringList *packages3 )
: QWidget( 0x0 )
, m_packman( pm )
, m_numCommands( 0 )
, m_currCommand( 0 )
{
// Save command/package list information
if ( command1 != OPackage::NotDefined )
{
m_command[ m_numCommands ] = command1;
m_packages[ m_numCommands ] = packages1;
++m_numCommands;
}
if ( command2 != OPackage::NotDefined )
{
m_command[ m_numCommands ] = command2;
m_packages[ m_numCommands ] = packages2;
++m_numCommands;
}
if ( command3 != OPackage::NotDefined )
{
@@ -254,48 +255,48 @@ void InstallDlg::slotBtnStart()
m_btnOptions->setEnabled( true );
m_btnOptions->setText( tr( "Save output" ) );
m_btnOptions->setIconSet( Resource::loadPixmap( "save" ) );
}
void InstallDlg::slotBtnOptions()
{
QString btnText = m_btnOptions->text();
if ( btnText == tr( "Options" ) )
{
// Display configuration dialog (only options tab is enabled)
m_packman->configureDlg( true );
return;
}
// Save output was clicked
QMap<QString, QStringList> map;
map.insert( tr( "All" ), QStringList() );
QStringList text;
text << "text/*";
map.insert(tr( "Text" ), text );
text << "*";
map.insert( tr( "All" ), text );
- QString filename = Opie::OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map );
+ QString filename = OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map );
if( !filename.isEmpty() )
{
QString currentFileName = QFileInfo( filename ).fileName();
DocLnk doc;
doc.setType( "text/plain" );
doc.setFile( filename );
doc.setName( currentFileName );
FileManager fm;
fm.saveFile( doc, m_output->text() );
}
}
void InstallDlg::slotOutput( char *msg )
{
// Allow processing of other events
qApp->processEvents();
QString lineStr = msg;
if ( lineStr[lineStr.length()-1] == '\n' )
lineStr.truncate( lineStr.length() - 1 );
m_output->append( lineStr );
m_output->setCursorPosition( m_output->numLines(), 0 );
}
diff --git a/noncore/settings/packagemanager/main.cpp b/noncore/settings/packagemanager/main.cpp
index 18ed644..c050e1a 100644
--- a/noncore/settings/packagemanager/main.cpp
+++ b/noncore/settings/packagemanager/main.cpp
@@ -10,25 +10,26 @@
.="- .-=="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,
Boston, MA 02111-1307, USA.
*/
#include "mainwindow.h"
#include <opie2/oapplicationfactory.h>
+using namespace Opie::Core;
OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index 84c6de4..592de3e 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -21,48 +21,49 @@
++=   -.     .`     .: 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 <qcheckbox.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qscrollview.h>
#include <qpe/resource.h>
+using namespace Opie::Ui;
OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent )
: QDialog( parent, QString::null, true )
, m_ipkg( ipkg )
, m_configs( 0x0 )
, m_installOptions( installOptions )
, m_serverNew( false )
, m_serverCurrent( -1 )
, m_destNew( false )
, 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
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.h b/noncore/settings/packagemanager/oipkgconfigdlg.h
index 88e020a..0aba898 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.h
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.h
@@ -53,49 +53,49 @@ public:
OIpkgConfigDlg( OIpkg *ipkg = 0x0, bool installOptions = false, QWidget *parent = 0x0 );
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 cached information
bool m_serverNew; // Indicates if server information is for a new server
int m_serverCurrent; // Index of currently selected server in m_serverList
QString m_serverCurrName; // Name of currently selected server in m_serverList
// Destination cached information
bool m_destNew; // Indicates if destination information is for a new destination
int m_destCurrent; // Index of currently selected destination in m_destList
QString m_destCurrName; // Name of currently selected destination in m_destList
// UI controls
QVBoxLayout m_layout; // Main dialog layout control
- OTabWidget m_tabWidget; // Main tab widget 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
QLineEdit *m_serverName; // Server name edit box
QLineEdit *m_serverLocation; // Server location URL edit box
QCheckBox *m_serverActive; // Activate server check box
// Destination configuration UI controls
QListBox *m_destList; // Destination list selection
QLineEdit *m_destName; // Destination name edit box
QLineEdit *m_destLocation; // Destination location URL edit box
QCheckBox *m_destActive; // Activate destination check box
// Proxy server configuration UI controls
QLineEdit *m_proxyHttpServer; // HTTP proxy server URL edit box
QCheckBox *m_proxyHttpActive; // Activate HTTP proxy check box
QLineEdit *m_proxyFtpServer; // FTP proxy server edit box
QCheckBox *m_proxyFtpActive; // Activate FTP proxy check box
QLineEdit *m_proxyUsername; // Proxy server username edit box
QLineEdit *m_proxyPassword; // Proxy server password edit box
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp
index 7abd17e..73d3de7 100644
--- a/noncore/settings/packagemanager/packageinfodlg.cpp
+++ b/noncore/settings/packagemanager/packageinfodlg.cpp
@@ -17,48 +17,49 @@
    =_        +     =;=|` 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,
Boston, MA 02111-1307, USA.
*/
#include "packageinfodlg.h"
#include "opackage.h"
#include "opackagemanager.h"
#include <qlayout.h>
#include <qpushbutton.h>
#include <qpe/resource.h>
#include <opie2/otabwidget.h>
+using namespace Opie::Ui;
PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package )
: QWidget( 0x0 )
, m_packman( pm )
, m_information( this )
, m_files( this )
{
// Initialize UI
if ( parent )
parent->setCaption( package );
QVBoxLayout *layout = new QVBoxLayout( this, 4, 2 );
OTabWidget *tabWidget = new OTabWidget( this );
layout->addWidget( tabWidget );
// Information tab
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 )
{