[PC-BSD Commits] r2178 - in pcbsd/trunk/kcmPFManager: . config

svn at pcbsd.org svn at pcbsd.org
Thu Jun 26 13:10:40 PDT 2008


Author: kris
Date: 2008-06-26 13:10:39 -0700 (Thu, 26 Jun 2008)
New Revision: 2178

Added:
   pcbsd/trunk/kcmPFManager/NewLogoSmall.png
   pcbsd/trunk/kcmPFManager/notroot.cpp
   pcbsd/trunk/kcmPFManager/notroot.h
   pcbsd/trunk/kcmPFManager/pfmanager.qrc
Modified:
   pcbsd/trunk/kcmPFManager/adddlg.ui
   pcbsd/trunk/kcmPFManager/config/packetfilter.cpp
   pcbsd/trunk/kcmPFManager/config/rcconfig.cpp
   pcbsd/trunk/kcmPFManager/config/services.cpp
   pcbsd/trunk/kcmPFManager/kcm.cpp
   pcbsd/trunk/kcmPFManager/kcm.hpp
   pcbsd/trunk/kcmPFManager/mainwindow.ui
   pcbsd/trunk/kcmPFManager/notroot.ui
   pcbsd/trunk/kcmPFManager/pfaddlg.cpp
   pcbsd/trunk/kcmPFManager/pfaddlg.hpp
   pcbsd/trunk/kcmPFManager/pfmanager.pro
   pcbsd/trunk/kcmPFManager/pfmanagerdlg.cpp
   pcbsd/trunk/kcmPFManager/pfmanagerdlg.hpp
   pcbsd/trunk/kcmPFManager/taggedlistviewitem.hpp
Log:

Updated PF manager to KDE 4



Added: pcbsd/trunk/kcmPFManager/NewLogoSmall.png


Property changes on: pcbsd/trunk/kcmPFManager/NewLogoSmall.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: pcbsd/trunk/kcmPFManager/adddlg.ui
===================================================================
--- pcbsd/trunk/kcmPFManager/adddlg.ui	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/adddlg.ui	2008-06-26 20:10:39 UTC (rev 2178)
@@ -1,185 +1,184 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>AddDlg</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>AddDlg</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>246</width>
-            <height>312</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Add a port</string>
-    </property>
-    <property name="modal">
-        <bool>true</bool>
-    </property>
-    <grid>
-        <property name="name">
-            <cstring>unnamed</cstring>
+<ui version="4.0" >
+ <class>AddDlg</class>
+ <widget class="QDialog" name="AddDlg" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>246</width>
+    <height>312</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Add a port</string>
+  </property>
+  <property name="modal" >
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" colspan="3" >
+    <widget class="Q3ButtonGroup" name="bgInfo" >
+     <property name="title" >
+      <string>Add</string>
+     </property>
+     <property name="frameShape" >
+      <enum>Q3GroupBox::GroupBoxPanel</enum>
+     </property>
+     <property name="frameShadow" >
+      <enum>Q3GroupBox::Sunken</enum>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="lbService" >
+        <property name="text" >
+         <string>Service:</string>
         </property>
-        <widget class="QButtonGroup" row="0" column="0" rowspan="1" colspan="3">
-            <property name="name">
-                <cstring>bgInfo</cstring>
-            </property>
-            <property name="frameShape">
-                <enum>GroupBoxPanel</enum>
-            </property>
-            <property name="frameShadow">
-                <enum>Sunken</enum>
-            </property>
-            <property name="title">
-                <string>Add</string>
-            </property>
-            <grid>
-                <property name="name">
-                    <cstring>unnamed</cstring>
-                </property>
-                <widget class="QLabel" row="0" column="0">
-                    <property name="name">
-                        <cstring>lbService</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Service:</string>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="2" column="0">
-                    <property name="name">
-                        <cstring>lbPolicy</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Policy:</string>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="5" column="0" rowspan="2" colspan="1">
-                    <property name="name">
-                        <cstring>txProtocol</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Protocol:</string>
-                    </property>
-                </widget>
-                <widget class="QRadioButton" row="3" column="1" rowspan="1" colspan="2">
-                    <property name="name">
-                        <cstring>rbBlock</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Block</string>
-                    </property>
-                </widget>
-                <widget class="QRadioButton" row="2" column="1" rowspan="1" colspan="2">
-                    <property name="name">
-                        <cstring>rbAllow</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Allow</string>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="7" column="0">
-                    <property name="name">
-                        <cstring>lbInterface</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Interface:</string>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="1" column="0">
-                    <property name="name">
-                        <cstring>lbPort</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Port:</string>
-                    </property>
-                </widget>
-                <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2">
-                    <property name="name">
-                        <cstring>txPort</cstring>
-                    </property>
-                </widget>
-                <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="2">
-                    <property name="name">
-                        <cstring>cbServices</cstring>
-                    </property>
-                    <property name="editable">
-                        <bool>true</bool>
-                    </property>
-                    <property name="autoCompletion">
-                        <bool>true</bool>
-                    </property>
-                </widget>
-                <widget class="QComboBox" row="4" column="2">
-                    <property name="name">
-                        <cstring>cbDirection</cstring>
-                    </property>
-                </widget>
-                <widget class="QComboBox" row="5" column="2">
-                    <property name="name">
-                        <cstring>cbProtocol</cstring>
-                    </property>
-                </widget>
-                <widget class="QComboBox" row="6" column="2" rowspan="2" colspan="1">
-                    <property name="name">
-                        <cstring>cbInterfaces</cstring>
-                    </property>
-                </widget>
-                <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2">
-                    <property name="name">
-                        <cstring>txDirection</cstring>
-                    </property>
-                    <property name="text">
-                        <string>Direction:</string>
-                    </property>
-                </widget>
-            </grid>
-        </widget>
-        <widget class="QPushButton" row="1" column="1">
-            <property name="name">
-                <cstring>pbOkay</cstring>
-            </property>
-            <property name="text">
-                <string>Ok</string>
-            </property>
-        </widget>
-        <widget class="QPushButton" row="1" column="2">
-            <property name="name">
-                <cstring>pbCancel</cstring>
-            </property>
-            <property name="text">
-                <string>Cancel</string>
-            </property>
-        </widget>
-        <spacer row="1" column="0">
-            <property name="name">
-                <cstring>spacer1</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Horizontal</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Expanding</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>61</width>
-                    <height>21</height>
-                </size>
-            </property>
-        </spacer>
-    </grid>
-</widget>
-<tabstops>
-    <tabstop>cbServices</tabstop>
-    <tabstop>txPort</tabstop>
-    <tabstop>rbAllow</tabstop>
-    <tabstop>rbBlock</tabstop>
-    <tabstop>cbDirection</tabstop>
-    <tabstop>cbProtocol</tabstop>
-    <tabstop>pbOkay</tabstop>
-    <tabstop>pbCancel</tabstop>
-</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" >
+       <widget class="QLabel" name="lbPolicy" >
+        <property name="text" >
+         <string>Policy:</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item rowspan="2" row="5" column="0" >
+       <widget class="QLabel" name="txProtocol" >
+        <property name="text" >
+         <string>Protocol:</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" colspan="2" >
+       <widget class="QRadioButton" name="rbBlock" >
+        <property name="text" >
+         <string>Block</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" colspan="2" >
+       <widget class="QRadioButton" name="rbAllow" >
+        <property name="text" >
+         <string>Allow</string>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0" >
+       <widget class="QLabel" name="lbInterface" >
+        <property name="text" >
+         <string>Interface:</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="lbPort" >
+        <property name="text" >
+         <string>Port:</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" colspan="2" >
+       <widget class="QLineEdit" name="txPort" />
+      </item>
+      <item row="0" column="1" colspan="2" >
+       <widget class="QComboBox" name="cbServices" >
+        <property name="editable" >
+         <bool>true</bool>
+        </property>
+        <property name="autoCompletion" >
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2" >
+       <widget class="QComboBox" name="cbDirection" />
+      </item>
+      <item row="5" column="2" >
+       <widget class="QComboBox" name="cbProtocol" />
+      </item>
+      <item rowspan="2" row="6" column="2" >
+       <widget class="QComboBox" name="cbInterfaces" />
+      </item>
+      <item row="4" column="0" colspan="2" >
+       <widget class="QLabel" name="txDirection" >
+        <property name="text" >
+         <string>Direction:</string>
+        </property>
+        <property name="wordWrap" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="1" >
+    <widget class="QPushButton" name="pbOkay" >
+     <property name="text" >
+      <string>Ok</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2" >
+    <widget class="QPushButton" name="pbCancel" >
+     <property name="text" >
+      <string>Cancel</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <spacer name="spacer1" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>61</width>
+       <height>21</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>Q3ButtonGroup</class>
+   <extends>Q3GroupBox</extends>
+   <header>Qt3Support/Q3ButtonGroup</header>
+   <container>1</container>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>cbServices</tabstop>
+  <tabstop>txPort</tabstop>
+  <tabstop>rbAllow</tabstop>
+  <tabstop>rbBlock</tabstop>
+  <tabstop>cbDirection</tabstop>
+  <tabstop>cbProtocol</tabstop>
+  <tabstop>pbOkay</tabstop>
+  <tabstop>pbCancel</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>

Modified: pcbsd/trunk/kcmPFManager/config/packetfilter.cpp
===================================================================
--- pcbsd/trunk/kcmPFManager/config/packetfilter.cpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/config/packetfilter.cpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -4,10 +4,11 @@
 #include "services.hpp"
 #include "rcconfig.hpp"
 #include <qfile.h>
-#include <qprocess.h>
 #include <qregexp.h>
 #include <qstringlist.h>
-#include <qurloperator.h>
+#include <qtextstream.h>
+#include <Q3Process>
+#include <Q3UrlOperator>
 
 #include <iostream>
 
@@ -174,7 +175,7 @@
 
 void PacketFilter::start ( void )
 {
-    QProcess proc;
+    Q3Process proc;
     
     proc.addArgument("pfctl");
     proc.addArgument("-e");
@@ -190,7 +191,7 @@
 
 void PacketFilter::stop ( void )
 {
-    QProcess proc;
+    Q3Process proc;
     
     // Disable the pf firewall
     proc.addArgument("pfctl");
@@ -213,7 +214,7 @@
 
 void PacketFilter::backup ( void )
 {
-    QUrlOperator *op = new QUrlOperator;
+    Q3UrlOperator *op = new Q3UrlOperator;
     QString file = "file:///" + _rulefile;
     QString backup = "file:///" + _rulefile + "~";
     
@@ -222,7 +223,7 @@
 
 void PacketFilter::restore ( void )
 {
-    QUrlOperator *op = new QUrlOperator;
+    Q3UrlOperator *op = new Q3UrlOperator;
     QString file = "file:/" + _rulefile;
     QString backup = "file:/" + _rulefile + "~";
     
@@ -231,7 +232,7 @@
 
 bool PacketFilter::isRunning(void)
 {
-    QProcess proc;
+    Q3Process proc;
     
     // Query pf
     proc.addArgument("pfctl");

Modified: pcbsd/trunk/kcmPFManager/config/rcconfig.cpp
===================================================================
--- pcbsd/trunk/kcmPFManager/config/rcconfig.cpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/config/rcconfig.cpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -3,6 +3,7 @@
 #include <qfile.h>
 #include <qtextstream.h>
 #include <iostream>
+#include <QRegExp>
 
 RcConfig::RcConfig ( void )
     : _modified(false)
@@ -28,7 +29,7 @@
         QTextStream stream(&file);
         QString line;
            
-        while ( !stream.eof() )
+        while ( !stream.atEnd() )
         {
             line = stream.readLine();
             // Push back the lines of the file
@@ -107,7 +108,7 @@
 bool RcConfig::isEnabled ( const QString& service ) const
 {
     const QString sregex = service + "_enable=\"[a-zA-Z]+\"\\s*";
-    const QString regex(sregex);
+    const QRegExp regex(sregex);
     qstr_vector_cit found;
     bool enabled = false;
     

Modified: pcbsd/trunk/kcmPFManager/config/services.cpp
===================================================================
--- pcbsd/trunk/kcmPFManager/config/services.cpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/config/services.cpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -28,7 +28,7 @@
         QTextStream stream(&serv);
         QString line;
         
-        while ( !stream.eof() )
+        while ( !stream.atEnd() )
         {
             line = stream.readLine();
             if ( line[0] != '#' )

Modified: pcbsd/trunk/kcmPFManager/kcm.cpp
===================================================================
--- pcbsd/trunk/kcmPFManager/kcm.cpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/kcm.cpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -1,35 +1,43 @@
 
 #include <klocale.h>
 #include <kglobal.h>
-#include <kparts/genericfactory.h>
+#include <kgenericfactory.h>
 #include <qprocess.h>
 #include <qmessagebox.h>
 #include <qlayout.h>
 #include "kcm.hpp"
-#include "mainwindow.h"
+#include "pfmanagerdlg.hpp"
+#include "ui_mainwindow.h"
 #include "notroot.h"
 
-PFManager::PFManager ( QWidget *widget, const char *name, const QStringList& list )
-    : KCModule(widget, name, list)
+K_PLUGIN_FACTORY(PFManagerFactory,
+                 registerPlugin<PFManager>();
+                )
+K_EXPORT_PLUGIN(PFManagerFactory("kcm_pfmanager"))
+
+
+PFManager::PFManager(QWidget *parent, const QVariantList &lst)
+   :    KCModule(PFManagerFactory::componentData(), parent, lst)
+
 {
     _layout = new QGridLayout(this);
     _layout->setAutoAdd(true);
 
     setButtons(0);
   QString LANG="PFManager";
-  KGlobal::locale()->insertCatalogue(LANG);
+  //KGlobal::locale()->insertCatalogue(LANG);
 
 
     if ( isRoot() )
     { // Show our dialog
-        _dlg = new PFManagerDlg(widget);
+        _dlg = new PFManagerDlg();
         
         _dlg->reparent(this, QPoint());
         load();
     }
     else
     { // Show some fancy error message
-        NotRoot *noroot = new NotRoot(widget);
+        NotRoot *noroot = new NotRoot();
         // Not in as root
         noroot->reparent(this, QPoint());
     }
@@ -54,12 +62,3 @@
     return ( getuid() == 0 );
 }
 
-typedef KGenericFactory<PFManager, QWidget> PFManagerFactory;
-K_EXPORT_COMPONENT_FACTORY(kcm_PFManager, PFManagerFactory("kcm_pfmanager"))
-
-extern "C" {
-   KCModule *create_pfmanager(QWidget  *parent, const char  *name) {
-      return new PFManager(parent, name);
-   }
-}
-

Modified: pcbsd/trunk/kcmPFManager/kcm.hpp
===================================================================
--- pcbsd/trunk/kcmPFManager/kcm.hpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/kcm.hpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -14,7 +14,7 @@
 
 public:
 
-    PFManager ( QWidget *widget, const char * = NULL, const QStringList& = QStringList() );
+    PFManager ( QWidget *widget, const QVariantList& = QVariantList() );
     ~PFManager ( void );
 
     void load ( void );

Modified: pcbsd/trunk/kcmPFManager/mainwindow.ui
===================================================================
--- pcbsd/trunk/kcmPFManager/mainwindow.ui	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/mainwindow.ui	2008-06-26 20:10:39 UTC (rev 2178)
@@ -1,310 +1,299 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>MainDialog</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>MainDialog</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>407</width>
-            <height>302</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Firewall Manager</string>
-    </property>
-    <grid>
-        <property name="name">
-            <cstring>unnamed</cstring>
-        </property>
-        <widget class="QTabWidget" row="0" column="0">
-            <property name="name">
-                <cstring>tabWidget4</cstring>
+<ui version="4.0" >
+ <class>MainDialog</class>
+ <widget class="QDialog" name="MainDialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>407</width>
+    <height>302</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Firewall Manager</string>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" >
+    <widget class="QTabWidget" name="tabWidget4" >
+     <property name="currentIndex" >
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="tab" >
+      <property name="geometry" >
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>387</width>
+        <height>255</height>
+       </rect>
+      </property>
+      <attribute name="title" >
+       <string>General</string>
+      </attribute>
+      <layout class="QGridLayout" >
+       <item row="0" column="0" >
+        <widget class="Q3ButtonGroup" name="bgGeneral" >
+         <property name="title" >
+          <string>General settings</string>
+         </property>
+         <layout class="QGridLayout" >
+          <item row="0" column="0" >
+           <widget class="QCheckBox" name="cbEnable" >
+            <property name="text" >
+             <string>Enable Firewall on startup</string>
             </property>
-            <widget class="QWidget">
-                <property name="name">
-                    <cstring>tab</cstring>
-                </property>
-                <attribute name="title">
-                    <string>General</string>
-                </attribute>
-                <grid>
-                    <property name="name">
-                        <cstring>unnamed</cstring>
-                    </property>
-                    <widget class="QButtonGroup" row="0" column="0">
-                        <property name="name">
-                            <cstring>bgGeneral</cstring>
-                        </property>
-                        <property name="title">
-                            <string>General settings</string>
-                        </property>
-                        <grid>
-                            <property name="name">
-                                <cstring>unnamed</cstring>
-                            </property>
-                            <widget class="QCheckBox" row="0" column="0">
-                                <property name="name">
-                                    <cstring>cbEnable</cstring>
-                                </property>
-                                <property name="text">
-                                    <string>Enable Firewall on startup</string>
-                                </property>
-                            </widget>
-                            <spacer row="0" column="1">
-                                <property name="name">
-                                    <cstring>spacer8</cstring>
-                                </property>
-                                <property name="orientation">
-                                    <enum>Horizontal</enum>
-                                </property>
-                                <property name="sizeType">
-                                    <enum>Expanding</enum>
-                                </property>
-                                <property name="sizeHint">
-                                    <size>
-                                        <width>201</width>
-                                        <height>21</height>
-                                    </size>
-                                </property>
-                            </spacer>
-                        </grid>
-                    </widget>
-                    <widget class="QButtonGroup" row="1" column="0">
-                        <property name="name">
-                            <cstring>bgFirewall</cstring>
-                        </property>
-                        <property name="title">
-                            <string>Firewall</string>
-                        </property>
-                        <grid>
-                            <property name="name">
-                                <cstring>unnamed</cstring>
-                            </property>
-                            <widget class="QPushButton" row="0" column="0">
-                                <property name="name">
-                                    <cstring>pbStart</cstring>
-                                </property>
-                                <property name="text">
-                                    <string>Start</string>
-                                </property>
-                            </widget>
-                            <spacer row="0" column="3">
-                                <property name="name">
-                                    <cstring>spacer7</cstring>
-                                </property>
-                                <property name="orientation">
-                                    <enum>Horizontal</enum>
-                                </property>
-                                <property name="sizeType">
-                                    <enum>Expanding</enum>
-                                </property>
-                                <property name="sizeHint">
-                                    <size>
-                                        <width>31</width>
-                                        <height>21</height>
-                                    </size>
-                                </property>
-                            </spacer>
-                            <widget class="QPushButton" row="0" column="2">
-                                <property name="name">
-                                    <cstring>pbRestart</cstring>
-                                </property>
-                                <property name="text">
-                                    <string>Restart</string>
-                                </property>
-                            </widget>
-                            <widget class="QPushButton" row="0" column="1">
-                                <property name="name">
-                                    <cstring>pbStop</cstring>
-                                </property>
-                                <property name="text">
-                                    <string>Stop</string>
-                                </property>
-                            </widget>
-                        </grid>
-                    </widget>
-                    <spacer row="3" column="0">
-                        <property name="name">
-                            <cstring>spacer6</cstring>
-                        </property>
-                        <property name="orientation">
-                            <enum>Vertical</enum>
-                        </property>
-                        <property name="sizeType">
-                            <enum>Expanding</enum>
-                        </property>
-                        <property name="sizeHint">
-                            <size>
-                                <width>21</width>
-                                <height>70</height>
-                            </size>
-                        </property>
-                    </spacer>
-                    <widget class="QButtonGroup" row="2" column="0">
-                        <property name="name">
-                            <cstring>bgConfiguration</cstring>
-                        </property>
-                        <property name="title">
-                            <string>Configuration</string>
-                        </property>
-                        <grid>
-                            <property name="name">
-                                <cstring>unnamed</cstring>
-                            </property>
-                            <spacer row="0" column="1">
-                                <property name="name">
-                                    <cstring>spacer5_2</cstring>
-                                </property>
-                                <property name="orientation">
-                                    <enum>Horizontal</enum>
-                                </property>
-                                <property name="sizeType">
-                                    <enum>Expanding</enum>
-                                </property>
-                                <property name="sizeHint">
-                                    <size>
-                                        <width>201</width>
-                                        <height>21</height>
-                                    </size>
-                                </property>
-                            </spacer>
-                            <widget class="QPushButton" row="0" column="0">
-                                <property name="name">
-                                    <cstring>pbRestore</cstring>
-                                </property>
-                                <property name="text">
-                                    <string>Restore default configuration</string>
-                                </property>
-                            </widget>
-                        </grid>
-                    </widget>
-                </grid>
-            </widget>
-            <widget class="QWidget">
-                <property name="name">
-                    <cstring>tab</cstring>
-                </property>
-                <attribute name="title">
-                    <string>Exceptions</string>
-                </attribute>
-                <grid>
-                    <property name="name">
-                        <cstring>unnamed</cstring>
-                    </property>
-                    <widget class="QPushButton" row="1" column="0">
-                        <property name="name">
-                            <cstring>pbAdd</cstring>
-                        </property>
-                        <property name="text">
-                            <string>Add entry</string>
-                        </property>
-                    </widget>
-                    <widget class="QListView" row="0" column="0" rowspan="1" colspan="5">
-                        <column>
-                            <property name="text">
-                                <string>Service</string>
-                            </property>
-                            <property name="clickable">
-                                <bool>true</bool>
-                            </property>
-                            <property name="resizable">
-                                <bool>true</bool>
-                            </property>
-                        </column>
-                        <column>
-                            <property name="text">
-                                <string>Port</string>
-                            </property>
-                            <property name="clickable">
-                                <bool>true</bool>
-                            </property>
-                            <property name="resizable">
-                                <bool>true</bool>
-                            </property>
-                        </column>
-                        <column>
-                            <property name="text">
-                                <string>Policy</string>
-                            </property>
-                            <property name="clickable">
-                                <bool>true</bool>
-                            </property>
-                            <property name="resizable">
-                                <bool>true</bool>
-                            </property>
-                        </column>
-                        <column>
-                            <property name="text">
-                                <string>Interface</string>
-                            </property>
-                            <property name="clickable">
-                                <bool>true</bool>
-                            </property>
-                            <property name="resizable">
-                                <bool>true</bool>
-                            </property>
-                        </column>
-                        <property name="name">
-                            <cstring>lvExceptions</cstring>
-                        </property>
-                    </widget>
-                    <widget class="QPushButton" row="1" column="1">
-                        <property name="name">
-                            <cstring>pbEdit</cstring>
-                        </property>
-                        <property name="text">
-                            <string>Edit entry</string>
-                        </property>
-                    </widget>
-                    <spacer row="1" column="2">
-                        <property name="name">
-                            <cstring>spacer6_2</cstring>
-                        </property>
-                        <property name="orientation">
-                            <enum>Horizontal</enum>
-                        </property>
-                        <property name="sizeType">
-                            <enum>Fixed</enum>
-                        </property>
-                        <property name="sizeHint">
-                            <size>
-                                <width>5</width>
-                                <height>21</height>
-                            </size>
-                        </property>
-                    </spacer>
-                    <widget class="QPushButton" row="1" column="3">
-                        <property name="name">
-                            <cstring>pbDelete</cstring>
-                        </property>
-                        <property name="text">
-                            <string>Delete entry</string>
-                        </property>
-                    </widget>
-                    <spacer row="1" column="4">
-                        <property name="name">
-                            <cstring>spacer5</cstring>
-                        </property>
-                        <property name="orientation">
-                            <enum>Horizontal</enum>
-                        </property>
-                        <property name="sizeType">
-                            <enum>Expanding</enum>
-                        </property>
-                        <property name="sizeHint">
-                            <size>
-                                <width>100</width>
-                                <height>21</height>
-                            </size>
-                        </property>
-                    </spacer>
-                </grid>
-            </widget>
+           </widget>
+          </item>
+          <item row="0" column="1" >
+           <spacer name="spacer8" >
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType" >
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0" >
+             <size>
+              <width>201</width>
+              <height>21</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
         </widget>
-    </grid>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+       </item>
+       <item row="1" column="0" >
+        <widget class="Q3ButtonGroup" name="bgFirewall" >
+         <property name="title" >
+          <string>Firewall</string>
+         </property>
+         <layout class="QGridLayout" >
+          <item row="0" column="0" >
+           <widget class="QPushButton" name="pbStart" >
+            <property name="text" >
+             <string>Start</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="3" >
+           <spacer name="spacer7" >
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType" >
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0" >
+             <size>
+              <width>31</width>
+              <height>21</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item row="0" column="2" >
+           <widget class="QPushButton" name="pbRestart" >
+            <property name="text" >
+             <string>Restart</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1" >
+           <widget class="QPushButton" name="pbStop" >
+            <property name="text" >
+             <string>Stop</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item row="3" column="0" >
+        <spacer name="spacer6" >
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType" >
+          <enum>QSizePolicy::Expanding</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>21</width>
+           <height>70</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="2" column="0" >
+        <widget class="Q3ButtonGroup" name="bgConfiguration" >
+         <property name="title" >
+          <string>Configuration</string>
+         </property>
+         <layout class="QGridLayout" >
+          <item row="0" column="1" >
+           <spacer name="spacer5_2" >
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType" >
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0" >
+             <size>
+              <width>201</width>
+              <height>21</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item row="0" column="0" >
+           <widget class="QPushButton" name="pbRestore" >
+            <property name="text" >
+             <string>Restore default configuration</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab" >
+      <property name="geometry" >
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>387</width>
+        <height>255</height>
+       </rect>
+      </property>
+      <attribute name="title" >
+       <string>Exceptions</string>
+      </attribute>
+      <layout class="QGridLayout" >
+       <item row="1" column="0" >
+        <widget class="QPushButton" name="pbAdd" >
+         <property name="text" >
+          <string>Add entry</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="0" colspan="5" >
+        <widget class="Q3ListView" name="lvExceptions" >
+         <column>
+          <property name="text" >
+           <string>Service</string>
+          </property>
+          <property name="clickable" >
+           <bool>true</bool>
+          </property>
+          <property name="resizable" >
+           <bool>true</bool>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>Port</string>
+          </property>
+          <property name="clickable" >
+           <bool>true</bool>
+          </property>
+          <property name="resizable" >
+           <bool>true</bool>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>Policy</string>
+          </property>
+          <property name="clickable" >
+           <bool>true</bool>
+          </property>
+          <property name="resizable" >
+           <bool>true</bool>
+          </property>
+         </column>
+         <column>
+          <property name="text" >
+           <string>Interface</string>
+          </property>
+          <property name="clickable" >
+           <bool>true</bool>
+          </property>
+          <property name="resizable" >
+           <bool>true</bool>
+          </property>
+         </column>
+        </widget>
+       </item>
+       <item row="1" column="1" >
+        <widget class="QPushButton" name="pbEdit" >
+         <property name="text" >
+          <string>Edit entry</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="2" >
+        <spacer name="spacer6_2" >
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeType" >
+          <enum>QSizePolicy::Fixed</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>5</width>
+           <height>21</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="1" column="3" >
+        <widget class="QPushButton" name="pbDelete" >
+         <property name="text" >
+          <string>Delete entry</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="4" >
+        <spacer name="spacer5" >
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeType" >
+          <enum>QSizePolicy::Expanding</enum>
+         </property>
+         <property name="sizeHint" stdset="0" >
+          <size>
+           <width>100</width>
+           <height>21</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>Q3ButtonGroup</class>
+   <extends>Q3GroupBox</extends>
+   <header>Qt3Support/Q3ButtonGroup</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
+   <class>Q3ListView</class>
+   <extends>Q3Frame</extends>
+   <header>q3listview.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>

Added: pcbsd/trunk/kcmPFManager/notroot.cpp

Added: pcbsd/trunk/kcmPFManager/notroot.h

Modified: pcbsd/trunk/kcmPFManager/notroot.ui
===================================================================
--- pcbsd/trunk/kcmPFManager/notroot.ui	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/notroot.ui	2008-06-26 20:10:39 UTC (rev 2178)
@@ -1,169 +1,222 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>NotRoot</class>
-<widget class="QDialog">
-    <property name="name">
-        <cstring>NotRoot</cstring>
-    </property>
-    <property name="geometry">
-        <rect>
-            <x>0</x>
-            <y>0</y>
-            <width>552</width>
-            <height>409</height>
-        </rect>
-    </property>
-    <property name="caption">
-        <string>Root Access Required</string>
-    </property>
-    <grid>
-        <property name="name">
-            <cstring>unnamed</cstring>
-        </property>
-        <spacer row="0" column="0" rowspan="1" colspan="2">
-            <property name="name">
-                <cstring>spacer3_2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Horizontal</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Expanding</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>151</width>
-                    <height>21</height>
-                </size>
-            </property>
-        </spacer>
-        <widget class="QLabel" row="0" column="2">
-            <property name="name">
-                <cstring>pixmapLabel2</cstring>
-            </property>
-            <property name="sizePolicy">
-                <sizepolicy>
-                    <hsizetype>0</hsizetype>
-                    <vsizetype>5</vsizetype>
-                    <horstretch>0</horstretch>
-                    <verstretch>0</verstretch>
-                </sizepolicy>
-            </property>
-            <property name="scaledContents">
-                <bool>true</bool>
-            </property>
-        </widget>
-        <spacer row="0" column="3" rowspan="1" colspan="2">
-            <property name="name">
-                <cstring>spacer4_2</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Horizontal</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Expanding</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>161</width>
-                    <height>21</height>
-                </size>
-            </property>
-        </spacer>
-        <spacer row="1" column="2">
-            <property name="name">
-                <cstring>spacer3</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>30</height>
-                </size>
-            </property>
-        </spacer>
-        <spacer row="3" column="2">
-            <property name="name">
-                <cstring>spacer4</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Vertical</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Expanding</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>20</width>
-                    <height>170</height>
-                </size>
-            </property>
-        </spacer>
-        <spacer row="2" column="4">
-            <property name="name">
-                <cstring>spacer6</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Horizontal</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>71</width>
-                    <height>21</height>
-                </size>
-            </property>
-        </spacer>
-        <widget class="QLabel" row="2" column="1" rowspan="1" colspan="3">
-            <property name="name">
-                <cstring>textLabel1</cstring>
-            </property>
-            <property name="sizePolicy">
-                <sizepolicy>
-                    <hsizetype>7</hsizetype>
-                    <vsizetype>3</vsizetype>
-                    <horstretch>0</horstretch>
-                    <verstretch>0</verstretch>
-                </sizepolicy>
-            </property>
-            <property name="frameShape">
-                <enum>NoFrame</enum>
-            </property>
-            <property name="frameShadow">
-                <enum>Plain</enum>
-            </property>
-            <property name="text">
-                <string>This program must be run as root. Click the "Administrator Mode" button below or restart the program as root.</string>
-            </property>
-            <property name="alignment">
-                <set>WordBreak|AlignVCenter</set>
-            </property>
-        </widget>
-        <spacer row="2" column="0">
-            <property name="name">
-                <cstring>spacer5</cstring>
-            </property>
-            <property name="orientation">
-                <enum>Horizontal</enum>
-            </property>
-            <property name="sizeType">
-                <enum>Fixed</enum>
-            </property>
-            <property name="sizeHint">
-                <size>
-                    <width>61</width>
-                    <height>21</height>
-                </size>
-            </property>
-        </spacer>
-    </grid>
-</widget>
-<pixmapinproject/>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
+<ui version="4.0" >
+ <class>NotRoot</class>
+ <widget class="QDialog" name="NotRoot" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>552</width>
+    <height>409</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Root Access Required</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" >
+    <layout class="QHBoxLayout" name="horizontalLayout" >
+     <item>
+      <spacer name="spacer3_2" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>151</width>
+         <height>21</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="pixmapLabel2" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="pixmap" >
+        <pixmap resource="pfmanager.qrc" >:/NewLogoSmall.png</pixmap>
+       </property>
+       <property name="scaledContents" >
+        <bool>true</bool>
+       </property>
+       <property name="wordWrap" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="spacer4_2" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>161</width>
+         <height>21</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0" >
+    <spacer name="spacer3" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>30</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="0" >
+    <layout class="QHBoxLayout" name="horizontalLayout_2" >
+     <item>
+      <spacer name="spacer5" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Fixed</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>61</width>
+         <height>21</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="textLabel1" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="frameShape" >
+        <enum>QFrame::NoFrame</enum>
+       </property>
+       <property name="frameShadow" >
+        <enum>QFrame::Plain</enum>
+       </property>
+       <property name="text" >
+        <string>This program must be run as root. Click the "Administrator Mode" button below or restart the program as root.</string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignVCenter</set>
+       </property>
+       <property name="wordWrap" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="spacer6" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Fixed</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>61</width>
+         <height>21</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="3" column="0" >
+    <spacer name="verticalSpacer" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>51</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="4" column="0" >
+    <layout class="QHBoxLayout" name="horizontalLayout_3" >
+     <item>
+      <spacer name="horizontalSpacer" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushAdmin" >
+       <property name="text" >
+        <string>Run in Administrator Mode</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_2" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="5" column="0" >
+    <spacer name="spacer4" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>20</width>
+       <height>170</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources>
+  <include location="pfmanager.qrc" />
+ </resources>
+ <connections/>
+</ui>

Modified: pcbsd/trunk/kcmPFManager/pfaddlg.cpp
===================================================================
--- pcbsd/trunk/kcmPFManager/pfaddlg.cpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/pfaddlg.cpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -6,10 +6,10 @@
 #include <qradiobutton.h>
 #include <qlineedit.h>
 #include <qpushbutton.h>
-#include <qlistbox.h>
+#include <Q3ListBox>
 
 PFAddDlg::PFAddDlg ( QWidget *parent, rule *rules )
-    : AddDlg(parent)
+    : AddDlg()
 {
     // Well: The incoming thing must always be the first item
     // Otherwise it won't work

Modified: pcbsd/trunk/kcmPFManager/pfaddlg.hpp
===================================================================
--- pcbsd/trunk/kcmPFManager/pfaddlg.hpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/pfaddlg.hpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -3,12 +3,13 @@
 
 #define __PFADDLG_HPP
 
-#include "adddlg.h"
+#include "ui_adddlg.h"
 #include "rule.hpp"
 #include <qwidget.h>
 #include <qobject.h>
 
-class PFAddDlg : public AddDlg
+class PFAddDlg : public QDialog, private Ui::AddDlg
+
 {
     Q_OBJECT
     

Modified: pcbsd/trunk/kcmPFManager/pfmanager.pro
===================================================================
--- pcbsd/trunk/kcmPFManager/pfmanager.pro	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/pfmanager.pro	2008-06-26 20:10:39 UTC (rev 2178)
@@ -5,16 +5,18 @@
 
 INCLUDEPATH	+= . config
 
-HEADERS	+= config/packetfilter.hpp \
+HEADERS	+= kcm.hpp \
+        config/packetfilter.hpp \
 	config/rcconfig.hpp \
 	pfmanagerdlg.hpp \
 	config/rule.hpp \
 	config/services.hpp \
 	config/interfaces.hpp \
 	pfaddlg.hpp \
-	taggedlistviewitem.hpp
+	taggedlistviewitem.hpp \
+	notroot.h
 
-SOURCES	+= main.cpp \
+SOURCES	+= kcm.cpp \
 	config/packetfilter.cpp \
 	config/rcconfig.cpp \
 	pfmanagerdlg.cpp \
@@ -22,46 +24,33 @@
 	config/services.cpp \
 	config/interfaces.cpp \
 	pfaddlg.cpp \
-	taggedlistviewitem.cpp
+	taggedlistviewitem.cpp \
+	notroot.cpp
 
 FORMS	= mainwindow.ui \
 	notroot.ui \
 	adddlg.ui
 
-######################################################################
-# Automatically generated by qmake (1.07a) Wed Jan 10 12:46:27 2007
-######################################################################
+RESOURCES += pfmanager.qrc
 
-#CONFIG += release
-#CONFIG += debug
-TARGET = /usr/local/lib/kde3/kcm_pfmanager
-#TEMPLATE = app 
+
+TARGET = /usr/local/kde4/lib/kde4/kcm_pfmanager
 DEPENDPATH += config
 
 TRANSLATIONS = PFManager_en.ts \
                PFManager_de.ts
 
-# Input
-
-unix {
-  UI_DIR = .ui
-  MOC_DIR = .moc
-  OBJECTS_DIR = .obj
-}
-# Enable only when building a library
-HEADERS += kcm.hpp
-SOURCES += kcm.cpp
-
-
-desktop.path=/usr/local/share/applications/kde/
+desktop.path=/usr/local/kde4/share/applications/kde4/
 desktop.files=kcm_pfmanager.desktop
 
-kcm.path=/usr/local/lib/kde3/
+kcm.path=/usr/local/kde4/lib/kde4/
 kcm.files=kcm_pfmanager.la
-kcm.extra=cp -f libkcm_pfmanager.so.1.0.0 /usr/local/lib/kde3/kcm_pfmanager.so
+kcm.extra=cp -f libkcm_pfmanager.so.1.0.0 /usr/local/kde4/lib/kde4/kcm_pfmanager.so
 
 lang.path=/PCBSD/LANGS/
 lang.files=PFManager_en.ts PFManager_de.ts
 
 INSTALLS += lang desktop kcm
 
+QT += qt3support
+

Added: pcbsd/trunk/kcmPFManager/pfmanager.qrc

Modified: pcbsd/trunk/kcmPFManager/pfmanagerdlg.cpp
===================================================================
--- pcbsd/trunk/kcmPFManager/pfmanagerdlg.cpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/pfmanagerdlg.cpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -8,44 +8,9 @@
 #include <qcheckbox.h>
 #include <qmessagebox.h>
 #include <qpushbutton.h>
-#include <qlistview.h>
+#include <Q3ListView>
+#include <Q3ListViewItem>
 
-PFManagerDlg::PFManagerDlg ( QWidget *parent, const char *name )
-    : MainDialog(parent, name)
-{
-    // Enabled
-    connect(cbEnable, SIGNAL(clicked()),
-            this, SLOT(enableClicked()));
-    // Buttons
-    QPushButton::connect(pbStart, SIGNAL(clicked()),
-                        this, SLOT(startClicked()));
-    // Stop button
-    QPushButton::connect(pbStop, SIGNAL(clicked()),
-                        this, SLOT(stopClicked()));
-    // Restart button
-    QPushButton::connect(pbRestart, SIGNAL(clicked()),
-                        this, SLOT(restartClicked()));
-    // Add a new exception
-    QPushButton::connect(pbAdd, SIGNAL(clicked()),
-                         this, SLOT(addClicked()));
-    // Edit a current one
-    QPushButton::connect(pbEdit, SIGNAL(clicked()),
-                         this, SLOT(editClicked()));
-    // Delete an entry
-    QPushButton::connect(pbDelete, SIGNAL(clicked()),
-                         this, SLOT(deleteClicked()));
-    // Delete stuff
-    QPushButton::connect(pbRestore, SIGNAL(clicked()),
-                         this, SLOT(restoreClicked()));
-    
-    //Show if pf is running or not
-    refreshStatus();
-}
-
-PFManagerDlg::~PFManagerDlg ( void )
-{
-}
-
 void PFManagerDlg::enableClicked ( void )
 {
     bool checked = cbEnable->isChecked();
@@ -129,7 +94,7 @@
 
 void PFManagerDlg::editClicked ( void )
 {
-    QListViewItem *cur = 0;
+    Q3ListViewItem *cur = 0;
     
     cur = lvExceptions->currentItem();
     if (cur != 0)
@@ -155,7 +120,7 @@
 
 void PFManagerDlg::deleteClicked ( void )
 {
-    QListViewItem *cur = 0;
+    Q3ListViewItem *cur = 0;
     
     cur = lvExceptions->currentItem();
     if (cur != 0)

Modified: pcbsd/trunk/kcmPFManager/pfmanagerdlg.hpp
===================================================================
--- pcbsd/trunk/kcmPFManager/pfmanagerdlg.hpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/pfmanagerdlg.hpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -3,10 +3,11 @@
 
 #define __PFMANAGER_DLG_H
 
-#include "mainwindow.h"
+#include "ui_mainwindow.h"
+#include <qdialog.h>
 #include "packetfilter.hpp"
 
-class PFManagerDlg : public MainDialog
+class PFManagerDlg : public QDialog, private Ui::MainDialog
 {
     Q_OBJECT
 
@@ -14,7 +15,38 @@
 
 public:
 
-    PFManagerDlg ( QWidget *parent = 0, const char *name = 0 );
+    PFManagerDlg () : QDialog()
+    {
+       setupUi(this);
+    // Enabled
+    connect(cbEnable, SIGNAL(clicked()),
+            this, SLOT(enableClicked()));
+    // Buttons
+    QPushButton::connect(pbStart, SIGNAL(clicked()),
+                        this, SLOT(startClicked()));
+    // Stop button
+    QPushButton::connect(pbStop, SIGNAL(clicked()),
+                        this, SLOT(stopClicked()));
+    // Restart button
+    QPushButton::connect(pbRestart, SIGNAL(clicked()),
+                        this, SLOT(restartClicked()));
+    // Add a new exception
+    QPushButton::connect(pbAdd, SIGNAL(clicked()),
+                         this, SLOT(addClicked()));
+    // Edit a current one
+    QPushButton::connect(pbEdit, SIGNAL(clicked()),
+                         this, SLOT(editClicked()));
+    // Delete an entry
+    QPushButton::connect(pbDelete, SIGNAL(clicked()),
+                         this, SLOT(deleteClicked()));
+    // Delete stuff
+    QPushButton::connect(pbRestore, SIGNAL(clicked()),
+                         this, SLOT(restoreClicked()));
+
+    //Show if pf is running or not
+    refreshStatus();
+
+    }
     ~PFManagerDlg ( void );
 
 public slots:

Modified: pcbsd/trunk/kcmPFManager/taggedlistviewitem.hpp
===================================================================
--- pcbsd/trunk/kcmPFManager/taggedlistviewitem.hpp	2008-06-26 13:43:57 UTC (rev 2177)
+++ pcbsd/trunk/kcmPFManager/taggedlistviewitem.hpp	2008-06-26 20:10:39 UTC (rev 2178)
@@ -3,17 +3,18 @@
 
 #define __TAGGED_LISTVIEWITEM
 
-#include <qlistview.h>
+#include <Q3ListViewItem>
+#include <Q3ListView>
 
 template<class _TagT>
-class BasicTaggedListViewItem : public QListViewItem
+class BasicTaggedListViewItem : public Q3ListViewItem
 {
     _TagT _tag;
     
 public:
 
-    BasicTaggedListViewItem ( QListView *list )
-        : QListViewItem(list), _tag(0)
+    BasicTaggedListViewItem ( Q3ListView *list )
+        : Q3ListViewItem(list), _tag(0)
     {
     }
        



More information about the Commits mailing list