Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

installdlg.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the Opie Project
00003 
00004                              Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
00005               =.
00006             .=l.
00007            .>+-=
00008  _;:,     .>    :=|.         This program is free software; you can
00009 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00010 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00011 .="- .-=="i,     .._         License as published by the Free Software
00012  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00013      ._= =}       :          or (at your option) any later version.
00014     .%`+i>       _;_.
00015     .i_,=:_.      -<s.       This program is distributed in the hope that
00016      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00017     : ..    .:,     . . .    without even the implied warranty of
00018     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00019   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00020 ..}^=.=       =       ;      Library General Public License for more
00021 ++=   -.     .`     .:       details.
00022 :     =  ...= . :.=-
00023  -.   .:....=;==+<;          You should have received a copy of the GNU
00024   -_. . .   )=.  =           Library General Public License along with
00025     --        :-=`           this library; see the file COPYING.LIB.
00026                              If not, write to the Free Software Foundation,
00027                              Inc., 59 Temple Place - Suite 330,
00028                              Boston, MA 02111-1307, USA.
00029 */
00030 
00031 #ifndef INSTALLDLG_H
00032 #define INSTALLDLG_H
00033 
00034 #include <qwidget.h>
00035 
00036 #include "opackage.h"
00037 
00038 class QComboBox;
00039 class QLabel;
00040 class QMultiLineEdit;
00041 class QPushButton;
00042 
00043 class OConfItem;
00044 class OPackageManager;
00045 
00046 class InstallDlg : public QWidget
00047 {
00048     Q_OBJECT
00049 
00050 public:
00051     InstallDlg( QWidget *parent = 0l, OPackageManager *pm = 0l,
00052                 const QString &caption = QString::null,
00053                 OPackage::Command command1 = OPackage::NotDefined,
00054                 const QStringList &packages1 = QStringList(),
00055                 OPackage::Command command2 = OPackage::NotDefined,
00056                 const QStringList &packages2 = QStringList(),
00057                 OPackage::Command command3 = OPackage::NotDefined,
00058                 const QStringList &packages3 = QStringList() );
00059 
00060 private:
00061     OPackageManager *m_packman;     // Pointer to application instance of package manager
00062     
00063     bool m_installFound; // Indicates if an install is being done, controls display of
00064                          // destination selection, available space
00065 
00066     // UI controls
00067     QComboBox       *m_destination; // Destination selection list
00068     QLabel          *m_availSpace;  // Text label to display available space on selected destination
00069     QMultiLineEdit  *m_output;      // Multi-line edit to display status
00070     QPushButton     *m_btnStart;    // Start/abort/close button
00071     QPushButton     *m_btnOptions;  // Installation options button
00072 
00073     // Commands and packages to execute
00074     int               m_numCommands; // Number of commands to be executed
00075     int               m_currCommand; // Number of currently executing command
00076     OPackage::Command m_command[3];  // List of commands to be executed
00077     QStringList       m_packages[3]; // Lists of package names associated to commands (m_command[])
00078     OConfItem        *m_destItem;    // Pointer to destination for package installation
00079 
00080 private slots:
00081     // UI control slots
00082     void slotDisplayAvailSpace( const QString &destination );
00083     void slotBtnStart();
00084     void slotBtnOptions();
00085     
00086     // Execution slots
00087     void slotOutput( const QString &msg );
00088 
00089 signals:
00090     void closeInstallDlg();
00091 };
00092 
00093 #endif

Generated on Sat Nov 5 16:17:57 2005 for OPIE by  doxygen 1.4.2