[PC-BSD Commits] r15873 - pcbsd/current/src-qt4/libpcbsd

svn at pcbsd.org svn at pcbsd.org
Wed Mar 21 06:09:56 PDT 2012


Author: kris
Date: 2012-03-21 13:09:56 +0000 (Wed, 21 Mar 2012)
New Revision: 15873

Added:
   pcbsd/current/src-qt4/libpcbsd/metaWidget.cpp
Modified:
   pcbsd/current/src-qt4/libpcbsd/libpcbsd.pro
   pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h
Log:

Start adding metaWidget to libpcbsd, which is our GUI widget for adjusting
meta-pkgs. This will be what goes into the warden for adjusting a ports
meta-pkgs, along with the pc-sysmanager utility eventually. 



Modified: pcbsd/current/src-qt4/libpcbsd/libpcbsd.pro
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/libpcbsd.pro	2012-03-21 12:28:28 UTC (rev 15872)
+++ pcbsd/current/src-qt4/libpcbsd/libpcbsd.pro	2012-03-21 13:09:56 UTC (rev 15873)
@@ -10,7 +10,8 @@
 
 SOURCES	+= netif.cpp \
 	utils.cpp \
-        hardware.cpp
+        hardware.cpp \
+	metaWidget.cpp
 
 TARGET=/usr/local/lib/pcbsd
 

Modified: pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h	2012-03-21 12:28:28 UTC (rev 15872)
+++ pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h	2012-03-21 13:09:56 UTC (rev 15873)
@@ -21,6 +21,16 @@
  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
  *   OTHER DEALINGS IN THE SOFTWARE.                                       *
  ***************************************************************************/
+#include <QDialog>
+#include <QLabel>
+#include <QPushButton>
+#include <QProcess>
+#include <QProgressDialog>
+#include <QMenu>
+#include <QMessageBox>
+#include <QTreeWidget>
+#include <QWidget>
+
  
 #ifndef _PCBSD_UTILS_H_
 #define _PCBSD_UTILS_H_
@@ -60,4 +70,75 @@
    static QStringList quickUserInputBox( QString title, QStringList inputList );
 };
 
+class metaWidget : public QWidget
+{
+        Q_OBJECT
+
+public:
+        metaWidget() : QWidget()
+        {
+        }
+
+     void init(QString chroot);
+
+public slots:
+
+private slots:
+   void slotMetaRightClick();
+   void slotMetaViewPkgs();
+   void slotDeskPkgsChanged(QTreeWidgetItem *aItem, int __unused);
+   void slotApplyMetaChanges();
+   void slotMetaAddDone();
+   void slotMetaAddRead(); 
+   void slotMetaDelDone();
+   void slotMetaDelRead();
+   void startMetaChanges();
+   void slotFinishLoadingMetaPkgs();
+   void slotGetPackageDataOutput();
+
+private:
+   QTreeWidget *treeMetaPkgs;
+   QLabel *label_2;
+   QPushButton *pushApplyMeta;
+   QList<QStringList> metaPkgList;
+   QStringList tmpMetaPkgList;
+   QProcess *addMetaProc;
+   QProcess *delMetaProc;
+   QProcess *getMetaProc;
+   QProgressDialog *delprogress;
+   QProgressDialog *addprogress;
+   QString addPkgs;
+   QString delPkgs;
+   QString pkgSource;
+   QString rDir;
+   QString Version;
+   QString Arch;
+
+   QMenu *popup;
+   //dialogMetaProgress *metaProgressDel;
+   //dialogMetaProgress *metaProgressAdd;
+   //dialogInfoBox *dIB;
+   
+
+
+   void uncheckAllChildrenPkgs(QString parent);
+   void checkAllChildrenPkgs(QString parent);
+   bool allChildrenPkgsUnchecked(QString parent);
+   bool allChildrenPkgsChecked(QString parent);
+   QString getDelPkgs();
+   QString getAddPkgs();
+   bool haveMetaPkgChanges();
+   bool haveAMetaDesktop();
+   bool getMediaLocation(QString &source, QString &dir);
+   void saveMetaPkgs();
+   void parseTmpMetaList();
+   bool isMetaPkgInstalled(QString mPkg);
+   void addTreeItems(QString parent);
+   void populateMetaPkgs();
+   QString getLineFromCommandOutput( QString cmd );
+
+signals:
+
+} ;
+
 #endif



More information about the Commits mailing list