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

installdlgimpl.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the OPIE Project
00003                              
00004                =.            Copyright (c)  2002 Andy Qua <andy.qua@blueyonder.co.uk>
00005              .=l.                                Dan Williams <drw@handhelds.org>
00006            .>+-=
00007  _;:,     .>    :=|.         This file is free software; you can
00008 .> <`_,   >  .   <=          redistribute it and/or modify it under
00009 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00010 .="- .-=="i,     .._         License as published by the Free Software
00011  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00012      ._= =}       :          or (at your option) any later version.
00013     .%`+i>       _;_.
00014     .i_,=:_.      -<s.       This file is distributed in the hope that
00015      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00016     : ..    .:,     . . .    without even the implied warranty of
00017     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00018   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00019 ..}^=.=       =       ;      Public License for more details.
00020 ++=   -.     .`     .:
00021  :     =  ...= . :.=-        You should have received a copy of the GNU
00022  -.   .:....=;==+<;          General Public License along with this file;
00023   -_. . .   )=.  =           see the file COPYING. If not, write to the
00024     --        :-=`           Free Software Foundation, Inc.,
00025                              59 Temple Place - Suite 330,
00026                              Boston, MA 02111-1307, USA.
00027 
00028 */
00029 
00030 #ifndef INSTALLDLGIMPL_H
00031 #define INSTALLDLGIMPL_H
00032 
00033 #include <qlist.h>
00034 #include <qstring.h>
00035 #include <qwidget.h>
00036 
00037 class QComboBox;
00038 class QLabel;
00039 class QMultiLineEdit;
00040 class QPushButton;
00041 
00042 class DataManager;
00043 class Destination;
00044 class Ipkg;
00045 
00046 class InstallData
00047 {
00048 public:
00049     QString option;            // I - install, D - delete, R- reinstall U - upgrade
00050     QString packageName;
00051     Destination *destination;
00052     bool recreateLinks;
00053 };
00054 
00055 class InstallDlgImpl : public QWidget
00056 {
00057     Q_OBJECT
00058 public:
00059     InstallDlgImpl( const QList<InstallData> &packageList, DataManager *dataManager, const char *title = 0 );
00060     InstallDlgImpl( Ipkg *ipkg, QString initialText, const char *title = 0 );
00061     ~InstallDlgImpl();
00062 
00063         bool upgradeServer( QString &server );
00064 
00065 protected:
00066 
00067 private:
00068     DataManager *dataMgr;
00069     QList<InstallData> packages;
00070         bool firstPackage;
00071     int flags;
00072     int infoLevel;
00073     Ipkg *pIpkg;
00074     bool upgradePackages;
00075     
00076     QComboBox      *destination;
00077     QPushButton    *btnInstall;
00078     QPushButton    *btnOptions;
00079     QMultiLineEdit *output;
00080     QLabel         *txtAvailableSpace;
00081 
00082     void init( bool );
00083     
00084     bool runIpkg( QString &option, const QString& package, const QString& dest, int flags );
00085 
00086 signals:
00087     void reloadData( InstallDlgImpl * );
00088         
00089 public slots:
00090     void optionsSelected();
00091     void installSelected();
00092     void displayText(const QString &text );
00093     void displayAvailableSpace( const QString &text);
00094         void ipkgFinished();
00095 };
00096 
00097 #endif

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