[PC-BSD Commits] r4591 - in pcbsd/trunk/ServiceManager: . images
svn at pcbsd.org
svn at pcbsd.org
Tue Oct 6 20:34:24 PDT 2009
Author: kris
Date: 2009-10-06 20:34:24 -0700 (Tue, 06 Oct 2009)
New Revision: 4591
Added:
pcbsd/trunk/ServiceManager/images/
pcbsd/trunk/ServiceManager/images/configure.png
pcbsd/trunk/ServiceManager/images/player_play.png
pcbsd/trunk/ServiceManager/images/process-stop.png
pcbsd/trunk/ServiceManager/images/reload.png
Removed:
pcbsd/trunk/ServiceManager/player_play.png
pcbsd/trunk/ServiceManager/player_stop.png
pcbsd/trunk/ServiceManager/reload.png
Modified:
pcbsd/trunk/ServiceManager/kcm.cpp
pcbsd/trunk/ServiceManager/notroot.cpp
pcbsd/trunk/ServiceManager/notroot.h
pcbsd/trunk/ServiceManager/notroot.ui
pcbsd/trunk/ServiceManager/servicemanager.cpp
pcbsd/trunk/ServiceManager/servicemanager.h
pcbsd/trunk/ServiceManager/servicemanager.pro
pcbsd/trunk/ServiceManager/servicemanager.qrc
pcbsd/trunk/ServiceManager/servicemanager.ui
Log:
Large update to the services manager
* Updated entirely to QT 4.5 native
* Added new "configure" buttion for services to launch their own config utility
* Code cleanup / bug fixes
Property changes on: pcbsd/trunk/ServiceManager/images/configure.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: pcbsd/trunk/ServiceManager/images/player_play.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: pcbsd/trunk/ServiceManager/images/process-stop.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Property changes on: pcbsd/trunk/ServiceManager/images/reload.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: pcbsd/trunk/ServiceManager/kcm.cpp
===================================================================
--- pcbsd/trunk/ServiceManager/kcm.cpp 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/kcm.cpp 2009-10-07 03:34:24 UTC (rev 4591)
@@ -1,5 +1,5 @@
#include <qlayout.h>
-#include <Q3GridLayout>
+#include <QGridLayout>
#include <klocale.h>
#include <kglobal.h>
@@ -19,7 +19,6 @@
{
layout = new QGridLayout(this);
- layout->setAutoAdd(true);
buttons();
@@ -32,13 +31,15 @@
buttons();
setButtons(KCModule::Help);
ServiceManager *systab = new ServiceManager();
- systab->ProgramInit();
- systab->reparent(this, QPoint());
+ systab->setParent(this);
+ systab->ProgramInit();
+ layout->addWidget(systab);
} else {
setButtons(KCModule::Help);
NotRoot *nroot = new NotRoot();
+ nroot->setParent(this);
+ layout->addWidget(nroot);
nroot->programInit();
- nroot->reparent(this, QPoint());
}
}
@@ -67,7 +68,7 @@
sleep(1);
- if ( line.find("root") == -1)
+ if ( line.indexOf("root") == -1)
{
return FALSE;
} else {
Modified: pcbsd/trunk/ServiceManager/notroot.cpp
===================================================================
--- pcbsd/trunk/ServiceManager/notroot.cpp 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/notroot.cpp 2009-10-07 03:34:24 UTC (rev 4591)
@@ -1,6 +1,4 @@
-//Added by qt3to4:
-#include <Q3TextStream>
-#include <Q3ValueList>
+#include <QTextStream>
#include <QPixmap>
#include <QTimer>
/***************************************************************************
@@ -41,14 +39,12 @@
void NotRoot::slotLaunchAdmin()
{
// Launch the kcmshell4 process as root
- launchAdminProc = new Q3Process( this );
- launchAdminProc->addArgument( "kdesu" );
- launchAdminProc->addArgument( "kcmshell4" );
- launchAdminProc->addArgument( "pcbsdservices" );
+ QString prog = "kdesu";
+ QStringList args;
+ args << "kcmshell4" << "pcbsdservices";
+ launchAdminProc = new QProcess( this );
- if ( !launchAdminProc->start() ) {
-
- }
+ launchAdminProc->start(prog, args);
}
Modified: pcbsd/trunk/ServiceManager/notroot.h
===================================================================
--- pcbsd/trunk/ServiceManager/notroot.h 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/notroot.h 2009-10-07 03:34:24 UTC (rev 4591)
@@ -4,7 +4,7 @@
#include <qfile.h>
#include <qmessagebox.h>
#include <qdialog.h>
-#include <Q3Process>
+#include <QProcess>
#include "ui_notroot.h"
class NotRoot : public QDialog, private Ui::NotRoot
@@ -25,7 +25,7 @@
void slotLaunchAdmin();
private:
- Q3Process *launchAdminProc;
+ QProcess *launchAdminProc;
signals:
Modified: pcbsd/trunk/ServiceManager/notroot.ui
===================================================================
--- pcbsd/trunk/ServiceManager/notroot.ui 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/notroot.ui 2009-10-07 03:34:24 UTC (rev 4591)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>NotRoot</class>
- <widget class="QDialog" name="NotRoot" >
- <property name="geometry" >
+ <widget class="QDialog" name="NotRoot">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,21 +10,21 @@
<height>409</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Root Access Required</string>
</property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <layout class="QHBoxLayout" name="horizontalLayout" >
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <spacer name="spacer3_2" >
- <property name="orientation" >
+ <spacer name="spacer3_2">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>151</width>
<height>21</height>
@@ -32,33 +33,33 @@
</spacer>
</item>
<item>
- <widget class="QLabel" name="pixmapLabel2" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
+ <widget class="QLabel" name="pixmapLabel2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="pixmap" >
- <pixmap resource="servicemanager.qrc" >:/NewLogoSmall.png</pixmap>
+ <property name="pixmap">
+ <pixmap resource="servicemanager.qrc">:/NewLogoSmall.png</pixmap>
</property>
- <property name="scaledContents" >
+ <property name="scaledContents">
<bool>true</bool>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
- <spacer name="spacer4_2" >
- <property name="orientation" >
+ <spacer name="spacer4_2">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>161</width>
<height>21</height>
@@ -68,15 +69,15 @@
</item>
</layout>
</item>
- <item row="1" column="0" >
- <spacer name="spacer3" >
- <property name="orientation" >
+ <item row="1" column="0">
+ <spacer name="spacer3">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>30</height>
@@ -84,17 +85,17 @@
</property>
</spacer>
</item>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
+ <item row="2" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <spacer name="spacer5" >
- <property name="orientation" >
+ <spacer name="spacer5">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>61</width>
<height>21</height>
@@ -103,39 +104,39 @@
</spacer>
</item>
<item>
- <widget class="QLabel" name="textLabel1" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
+ <widget class="QLabel" name="textLabel1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="frameShape" >
+ <property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
- <property name="frameShadow" >
+ <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 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" >
+ <property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <spacer name="spacer6" >
- <property name="orientation" >
+ <spacer name="spacer6">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>61</width>
<height>21</height>
@@ -145,12 +146,12 @@
</item>
</layout>
</item>
- <item row="3" column="0" >
- <spacer name="verticalSpacer" >
- <property name="orientation" >
+ <item row="3" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>51</height>
@@ -158,14 +159,14 @@
</property>
</spacer>
</item>
- <item row="4" column="0" >
- <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <item row="4" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -174,18 +175,18 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="pushAdmin" >
- <property name="text" >
+ <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" >
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -195,15 +196,15 @@
</item>
</layout>
</item>
- <item row="5" column="0" >
- <spacer name="spacer4" >
- <property name="orientation" >
+ <item row="5" column="0">
+ <spacer name="spacer4">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>170</height>
@@ -213,10 +214,9 @@
</item>
</layout>
</widget>
- <layoutdefault spacing="6" margin="11" />
- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <layoutdefault spacing="6" margin="11"/>
<resources>
- <include location="PBM.qrc" />
+ <include location="servicemanager.qrc"/>
</resources>
<connections/>
</ui>
Modified: pcbsd/trunk/ServiceManager/servicemanager.cpp
===================================================================
--- pcbsd/trunk/ServiceManager/servicemanager.cpp 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/servicemanager.cpp 2009-10-07 03:34:24 UTC (rev 4591)
@@ -11,260 +11,183 @@
*****************************************************************************/
#include "ui_servicemanager.h"
#include "servicemanager.h"
-#include <Q3ListViewItem>
+#include <QTreeWidgetItem>
#include <qtextstream.h>
void ServiceManager::ProgramInit()
{
+ listServices->setColumnHidden(0, true);
pushStart->setEnabled(FALSE);
pushStop->setEnabled(FALSE);
pushRestart->setEnabled(FALSE);
pushEnableStartup->setEnabled(FALSE);
pushDisableStartup->setEnabled(FALSE);
+ pushConfigure->setEnabled(FALSE);
// Connect the buttons
connect( pushStart, SIGNAL( clicked() ), this, SLOT( startSlot() ) );
connect( pushStop, SIGNAL( clicked() ), this, SLOT( stopSlot() ) );
connect( pushRestart, SIGNAL( clicked() ), this, SLOT( restartSlot() ) );
+ connect( pushConfigure, SIGNAL( clicked() ), this, SLOT( configureSlot() ) );
connect( pushEnableStartup, SIGNAL( clicked() ), this, SLOT( enableSlot() ) );
connect( pushDisableStartup, SIGNAL( clicked() ), this, SLOT( disableSlot() ) );
// Connect the list box
- connect( listServices, SIGNAL( selectionChanged() ), this, SLOT( listSelectionChanged() ) );
+ connect( listServices, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT( listSelectionChanged() ) );
// Start loading the various service files
populateList();
// Start checking the status of these services
- workingRunning = -1;
+ currentCheckRunningItem = new QTreeWidgetItemIterator(listServices);
checkRunning();
// Start checking if services are enabled
- workingEnabled = -1;
+ currentCheckEnabledItem = new QTreeWidgetItemIterator(listServices);
checkEnabled();
}
+void ServiceManager::setButtonsAllEnabled(bool enabled)
+{
+ pushStart->setEnabled(enabled);
+ pushStop->setEnabled(enabled);
+ pushRestart->setEnabled(enabled);
+ pushConfigure->setEnabled(enabled);
+ pushEnableStartup->setEnabled(enabled);
+ pushDisableStartup->setEnabled(enabled);
-void ServiceManager::startSlot()
+ if ( enabled )
+ textTopLabel->setText("");
+ else
+ textTopLabel->setText(tr("Please Wait..."));
+}
+
+void ServiceManager::configureSlot()
{
- Q3ListViewItem *item = listServices->currentItem();
+ QTreeWidgetItem *item = listServices->currentItem();
if (!item)
return;
- int i = 0;
-
- while (i < 500 )
- {
- if ( ServiceDescr[i] == listServices->currentItem()->text(3) )
- {
- break;
- }
-
- i ++;
- }
-
- if ( i == 500 )
- {
- return;
- }
-
- workingItem = i;
-
-
+ workingTreeWidgetItem = item;
- // Start the detection script
- ServiceStart = new Q3Process( this );
- ServiceStart->addArgument( "/PCBSD/Services/" + ServiceDir[i] + "/start.sh" );
+ // Start the detection script
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + item->text(0) + "/configure.sh";
+ ServiceConfig = new QProcess( this );
+ //connect( ServiceConfig, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkServiceStartedSlot()) );
+ ServiceConfig->start(prog, args);
+}
- connect( ServiceStart, SIGNAL(processExited()), this, SLOT(checkServiceStartedSlot()) );
-
- if ( !ServiceStart->start() ) {
-
- } else {
- disableButtons() ;
- }
+void ServiceManager::startSlot()
+{
+ QTreeWidgetItem *item = listServices->currentItem();
+ if (!item)
+ return;
+ workingTreeWidgetItem = item;
+
+ // Disable the buttons until we are done
+ setButtonsAllEnabled(false);
+ // Start the detection script
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + item->text(0) + "/start.sh";
+ ServiceStart = new QProcess( this );
+ connect( ServiceStart, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkServiceStartedSlot()) );
+ ServiceStart->start(prog, args);
+
}
void ServiceManager::stopSlot()
{
- Q3ListViewItem *item = listServices->currentItem();
+ QTreeWidgetItem *item = listServices->currentItem();
if (!item)
return;
+ workingTreeWidgetItem = item;
- int i = 0;
-
- while (i < 500 )
- {
- if ( ServiceDescr[i] == listServices->currentItem()->text(3) )
- {
- break;
- }
-
- i ++;
- }
-
- if ( i == 500 )
- {
- return;
- }
-
- workingItem = i;
-
-
-
- // Start the detection script
- ServiceStop = new Q3Process( this );
- ServiceStop->addArgument( "/PCBSD/Services/" + ServiceDir[i] + "/stop.sh" );
+ // Disable the buttons until we are done
+ setButtonsAllEnabled(false);
- connect( ServiceStop, SIGNAL(processExited()), this, SLOT(checkServiceStoppedSlot()) );
-
- if ( !ServiceStop->start() ) {
-
- } else {
- disableButtons() ;
- }
-
-
-
+ // Start the detection script
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + item->text(0) + "/stop.sh";
+
+ ServiceStop = new QProcess( this );
+ connect( ServiceStop, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkServiceStoppedSlot()) );
+ ServiceStop->start(prog, args);
}
void ServiceManager::restartSlot()
{
- Q3ListViewItem *item = listServices->currentItem();
+ QTreeWidgetItem *item = listServices->currentItem();
if (!item)
return;
-
-
-
- int i = 0;
-
- while (i < 500 )
- {
- if ( ServiceDescr[i] == listServices->currentItem()->text(3) )
- {
- break;
- }
-
- i ++;
- }
-
- if ( i == 500 )
- {
- return;
- }
-
- workingItem = i;
-
-
-
- // Start the detection script
- ServiceRestart = new Q3Process( this );
- ServiceRestart->addArgument( "/PCBSD/Services/" + ServiceDir[i] + "/restart.sh" );
+ workingTreeWidgetItem = item;
- connect( ServiceRestart, SIGNAL(processExited()), this, SLOT(checkServiceRestartedSlot()) );
-
- if ( !ServiceRestart->start() ) {
-
- } else {
- disableButtons() ;
- }
-
+ // Disable the buttons until we are done
+ setButtonsAllEnabled(false);
+
+ // Start the detection script
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + item->text(0) + "/restart.sh";
+
+ ServiceRestart = new QProcess( this );
+ connect( ServiceRestart, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkServiceRestartedSlot()) );
+ ServiceRestart->start(prog, args);
}
void ServiceManager::enableSlot()
{
- Q3ListViewItem *item = listServices->currentItem();
+ QTreeWidgetItem *item = listServices->currentItem();
if (!item)
return;
+ workingTreeWidgetItem = item;
- int i = 0;
-
- while (i < 500 )
- {
- if ( ServiceDescr[i] == listServices->currentItem()->text(3) )
- {
- break;
- }
-
- i ++;
- }
-
- if ( i == 500 )
- {
- return;
- }
-
- workingItem = i;
-
-
-
- // Start the detection script
- ServiceEnable = new Q3Process( this );
- ServiceEnable->addArgument( "/PCBSD/Services/" + ServiceDir[i] + "/enable.sh" );
+ // Disable the buttons until we are done
+ setButtonsAllEnabled(false);
- connect( ServiceEnable, SIGNAL(processExited()), this, SLOT(checkServiceEnabledSlot()) );
-
- if ( !ServiceEnable->start() ) {
-
- } else {
- disableButtons() ;
- }
-
+ // Start the detection script
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + item->text(0) + "/enable.sh";
+ ServiceEnable = new QProcess( this );
+ connect( ServiceEnable, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkServiceEnabledSlot()) );
+ ServiceEnable->start(prog, args);
}
void ServiceManager::disableSlot()
{
- Q3ListViewItem *item = listServices->currentItem();
+ QTreeWidgetItem *item = listServices->currentItem();
if (!item)
return;
+ workingTreeWidgetItem = item;
-
- int i = 0;
-
- while (i < 500 )
- {
- if ( ServiceDescr[i] == listServices->currentItem()->text(3) )
- {
- break;
- }
-
- i ++;
- }
-
- if ( i == 500 )
- {
- return;
- }
-
- workingItem = i;
-
-
-
- // Start the detection script
- ServiceDisable= new Q3Process( this );
- ServiceDisable->addArgument( "/PCBSD/Services/" + ServiceDir[i] + "/disable.sh" );
+ // Disable the buttons until we are done
+ setButtonsAllEnabled(false);
- connect( ServiceDisable, SIGNAL(processExited()), this, SLOT(checkServiceDisabledSlot()) );
-
- if ( !ServiceDisable->start() ) {
-
- } else {
- disableButtons() ;
- }
-
+ // Start the detection script
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + item->text(0) + "/disable.sh";
+
+ ServiceDisable= new QProcess( this );
+ connect( ServiceDisable, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkServiceDisabledSlot()) );
+ ServiceDisable->start(prog, args);
}
@@ -276,14 +199,18 @@
d.setFilter( QDir::Dirs );
d.setSorting( QDir::Name );
+
+ if ( d.count() == -1 )
+ return;
for ( int i = 0; i < d.count(); i++ )
{
QFile file( "/PCBSD/Services/" + d[i] + "/service.cfg" );
- if ( file.open( IO_ReadOnly ) ) {
+ if ( file.open( QIODevice::ReadOnly ) ) {
ServiceDir[found]=d[i];
disableStart[found] = 0;
+ disableConfig[found] = 1;
disableStop[found] = 0;
disableRestart[found] = 0;
disableStartup[found] = 0;
@@ -296,37 +223,41 @@
- if ( line.find("name:") == 0)
+ if ( line.indexOf("name:") == 0)
{
ServiceName[found] = line.replace("name: ", "");
}
- if ( line.find("description:") == 0)
+ if ( line.indexOf("description:") == 0)
{
ServiceDescr[found] = line.replace("description: ", "");
}
- if ( line.find("disableStart: Y") == 0)
+ if ( line.indexOf("disableStart: Y") == 0)
{
disableStart[found] = 1;
}
- if ( line.find("disableStop: Y") == 0)
+ if ( line.indexOf("disableStop: Y") == 0)
{
disableStop[found] = 1;
}
- if ( line.find("disableRestart: Y") == 0)
+ if ( line.indexOf("disableRestart: Y") == 0)
{
disableRestart[found] = 1;
}
- if ( line.find("disableStartup: YES") == 0)
+ if ( line.indexOf("disableStartup: YES") == 0)
{
disableStartup[found] = 1;
}
}
file.close();
- (void) new Q3ListViewItem(listServices, ServiceName[found], "Unknown", "Unknown", ServiceDescr[found] );
+ QStringList cols;
+ if (QFile::exists("/PCBSD/Services/" + ServiceDir[found] + "/configure.sh") )
+ disableConfig[found] = 0;
+ cols << ServiceDir[found] << ServiceName[found] << "Unknown" << "Unknown" << ServiceDescr[found];
+ (void) new QTreeWidgetItem(listServices, cols );
found++;
}
}
@@ -337,22 +268,17 @@
void ServiceManager::checkRunning()
{
- workingRunning++;
-
-
- if ( ! ServiceDir[workingRunning].isEmpty() )
+ QTreeWidgetItemIterator it(*currentCheckRunningItem);
+ if (*it)
{
// Start the detection script
- CheckServiceRunning= new Q3Process( this );
- CheckServiceRunning->addArgument( "/PCBSD/Services/" + ServiceDir[workingRunning] + "/isRunning.sh" );
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + (*it)->text(0) + "/isRunning.sh";
- connect( CheckServiceRunning, SIGNAL(processExited()), this, SLOT(checkRunningFinishedSlot()) );
-
- if ( !CheckServiceRunning->start() ) {
- checkRunning();
- }
-
-
+ CheckServiceRunning= new QProcess( this );
+ connect( CheckServiceRunning, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkRunningFinishedSlot()) );
+ CheckServiceRunning->start(prog, args);
}
@@ -362,36 +288,34 @@
void ServiceManager::checkEnabled()
{
- workingEnabled++;
-
-
- if ( ! ServiceDir[workingEnabled].isEmpty() )
+ QTreeWidgetItemIterator it(*currentCheckEnabledItem);
+ if (*it)
{
// Start the detection script
- CheckServiceEnabled= new Q3Process( this );
- CheckServiceEnabled->addArgument( "/PCBSD/Services/" + ServiceDir[workingEnabled] + "/isEnabled.sh" );
+ QString prog = "sh";
+ QStringList args;
+ args << "/PCBSD/Services/" + (*it)->text(0) + "/isEnabled.sh";
- connect( CheckServiceEnabled, SIGNAL(processExited()), this, SLOT(checkEnabledFinishedSlot()) );
-
- if ( !CheckServiceEnabled->start() ) {
- checkEnabled();
- }
-
-
+ CheckServiceEnabled= new QProcess( this );
+ connect( CheckServiceEnabled, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(checkEnabledFinishedSlot()) );
+ CheckServiceEnabled->start(prog, args);
}
}
void ServiceManager::checkRunningFinishedSlot()
{
+ QTreeWidgetItemIterator it(*currentCheckRunningItem);
- if ( CheckServiceRunning->normalExit() && CheckServiceRunning->exitStatus() == 0)
+ if ( CheckServiceRunning->exitCode() == 0 && CheckServiceRunning->exitStatus() == QProcess::NormalExit)
{
- listServices->findItem(ServiceDescr[workingRunning], 3, Q3ListView::ExactMatch)->setText(1, tr("Running") );
+ (*it)->setText(2, tr("Running") );
} else {
- listServices->findItem(ServiceDescr[workingRunning], 3, Q3ListView::ExactMatch)->setText(1, tr("Stopped") );
+ (*it)->setText(2, tr("Stopped") );
}
-
+
+ (*currentCheckRunningItem)++;
+
checkRunning();
}
@@ -399,13 +323,16 @@
void ServiceManager::checkEnabledFinishedSlot()
{
- if ( CheckServiceEnabled->normalExit() && CheckServiceEnabled->exitStatus() == 0)
+ QTreeWidgetItemIterator it(*currentCheckEnabledItem);
+
+ if ( CheckServiceEnabled->exitCode() == 0 && CheckServiceEnabled->exitStatus() == QProcess::NormalExit)
{
- listServices->findItem(ServiceDescr[workingEnabled], 3, Q3ListView::ExactMatch)->setText(2, tr("Startup Enabled") );
+ (*it)->setText(3, tr("Startup Enabled") );
} else {
- listServices->findItem(ServiceDescr[workingEnabled], 3, Q3ListView::ExactMatch)->setText(2, tr("Startup Disabled") );
+ (*it)->setText(3, tr("Startup Disabled") );
}
+ (*currentCheckEnabledItem)++;
checkEnabled();
}
@@ -419,7 +346,7 @@
pushEnableStartup->setEnabled(FALSE);
pushDisableStartup->setEnabled(FALSE);
- Q3ListViewItem *i = listServices->currentItem();
+ QTreeWidgetItem *i = listServices->currentItem();
if (!i)
return;
@@ -427,7 +354,7 @@
while (j < 500 )
{
- if ( ServiceDescr[j] == listServices->currentItem()->text(3) )
+ if ( ServiceDir[j] == listServices->currentItem()->text(0) )
{
break;
}
@@ -440,39 +367,47 @@
return;
}
- workingItem = j;
+ int workingItem = j;
- if ( listServices->currentItem()->text(1) == tr("Running") )
+ if ( listServices->currentItem()->text(2) == tr("Running") )
{
pushStart->setEnabled(FALSE);
pushStop->setEnabled(TRUE);
pushRestart->setEnabled(TRUE);
}
- if ( listServices->currentItem()->text(1) == tr("Stopped") )
+ if ( listServices->currentItem()->text(2) == tr("Stopped") )
{
pushStart->setEnabled(TRUE);
pushStop->setEnabled(FALSE);
pushRestart->setEnabled(FALSE);
}
- if ( listServices->currentItem()->text(2) == tr("Startup Enabled") )
+ if ( listServices->currentItem()->text(3) == tr("Startup Enabled") )
{
pushEnableStartup->setEnabled(FALSE);
pushDisableStartup->setEnabled(TRUE);
}
- if ( listServices->currentItem()->text(2) == tr("Startup Disabled") )
+ if ( listServices->currentItem()->text(3) == tr("Startup Disabled") )
{
pushEnableStartup->setEnabled(TRUE);
pushDisableStartup->setEnabled(FALSE);
}
+ if ( disableConfig[workingItem] == 1)
+ {
+ pushConfigure->setHidden(TRUE);
+ pushConfigure->setEnabled(TRUE);
+ } else {
+ pushConfigure->setHidden(FALSE);
+ }
+
if ( disableStart[workingItem] == 1)
{
pushStart->setHidden(TRUE);
} else {
- pushStart->setHidden(FALSE);
+ pushStart->setHidden(FALSE);
}
if ( disableStop[workingItem] == 1)
@@ -503,11 +438,14 @@
void ServiceManager::checkServiceStartedSlot()
{
- if ( ServiceStart->normalExit() && ServiceStart->exitStatus() == 0)
+ // re-enable all the buttons
+ setButtonsAllEnabled(true);
+
+ if ( ServiceStart->exitCode() == 0 && ServiceStart->exitStatus() == QProcess::NormalExit)
{
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(1, tr("Running") );
+ workingTreeWidgetItem->setText(2, tr("Running") );
} else {
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(1, tr("Stopped") );
+ workingTreeWidgetItem->setText(2, tr("Stopped") );
}
textTopLabel->setText(tr("The following services are setup on this system. You may enable / disable them below."));
@@ -518,11 +456,14 @@
void ServiceManager::checkServiceStoppedSlot()
{
- if ( ServiceStop->normalExit() && ServiceStop->exitStatus() == 0)
+ // re-enable all the buttons
+ setButtonsAllEnabled(true);
+
+ if ( ServiceStop->exitCode() == 0 && ServiceStop->exitStatus() == QProcess::NormalExit)
{
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(1, tr("Stopped") );
+ workingTreeWidgetItem->setText(2, tr("Stopped") );
} else {
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(1, tr("Running") );
+ workingTreeWidgetItem->setText(2, tr("Running") );
}
textTopLabel->setText(tr("The following services are setup on this system. You may enable / disable them below."));
@@ -533,11 +474,14 @@
void ServiceManager::checkServiceRestartedSlot()
{
- if ( ServiceRestart->normalExit() && ServiceRestart->exitStatus() == 0)
+ // re-enable all the buttons
+ setButtonsAllEnabled(true);
+
+ if ( ServiceRestart->exitCode() == 0 && ServiceRestart->exitStatus() == QProcess::NormalExit)
{
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(1, tr("Running") );
+ workingTreeWidgetItem->setText(2, tr("Running") );
} else {
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(1, tr("Stopped") );
+ workingTreeWidgetItem->setText(2, tr("Stopped") );
}
textTopLabel->setText(tr("The following services are setup on this system. You may enable / disable them below."));
@@ -548,11 +492,14 @@
void ServiceManager::checkServiceEnabledSlot()
{
- if ( ServiceEnable->normalExit() && ServiceEnable->exitStatus() == 0)
+ // re-enable all the buttons
+ setButtonsAllEnabled(true);
+
+ if ( ServiceEnable->exitCode() == 0 && ServiceEnable->exitStatus() == QProcess::NormalExit)
{
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(2, tr("Startup Enabled") );
+ workingTreeWidgetItem->setText(3, tr("Startup Enabled") );
} else {
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(2, tr("Startup Disabled") );
+ workingTreeWidgetItem->setText(3, tr("Startup Disabled") );
}
textTopLabel->setText(tr("The following services are setup on this system. You may enable / disable them below."));
@@ -562,11 +509,14 @@
void ServiceManager::checkServiceDisabledSlot()
{
- if ( ServiceDisable->normalExit() && ServiceDisable->exitStatus() == 0)
+ // re-enable all the buttons
+ setButtonsAllEnabled(true);
+
+ if ( ServiceDisable->exitCode() == 0 && ServiceDisable->exitStatus() == QProcess::NormalExit)
{
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(2, tr("Startup Disabled") );
+ workingTreeWidgetItem->setText(3, tr("Startup Disabled") );
} else {
- listServices->findItem(ServiceDescr[workingItem], 3, Q3ListView::ExactMatch)->setText(2, tr("Startup Enabled") );
+ workingTreeWidgetItem->setText(3, tr("Startup Enabled") );
}
textTopLabel->setText(tr("The following services are setup on this system. You may enable / disable them below."));
@@ -575,13 +525,3 @@
}
-void ServiceManager::disableButtons()
-{
- pushStart->setEnabled(FALSE);
- pushStop->setEnabled(FALSE);
- pushRestart->setEnabled(FALSE);
- pushEnableStartup->setEnabled(FALSE);
- pushDisableStartup->setEnabled(FALSE);
-
- textTopLabel->setText(tr("Please Wait..."));
-}
Modified: pcbsd/trunk/ServiceManager/servicemanager.h
===================================================================
--- pcbsd/trunk/ServiceManager/servicemanager.h 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/servicemanager.h 2009-10-07 03:34:24 UTC (rev 4591)
@@ -4,7 +4,6 @@
#include <qfile.h>
#include <qmessagebox.h>
#include <qdialog.h>
-#include <Q3Process>
#include "ui_servicemanager.h"
class ServiceManager : public QDialog, private Ui::ServiceManager
@@ -35,30 +34,33 @@
void checkServiceRestartedSlot();
void checkServiceEnabledSlot();
void checkServiceDisabledSlot();
+ void configureSlot();
private:
+ void setButtonsAllEnabled(bool enabled);
QString ServiceDir[500];
QString ServiceName[500];
QString ServiceDescr[500];
- int workingItem;
- int workingEnabled;
- int workingRunning;
- Q3Process *ServiceStart;
- Q3Process *ServiceStop;
- Q3Process *ServiceEnable;
- Q3Process *ServiceDisable;
- Q3Process *ServiceRestart;
- Q3Process *CheckServiceRunning;
- Q3Process *CheckServiceEnabled;
+ QProcess *ServiceStart;
+ QProcess *ServiceStop;
+ QProcess *ServiceEnable;
+ QProcess *ServiceDisable;
+ QProcess *ServiceRestart;
+ QProcess *ServiceConfig;
+ QProcess *CheckServiceRunning;
+ QProcess *CheckServiceEnabled;
int disableStop[500];
int disableStart[500];
int disableRestart[500];
int disableStartup[500];
+ int disableConfig[500];
void populateList();
void checkRunning();
void checkEnabled();
- void disableButtons();
+ QTreeWidgetItem *workingTreeWidgetItem;
+ QTreeWidgetItemIterator *currentCheckRunningItem;
+ QTreeWidgetItemIterator *currentCheckEnabledItem;
Modified: pcbsd/trunk/ServiceManager/servicemanager.pro
===================================================================
--- pcbsd/trunk/ServiceManager/servicemanager.pro 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/servicemanager.pro 2009-10-07 03:34:24 UTC (rev 4591)
@@ -22,6 +22,4 @@
RESOURCES += servicemanager.qrc
-QT += qt3support
-
QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib
Modified: pcbsd/trunk/ServiceManager/servicemanager.qrc
===================================================================
--- pcbsd/trunk/ServiceManager/servicemanager.qrc 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/servicemanager.qrc 2009-10-07 03:34:24 UTC (rev 4591)
@@ -1,8 +1,9 @@
<RCC>
<qresource>
- <file>player_play.png</file>
- <file>player_stop.png</file>
- <file>reload.png</file>
+ <file>images/configure.png</file>
+ <file>images/player_play.png</file>
+ <file>images/process-stop.png</file>
+ <file>images/reload.png</file>
<file>NewLogoSmall.png</file>
</qresource>
</RCC>
Modified: pcbsd/trunk/ServiceManager/servicemanager.ui
===================================================================
--- pcbsd/trunk/ServiceManager/servicemanager.ui 2009-10-06 23:55:01 UTC (rev 4590)
+++ pcbsd/trunk/ServiceManager/servicemanager.ui 2009-10-07 03:34:24 UTC (rev 4591)
@@ -1,224 +1,243 @@
-<ui version="4.0" stdsetdef="1" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>ServiceManager</class>
- <widget class="QDialog" name="ServiceManager" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>624</width>
- <height>520</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Service Manager</string>
- </property>
- <layout class="QGridLayout" >
- <item rowspan="1" row="0" column="0" colspan="5" >
- <widget class="QLabel" name="textTopLabel" >
- <property name="frameShape" >
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Plain</enum>
- </property>
- <property name="text" >
- <string>The following services are setup on this system. You may enable / disable them below.</string>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- </widget>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ServiceManager</class>
+ <widget class="QDialog" name="ServiceManager">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>708</width>
+ <height>424</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Service Manager</string>
+ </property>
+ <property name="windowIcon">
+ <iconset resource="servicemanager.qrc">
+ <normaloff>:/images/player_play.png</normaloff>:/images/player_play.png</iconset>
+ </property>
+ <layout class="QGridLayout">
+ <item row="0" column="0" colspan="8">
+ <widget class="QLabel" name="textTopLabel">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text">
+ <string>The following services are setup on this system. You may enable / disable them below.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="8">
+ <widget class="QFrame" name="frame3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout">
+ <item row="0" column="0">
+ <widget class="QTreeWidget" name="listServices">
+ <property name="textElideMode">
+ <enum>Qt::ElideRight</enum>
+ </property>
+ <property name="horizontalScrollMode">
+ <enum>QAbstractItemView::ScrollPerPixel</enum>
+ </property>
+ <property name="indentation">
+ <number>20</number>
+ </property>
+ <property name="uniformRowHeights">
+ <bool>false</bool>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <column>
+ <property name="text">
+ <string>SDIR</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Service Name</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Running</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>AutoStart</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Description</string>
+ </property>
+ </column>
+ </widget>
</item>
- <item rowspan="1" row="1" column="0" colspan="5" >
- <widget class="Q3Frame" name="frame3" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>7</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape" >
- <enum>StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>Raised</enum>
- </property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="Q3ListView" name="listServices" >
- <property name="midLineWidth" >
- <number>3</number>
- </property>
- <property name="allColumnsShowFocus" >
- <bool>true</bool>
- </property>
- <column>
- <property name="text" >
- <string>Service Name</string>
- </property>
- <property name="clickable" >
- <bool>true</bool>
- </property>
- <property name="resizable" >
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text" >
- <string>Status</string>
- </property>
- <property name="clickable" >
- <bool>true</bool>
- </property>
- <property name="resizable" >
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text" >
- <string>Enabled at Startup</string>
- </property>
- <property name="clickable" >
- <bool>true</bool>
- </property>
- <property name="resizable" >
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text" >
- <string>Description</string>
- </property>
- <property name="clickable" >
- <bool>true</bool>
- </property>
- <property name="resizable" >
- <bool>true</bool>
- </property>
- </column>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QPushButton" name="pushStart" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>31</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>31</height>
- </size>
- </property>
- <property name="text" >
- <string>Start</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QPushButton" name="pushStop" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>31</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>31</height>
- </size>
- </property>
- <property name="text" >
- <string>Stop</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2" >
- <widget class="QPushButton" name="pushRestart" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>31</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>31</height>
- </size>
- </property>
- <property name="text" >
- <string>Restart</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3" >
- <widget class="QPushButton" name="pushEnableStartup" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>31</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>31</height>
- </size>
- </property>
- <property name="text" >
- <string>Enable Startup</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4" >
- <widget class="QPushButton" name="pushDisableStartup" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>31</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>31</height>
- </size>
- </property>
- <property name="text" >
- <string>Disable Startup</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11" />
- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
- <includes>
- <include location="local" >qdir.h</include>
- <include location="local" >qfile.h</include>
- <include location="local" >q3process.h</include>
- <include location="local" >qmessagebox.h</include>
- </includes>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QPushButton" name="pushStart">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>31</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Start</string>
+ </property>
+ <property name="icon">
+ <iconset resource="servicemanager.qrc">
+ <normaloff>:/images/player_play.png</normaloff>:/images/player_play.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="pushRestart">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>31</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Restart</string>
+ </property>
+ <property name="icon">
+ <iconset resource="servicemanager.qrc">
+ <normaloff>:/images/reload.png</normaloff>:/images/reload.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="5">
+ <widget class="QPushButton" name="pushEnableStartup">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>31</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Enable Startup</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="7">
+ <widget class="QPushButton" name="pushDisableStartup">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>31</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Disable Startup</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <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 row="2" column="4">
+ <widget class="QPushButton" name="pushConfigure">
+ <property name="text">
+ <string>&Configure</string>
+ </property>
+ <property name="icon">
+ <iconset resource="servicemanager.qrc">
+ <normaloff>:/images/configure.png</normaloff>:/images/configure.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QPushButton" name="pushStop">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>31</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ <property name="icon">
+ <iconset resource="servicemanager.qrc">
+ <normaloff>:/images/process-stop.png</normaloff>:/images/process-stop.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <includes>
+ <include location="local">qdir.h</include>
+ <include location="local">qfile.h</include>
+ <include location="local">qprocess.h</include>
+ <include location="local">qmessagebox.h</include>
+ </includes>
+ <resources>
+ <include location="servicemanager.qrc"/>
+ </resources>
+ <connections/>
</ui>
More information about the Commits
mailing list