distpart_widget.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2004 by ian reinhart geiser * 00003 * geiseri@kde.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 #ifndef __DISTPART_WIDGET_H__ 00021 #define __DISTPART_WIDGET_H__ 00022 00023 00024 #include <qwidget.h> 00025 #include <qstring.h> 00026 #include "distpart_ui.h" 00027 #include <klistbox.h> 00028 #include <qcheckbox.h> 00029 #include <kpushbutton.h> 00030 #include <klineedit.h> 00031 #include <ktextedit.h> 00032 #include <qcombobox.h> 00033 #include <qprogressbar.h> 00034 00035 class KDevProject; 00036 class DistpartPart; 00037 class QUrlOperator; 00038 class KProcess; 00039 class QTabWidget; 00040 class SpecSupport; 00041 00042 namespace KParts { 00043 class ReadOnlyPart; 00044 } 00045 00046 00047 class DistpartDialog : public distpart_ui { 00048 Q_OBJECT 00049 00050 public: 00051 00052 DistpartDialog(DistpartPart *part, QWidget *parent); 00053 ~DistpartDialog(); 00054 00055 signals: 00056 void okay(); 00057 void cancel(); 00058 void help(); 00059 void createsrc(); 00060 void resetsrc(); 00061 void buildall(); 00062 void savespec(); 00063 void loadspec(); 00064 void srcrpm(); 00065 void genhtml(); 00066 void resethtml(); 00067 void upload(); 00068 void resetupload(); 00069 00070 // Accessors and mutators to control GUI 00071 // Connect Slots to the following widgets 00072 00073 00074 public slots: 00075 // QPushButton* okayPushButton; 00076 00077 00078 void slotokayPushButtonPressed(); 00079 // QPushButton* cancelPushButton; 00080 void slotcancelPushButtonPressed(); 00081 // QPushButton* help_PushButton; 00082 // void slothelp_PushButtonPressed(); 00083 // QPushButton* createSrcArchPushButton; 00084 void slotcreateSrcArchPushButtonPressed(); 00085 // QPushButton* resetSrcPushButton; 00086 void slotresetSrcPushButtonPressed(); 00087 00088 // QPushButton* genHTMLPushButton; 00089 void slotgenHTMLPushButtonPressed(); 00090 // QPushButton* resetHTMLPushButton; 00091 void slotresetHTMLPushButtonPressed(); 00092 // QToolButton* uploadAddFileToolButton; 00093 void slotuploadAddFileToolButtonPressed(); 00094 // QToolButton* uploadRemoveToolButton; 00095 void slotuploadRemoveToolButtonPressed(); 00096 // QPushButton* uploadSubmitPushButton; 00097 void slotuploadSubmitPushButtonPressed(); 00098 // QPushButton* uploadResetPushButton; 00099 void slotuploadResetPushButtonPressed(); 00100 00101 // Connect Slots to the following widgets and add 00102 // accessors and mutators 00103 // QCheckBox* customProjectCheckBox; 00104 void slotcustomProjectCheckBoxChanged(); 00105 // QCheckBox* uploadCustomCheckBox; 00106 void slotuploadCustomCheckBoxChanged(); 00107 00108 void slotbuildAllPushButtonPressed(); 00109 void slotexportSPECPushButtonPressed(); 00110 void slotimportSPECPushButtonPressed(); 00111 void slotsrcPackagePushButtonPressed(); 00112 00113 public: 00114 bool getcustomProjectCheckBoxState(); 00115 void setcustomProjectCheckBoxState(bool state); 00116 bool getuploadCustomCheckBoxState(); 00117 void setuploadCustomCheckBoxState(bool state); 00118 00119 // Add accessors and mutators for the following 00120 00121 // QCheckBox* bzipCheckBox; 00122 bool getbzipCheckBoxState(); 00123 void setbzipCheckBoxState(bool state); 00124 // QCheckBox* appIconCheckBox; 00125 bool getappIconCheckBoxState(); 00126 void setappIconCheckBoxState(bool state); 00127 // QCheckBox* genHTMLCheckBox; 00128 bool getgenHTMLCheckBoxState(); 00129 void setgenHTMLCheckBoxState(bool state); 00130 // QCheckBox* useRPMInfoCheckBox; 00131 bool getuseRPMInfoCheckBoxState(); 00132 void setuseRPMInfoCheckBoxState(bool state); 00133 // QCheckBox* uploadAppsKDEcomCheckBox; 00134 bool getuploadAppsKDEcomCheckBoxState(); 00135 void setuploadAppsKDEcomCheckBoxState(bool state); 00136 // QCheckBox* uploadftpkdeorgCheckBox; 00137 bool getuploadftpkdeorgCheckBoxState(); 00138 void setuploadftpkdeorgCheckBoxState(bool state); 00139 // QCheckBox* devPackageCheckBox; 00140 bool getdevPackageCheckBoxState(); 00141 void setdevPackageCheckBoxState(bool state); 00142 // QCheckBox* docsPackageCheckBox; 00143 bool getdocsPackageCheckBoxState(); 00144 void setdocsPackageCheckBoxState(bool state); 00145 // QLineEdit* archNameFormatLineEdit; 00146 QString getarchNameFormatLineEditText(); 00147 void setarchNameFormatLineEditText(QString text); 00148 // QLineEdit* appNameLineEdit; 00149 QString getappNameFormatLineEditText(); 00150 void setappNameFormatLineEditText(QString text); 00151 // QLineEdit* summaryLineEdit; 00152 QString getsummaryLineEditText(); 00153 void setsummaryLineEditText(QString text); 00154 // QLineEdit* groupLineEdit; 00155 QString getgroupLineEditText(); 00156 void setgroupLineEditText(QString text); 00157 // QLineEdit* releaseLineEdit; 00158 QString getreleaseLineEditText(); 00159 void setreleaseLineEditText(QString text); 00160 // QLineEdit* VersionLineEdit; 00161 QString getversionLineEditText(); 00162 void setversionLineEditText(QString text); 00163 // QLineEdit* VendorLineEdit; 00164 QString getvendorLineEditText(); 00165 void setvendorLineEditText(QString text); 00166 // QLineEdit* LicenseLineEdit; 00167 QString getlicenseLineEditText(); 00168 void setlicenseLineEditText(QString text); 00169 // QLineEdit* uploadURLLineEdit; 00170 QString getuploadURLLineEditText(); 00171 void setuploadURLLineEditText(QString text); 00172 // QLineEdit* PackagerLineEdit; 00173 QString getpackagerLineEditText(); 00174 void setpackagerLineEditText(QString text); 00175 // QComboBox* archComboBox; 00176 QString getarchComboBoxText(); 00177 int getarchComboBoxItem(); 00178 void setarchComboBoxItem(int item); 00179 // QListBox* uploadFileListBox; 00180 QString getuploadFileListBoxText(); 00181 int getuploadFileListBoxItem(); 00182 void setuploadFileListBoxItem(int item); 00183 // QListBox* srcDistFileListBox; 00184 QString getsrcDistFileListBoxText(); 00185 int getsrcDistFileListBoxItem(); 00186 void setsrcDistFileListBoxItem(int item); 00187 // QMultiLineEdit* projectDescriptionMultilineEdit; 00188 QString getprojectDescriptionMultilineEditText(); 00189 void setprojectDescriptionMultilineEditText(QString text); 00190 00191 QString getprojectChangelogMultilineEditText(); 00192 void setprojectChangelogMultilineEditText(QString text); 00193 00194 QString getSourceName(); 00195 00196 private: 00197 void loadSettings(); 00198 void storeSettings(); 00199 void setPackageData(); 00200 void getPackageData(); 00201 00202 SpecSupport *m_spec; 00203 DistpartPart *m_part; 00204 QString dir; 00205 }; 00206 00207 00208 #endif