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 OIPKGCONFIGDLG_H 00032 #define OIPKGCONFIGDLG_H 00033 00034 #include <opie2/otabwidget.h> 00035 00036 #include <qdialog.h> 00037 #include <qlayout.h> 00038 00039 #include "oipkg.h" 00040 00041 class QCheckBox; 00042 class QComboBox; 00043 class QLineEdit; 00044 class QListBox; 00045 class QPushButton; 00046 00047 class OIpkgConfigDlg : public QDialog 00048 { 00049 Q_OBJECT 00050 00051 public: 00052 OIpkgConfigDlg( OIpkg *ipkg = 0l, bool installOptions = false, QWidget *parent = 0l ); 00053 00054 protected slots: 00055 void accept(); 00056 void reject(); 00057 00058 private: 00059 OIpkg *m_ipkg; // Pointer to Ipkg class for retrieving/saving configuration options 00060 OConfItemList *m_configs; // Local list of configuration items 00061 00062 bool m_installOptions; // If true, will only display the Options tab 00063 00064 // Server/Destination cached information 00065 int m_serverCurrent; // Index of currently selected server in m_serverList 00066 int m_destCurrent; // Index of currently selected destination in m_destList 00067 00068 // UI controls 00069 QVBoxLayout m_layout; // Main dialog layout control 00070 Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control 00071 QWidget *m_serverWidget; // Widget containing server configuration controls 00072 QWidget *m_destWidget; // Widget containing destination configuration controls 00073 QWidget *m_proxyWidget; // Widget containing proxy configuration controls 00074 QWidget *m_optionsWidget; // Widget containing ipkg execution configuration controls 00075 00076 // Server configuration UI controls 00077 QListBox *m_serverList; // Server list selection 00078 QPushButton *m_serverEditBtn; // Server edit button 00079 QPushButton *m_serverDeleteBtn; // Server edit button 00080 00081 // Destination configuration UI controls 00082 QListBox *m_destList; // Destination list selection 00083 QPushButton *m_destEditBtn; // Destination edit button 00084 QPushButton *m_destDeleteBtn; // Destination edit button 00085 00086 // Proxy server configuration UI controls 00087 QLineEdit *m_proxyHttpServer; // HTTP proxy server URL edit box 00088 QCheckBox *m_proxyHttpActive; // Activate HTTP proxy check box 00089 QLineEdit *m_proxyFtpServer; // FTP proxy server edit box 00090 QCheckBox *m_proxyFtpActive; // Activate FTP proxy check box 00091 QLineEdit *m_proxyUsername; // Proxy server username edit box 00092 QLineEdit *m_proxyPassword; // Proxy server password edit box 00093 00094 // Options configuration UI controls 00095 QCheckBox *m_optForceDepends; // Force depends ipkg option checkbox 00096 QCheckBox *m_optForceReinstall; // Force reinstall ipkg option checkbox 00097 QCheckBox *m_optForceRemove; // Force remove ipkg option checkbox 00098 QCheckBox *m_optForceOverwrite; // Force overwrite ipkg option checkbox 00099 QComboBox *m_optVerboseIpkg; // Ipkg verbosity option selection 00100 QLineEdit *m_optSourceLists; // Ipkg source lists destination directory 00101 00102 void initServerWidget(); 00103 void initDestinationWidget(); 00104 void initProxyWidget(); 00105 void initOptionsWidget(); 00106 00107 void initData(); 00108 00109 private slots: 00110 void slotServerSelected( int index ); 00111 void slotServerNew(); 00112 void slotServerEdit(); 00113 void slotServerDelete(); 00114 00115 void slotDestSelected( int index ); 00116 void slotDestNew(); 00117 void slotDestEdit(); 00118 void slotDestDelete(); 00119 00120 void slotOptSelectSourceListsPath(); 00121 }; 00122 00123 class OIpkgServerDlg : public QDialog 00124 { 00125 Q_OBJECT 00126 00127 public: 00128 OIpkgServerDlg( OConfItem *server = 0l, QWidget *parent = 0l ); 00129 00130 protected slots: 00131 void accept(); 00132 00133 private: 00134 OConfItem *m_server; 00135 00136 // UI controls 00137 QLineEdit *m_name; // Server name edit box 00138 QLineEdit *m_location; // Server location URL edit box 00139 QCheckBox *m_compressed; // Indicates whether the server is a 'src/gz' feed 00140 QCheckBox *m_active; // Indicates whether the server is activated 00141 }; 00142 00143 class OIpkgDestDlg : public QDialog 00144 { 00145 Q_OBJECT 00146 00147 public: 00148 OIpkgDestDlg( OConfItem *dest = 0l, QWidget *parent = 0l ); 00149 00150 protected slots: 00151 void accept(); 00152 00153 private: 00154 OConfItem *m_dest; 00155 00156 // UI controls 00157 QLineEdit *m_name; // Destination name edit box 00158 QLineEdit *m_location; // Destination location URL edit box 00159 QCheckBox *m_active; // Indicates whether the destination is activated 00160 00161 private slots: 00162 void slotSelectPath(); 00163 }; 00164 00165 #endif
1.4.2