summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/.cvsignore4
-rw-r--r--noncore/settings/aqpkg/aqpkg.pro3
-rw-r--r--noncore/settings/aqpkg/categoryfilter.ui123
-rw-r--r--noncore/settings/aqpkg/categoryfilterimpl.cpp31
-rw-r--r--noncore/settings/aqpkg/categoryfilterimpl.h11
-rw-r--r--noncore/settings/aqpkg/instoptions.ui167
-rw-r--r--noncore/settings/aqpkg/instoptionsimpl.cpp35
-rw-r--r--noncore/settings/aqpkg/instoptionsimpl.h14
8 files changed, 77 insertions, 311 deletions
diff --git a/noncore/settings/aqpkg/.cvsignore b/noncore/settings/aqpkg/.cvsignore
index 12658fc..2888d4a 100644
--- a/noncore/settings/aqpkg/.cvsignore
+++ b/noncore/settings/aqpkg/.cvsignore
@@ -1,6 +1,2 @@
Makefile*
-instoptions.cpp
-instoptions.h
moc*
-categoryfilter.cpp
-categoryfilter.h
diff --git a/noncore/settings/aqpkg/aqpkg.pro b/noncore/settings/aqpkg/aqpkg.pro
index f66fd95..6b4fb30 100644
--- a/noncore/settings/aqpkg/aqpkg.pro
+++ b/noncore/settings/aqpkg/aqpkg.pro
@@ -33,6 +33,5 @@ SOURCES = mainwin.cpp \
version.cpp \
categoryfilterimpl.cpp
-INTERFACES = instoptions.ui \
- categoryfilter.ui
+INTERFACES =
TARGET = aqpkg
INCLUDEPATH += $(OPIEDIR)/include
diff --git a/noncore/settings/aqpkg/categoryfilter.ui b/noncore/settings/aqpkg/categoryfilter.ui
deleted file mode 100644
index c167cc9..0000000
--- a/noncore/settings/aqpkg/categoryfilter.ui
+++ b/dev/null
@@ -1,123 +0,0 @@
-<!DOCTYPE UI><UI>
-<class>CategoryFilterDlg</class>
-<widget>
- <class>QDialog</class>
- <property stdset="1">
- <name>name</name>
- <cstring>CategoryFilterDlg</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>211</width>
- <height>295</height>
- </rect>
- </property>
- <property stdset="1">
- <name>caption</name>
- <string>Category Filter</string>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="1" column="0" >
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout4</cstring>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="1" >
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>btnOK</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>&amp;OK</string>
- </property>
- </widget>
- <widget row="0" column="0" >
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>btnCancel</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>&amp;Cancel</string>
- </property>
- </widget>
- </grid>
- </widget>
- <widget row="0" column="0" >
- <class>QGroupBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>GroupBox1</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Select groups to show</string>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget row="0" column="0" >
- <class>QListBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>lstCategories</cstring>
- </property>
- <property stdset="1">
- <name>selectionMode</name>
- <enum>Multi</enum>
- </property>
- </widget>
- </grid>
- </widget>
- </grid>
-</widget>
-<connections>
- <connection>
- <sender>btnCancel</sender>
- <signal>clicked()</signal>
- <receiver>CategoryFilterDlg</receiver>
- <slot>reject()</slot>
- </connection>
- <connection>
- <sender>btnOK</sender>
- <signal>clicked()</signal>
- <receiver>CategoryFilterDlg</receiver>
- <slot>accept()</slot>
- </connection>
-</connections>
-<tabstops>
- <tabstop>lstCategories</tabstop>
- <tabstop>btnCancel</tabstop>
- <tabstop>btnOK</tabstop>
-</tabstops>
-</UI>
diff --git a/noncore/settings/aqpkg/categoryfilterimpl.cpp b/noncore/settings/aqpkg/categoryfilterimpl.cpp
index 0746da6..e8ce7e7 100644
--- a/noncore/settings/aqpkg/categoryfilterimpl.cpp
+++ b/noncore/settings/aqpkg/categoryfilterimpl.cpp
@@ -18,4 +18,6 @@
using namespace std;
+#include <qgroupbox.h>
+#include <qlayout.h>
#include <qlistbox.h>
#include <qstring.h>
@@ -24,6 +26,23 @@ using namespace std;
CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QString &selectedCategories, QWidget *parent, const char *name )
- : CategoryFilterDlg(parent,name, true)
+ : QDialog( parent, name, true )
{
+ setCaption( tr( "Category Filter" ) );
+
+ QVBoxLayout *layout = new QVBoxLayout( this );
+ layout->setMargin( 2 );
+ layout->setSpacing( 4 );
+
+ QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Select one or more groups" ), this );
+ grpbox->layout()->setSpacing( 2 );
+ grpbox->layout()->setMargin( 4 );
+ layout->addWidget( grpbox );
+
+ QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() );
+
+ lstCategories = new QListBox( grpbox );
+ lstCategories->setSelectionMode( QListBox::Multi );
+ grplayout->addWidget( lstCategories );
+
// Split up categories and add them to the listbox
int start = 1;
@@ -31,4 +50,5 @@ CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QStrin
QString item;
int end;
+ QString finditem;
do
{
@@ -38,6 +58,6 @@ CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QStrin
{
lstCategories->insertItem( item );
-
- if ( selectedCategories.find( "#" + item + "#" ) != -1 )
+ finditem = QString( "#%1#" ).arg( item );
+ if ( selectedCategories.find( finditem ) != -1 )
lstCategories->setSelected( lstCategories->count()-1, true );
}
@@ -63,5 +83,8 @@ QString CategoryFilterImpl :: getSelectedFilter()
{
if ( lstCategories->isSelected( i ) )
- ret += lstCategories->text( i ) + "#";
+ {
+ ret.append( lstCategories->text( i ) );
+ ret.append( "#" );
+ }
}
diff --git a/noncore/settings/aqpkg/categoryfilterimpl.h b/noncore/settings/aqpkg/categoryfilterimpl.h
index b6b4fd5..a85fce4 100644
--- a/noncore/settings/aqpkg/categoryfilterimpl.h
+++ b/noncore/settings/aqpkg/categoryfilterimpl.h
@@ -19,8 +19,7 @@
#define CATEGORYFILTERIMPL_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <qdialog.h>
-#include "categoryfilter.h"
+class QListBox;
/**
@@ -28,5 +27,5 @@
*/
-class CategoryFilterImpl : public CategoryFilterDlg
+class CategoryFilterImpl : public QDialog
{
Q_OBJECT
@@ -36,4 +35,8 @@ public:
QString getSelectedFilter();
+
+private:
+ QListBox *lstCategories;
+
};
diff --git a/noncore/settings/aqpkg/instoptions.ui b/noncore/settings/aqpkg/instoptions.ui
deleted file mode 100644
index 00eab1e..0000000
--- a/noncore/settings/aqpkg/instoptions.ui
+++ b/dev/null
@@ -1,167 +0,0 @@
-<!DOCTYPE UI><UI>
-<class>InstallOptionsDlg</class>
-<widget>
- <class>QDialog</class>
- <property stdset="1">
- <name>name</name>
- <cstring>InstallOptionsDlg</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>283</width>
- <height>274</height>
- </rect>
- </property>
- <property stdset="1">
- <name>caption</name>
- <string>Options</string>
- </property>
- <property stdset="1">
- <name>sizeGripEnabled</name>
- <bool>false</bool>
- </property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>11</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QGroupBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>GroupBox1</cstring>
- </property>
- <property stdset="1">
- <name>title</name>
- <string>Options</string>
- </property>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>forceDepends</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>12</x>
- <y>20</y>
- <width>110</width>
- <height>19</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Force Depends</string>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>forceReinstall</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>12</x>
- <y>45</y>
- <width>107</width>
- <height>19</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Force Reinstall</string>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>forceRemove</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>12</x>
- <y>70</y>
- <width>105</width>
- <height>19</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Force Remove</string>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>forceOverwrite</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>12</x>
- <y>95</y>
- <width>114</width>
- <height>19</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Force Overwrite</string>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>verboseWget</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>12</x>
- <y>120</y>
- <width>104</width>
- <height>19</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Verbose WGet</string>
- </property>
- </widget>
- </widget>
- <widget>
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>btnOK</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>OK</string>
- </property>
- </widget>
- </vbox>
-</widget>
-<connections>
- <connection>
- <sender>btnOK</sender>
- <signal>clicked()</signal>
- <receiver>InstallOptionsDlg</receiver>
- <slot>accept()</slot>
- </connection>
-</connections>
-</UI>
diff --git a/noncore/settings/aqpkg/instoptionsimpl.cpp b/noncore/settings/aqpkg/instoptionsimpl.cpp
index 3a37eec..47b250d 100644
--- a/noncore/settings/aqpkg/instoptionsimpl.cpp
+++ b/noncore/settings/aqpkg/instoptionsimpl.cpp
@@ -20,14 +20,43 @@
#endif
-#include <qdialog.h>
#include <qcheckbox.h>
+#include <qgroupbox.h>
+#include <qlayout.h>
+#include "global.h"
#include "instoptionsimpl.h"
#include "ipkg.h"
-#include "global.h"
InstallOptionsDlgImpl::InstallOptionsDlgImpl( int flags, QWidget * parent, const char* name, bool modal, WFlags fl )
- : InstallOptionsDlg( parent, name, modal, fl )
+ : QDialog( parent, name, modal, fl )
{
+ setCaption( tr( "Options" ) );
+
+ QVBoxLayout *layout = new QVBoxLayout( this );
+ layout->setMargin( 2 );
+ layout->setSpacing( 4 );
+
+ QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Options" ), this );
+ grpbox->layout()->setSpacing( 2 );
+ grpbox->layout()->setMargin( 4 );
+ layout->addWidget( grpbox );
+
+ QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() );
+
+ forceDepends = new QCheckBox( tr( "Force Depends" ), grpbox );
+ grplayout->addWidget( forceDepends );
+
+ forceReinstall = new QCheckBox( tr( "Force Reinstall" ), grpbox );
+ grplayout->addWidget( forceReinstall );
+
+ forceRemove = new QCheckBox( tr( "Force Remove" ), grpbox );
+ grplayout->addWidget( forceRemove );
+
+ forceOverwrite = new QCheckBox( tr( "Force Overwrite" ), grpbox );
+ grplayout->addWidget( forceOverwrite );
+
+ verboseWget = new QCheckBox( tr( "Verbose WGet" ), grpbox );
+ grplayout->addWidget( verboseWget );
+
if ( flags & FORCE_DEPENDS )
forceDepends->setChecked( true );
diff --git a/noncore/settings/aqpkg/instoptionsimpl.h b/noncore/settings/aqpkg/instoptionsimpl.h
index 893f9bb..f4724a0 100644
--- a/noncore/settings/aqpkg/instoptionsimpl.h
+++ b/noncore/settings/aqpkg/instoptionsimpl.h
@@ -18,8 +18,11 @@
#define INSTALLOPTIONSIMPL_H
-#include "instoptions.h"
+#include <qdialog.h>
-class InstallOptionsDlgImpl : public InstallOptionsDlg
+class QCheckBox;
+
+class InstallOptionsDlgImpl : public QDialog
{
+ Q_OBJECT
public:
InstallOptionsDlgImpl( int flags, QWidget * parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
@@ -27,7 +30,10 @@ public:
int getFlags();
-protected:
-
private:
+ QCheckBox* forceDepends;
+ QCheckBox* forceReinstall;
+ QCheckBox* forceRemove;
+ QCheckBox* forceOverwrite;
+ QCheckBox* verboseWget;
};