summaryrefslogtreecommitdiffstats
path: root/buildtools/lib/widgets
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /buildtools/lib/widgets
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/lib/widgets')
-rw-r--r--buildtools/lib/widgets/Mainpage.dox10
-rw-r--r--buildtools/lib/widgets/Makefile.am30
-rw-r--r--buildtools/lib/widgets/addenvvardlg.cpp84
-rw-r--r--buildtools/lib/widgets/addenvvardlg.h54
-rw-r--r--buildtools/lib/widgets/addfilesdialog.cpp78
-rw-r--r--buildtools/lib/widgets/addfilesdialog.h57
-rw-r--r--buildtools/lib/widgets/environmentdisplaydialog.cpp54
-rw-r--r--buildtools/lib/widgets/environmentdisplaydialog.h35
-rw-r--r--buildtools/lib/widgets/environmentdisplaydialogbase.ui111
-rw-r--r--buildtools/lib/widgets/environmentvariableswidget.cpp126
-rw-r--r--buildtools/lib/widgets/environmentvariableswidget.h59
-rw-r--r--buildtools/lib/widgets/environmentvariableswidgetbase.ui200
-rw-r--r--buildtools/lib/widgets/envvartools.cpp31
-rw-r--r--buildtools/lib/widgets/envvartools.h28
-rw-r--r--buildtools/lib/widgets/makeoptionswidget.cpp64
-rw-r--r--buildtools/lib/widgets/makeoptionswidget.h50
-rw-r--r--buildtools/lib/widgets/makeoptionswidgetbase.ui194
-rw-r--r--buildtools/lib/widgets/removesubprojectdialog.cpp52
-rw-r--r--buildtools/lib/widgets/removesubprojectdialog.h52
-rw-r--r--buildtools/lib/widgets/removesubprojectdlgbase.ui154
-rw-r--r--buildtools/lib/widgets/runoptionswidget.cpp138
-rw-r--r--buildtools/lib/widgets/runoptionswidget.h57
-rw-r--r--buildtools/lib/widgets/runoptionswidgetbase.ui257
-rw-r--r--buildtools/lib/widgets/subclassesdlg.cpp122
-rw-r--r--buildtools/lib/widgets/subclassesdlg.h58
-rw-r--r--buildtools/lib/widgets/subclassesdlgbase.ui224
26 files changed, 2379 insertions, 0 deletions
diff --git a/buildtools/lib/widgets/Mainpage.dox b/buildtools/lib/widgets/Mainpage.dox
new file mode 100644
index 00000000..56884c97
--- /dev/null
+++ b/buildtools/lib/widgets/Mainpage.dox
@@ -0,0 +1,10 @@
+/**
+@mainpage The KDevelop Buildtool Widgets Library
+
+This library contains widgets commonly used in buildtool support plugins.
+
+<b>Link with</b>: -lkdevbuildtoolswidgets
+
+<b>Include path</b>: -I\$(kde_includes)/kdevelop/buildtools/widgets
+*/
+
diff --git a/buildtools/lib/widgets/Makefile.am b/buildtools/lib/widgets/Makefile.am
new file mode 100644
index 00000000..2277d9d0
--- /dev/null
+++ b/buildtools/lib/widgets/Makefile.am
@@ -0,0 +1,30 @@
+# This directory collects some classes related to
+# project management for the sole purpose that they
+# can be shared between parts.
+
+INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \
+ -I$(top_srcdir)/lib/widgets/propeditor $(all_includes)
+
+lib_LTLIBRARIES = libkdevbuildtoolswidgets.la
+libkdevbuildtoolswidgets_la_LDFLAGS = $(all_libraries)
+libkdevbuildtoolswidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la \
+ $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) -lktexteditor
+libkdevbuildtoolswidgets_la_SOURCES = addenvvardlg.cpp addfilesdialog.cpp \
+ environmentdisplaydialog.cpp environmentdisplaydialogbase.ui environmentvariableswidget.cpp \
+ environmentvariableswidgetbase.ui envvartools.cpp makeoptionswidget.cpp makeoptionswidgetbase.ui \
+ removesubprojectdialog.cpp removesubprojectdlgbase.ui runoptionswidget.cpp runoptionswidgetbase.ui \
+ subclassesdlg.cpp subclassesdlgbase.ui
+
+METASOURCES = AUTO
+
+kdevelopbuildtoolsincludedir = $(includedir)/kdevelop/buildtools/widgets
+kdevelopbuildtoolsinclude_HEADERS = addenvvardlg.h addfilesdialog.h \
+ environmentvariableswidget.h environmentvariableswidgetbase.h envvartools.h makeoptionswidget.h \
+ makeoptionswidgetbase.h removesubprojectdialog.h removesubprojectdlgbase.h runoptionswidget.h \
+ runoptionswidgetbase.h subclassesdlg.h subclassesdlgbase.h
+
+DOXYGEN_REFERENCES = dcop interfaces kdecore kdefx kdeui khtml kmdi kio kjs kparts kutils kdevutil kdevinterfaces kdevutil
+DOXYGEN_PROJECTNAME = KDevelop Buildtool Widgets Library
+DOXYGEN_DOCDIRPREFIX = kdevbt
+include ../../../Doxyfile.am
+noinst_HEADERS = environmentdisplaydialog.h
diff --git a/buildtools/lib/widgets/addenvvardlg.cpp b/buildtools/lib/widgets/addenvvardlg.cpp
new file mode 100644
index 00000000..aaf82774
--- /dev/null
+++ b/buildtools/lib/widgets/addenvvardlg.cpp
@@ -0,0 +1,84 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Bernd Gehrmann <bernd@kdevelop.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <kbuttonbox.h>
+#include <klocale.h>
+#include <kstdguiitem.h>
+#include <kdeversion.h>
+
+#include "addenvvardlg.h"
+
+
+AddEnvvarDialog::AddEnvvarDialog(QWidget *parent, const char *name)
+ : QDialog(parent, name, true)
+{
+ setCaption(i18n("Add Environment Variable"));
+
+ QLabel *varname_label = new QLabel(i18n("&Name:"), this);
+ varname_edit = new KLineEdit(this);
+ varname_edit->setFocus();
+ varname_label->setBuddy(varname_edit);
+
+ connect( varname_edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotTextChanged() ) );
+ QLabel *value_label = new QLabel(i18n("&Value:"), this);
+ value_edit = new KLineEdit(this);
+ value_label->setBuddy(value_edit);
+ QFontMetrics fm(value_edit->fontMetrics());
+ value_edit->setMinimumWidth(fm.width('X')*35);
+ connect( value_edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotTextChanged() ) );
+
+
+ QVBoxLayout *layout = new QVBoxLayout(this, 10);
+
+ QGridLayout *grid = new QGridLayout(2, 2);
+ layout->addLayout(grid);
+ grid->addWidget(varname_label, 0, 0);
+ grid->addWidget(varname_edit, 0, 1);
+ grid->addWidget(value_label, 1, 0);
+ grid->addWidget(value_edit, 1, 1);
+
+ QFrame *frame = new QFrame(this);
+ frame->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ layout->addWidget(frame, 0);
+
+ KButtonBox *buttonbox = new KButtonBox(this);
+ buttonbox->addStretch();
+ m_pOk = buttonbox->addButton( KStdGuiItem::ok());
+ QPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel());
+ m_pOk->setDefault(true);
+ connect( m_pOk, SIGNAL(clicked()), this, SLOT(accept()) );
+ connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) );
+ buttonbox->layout();
+ layout->addWidget(buttonbox, 0);
+ slotTextChanged();
+}
+
+
+AddEnvvarDialog::~AddEnvvarDialog()
+{}
+
+void AddEnvvarDialog::slotTextChanged()
+{
+ m_pOk->setEnabled( !varname_edit->text().isEmpty() && !value_edit->text().isEmpty() );
+}
+
+#include "addenvvardlg.moc"
diff --git a/buildtools/lib/widgets/addenvvardlg.h b/buildtools/lib/widgets/addenvvardlg.h
new file mode 100644
index 00000000..0ffdbde1
--- /dev/null
+++ b/buildtools/lib/widgets/addenvvardlg.h
@@ -0,0 +1,54 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001 Bernd Gehrmann <bernd@kdevelop.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef _ADDENVVARDLG_H_
+#define _ADDENVVARDLG_H_
+
+#include <qdialog.h>
+#include <klineedit.h>
+class QPushButton;
+
+/**
+Dialog to add environment variables.
+*/
+class AddEnvvarDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ AddEnvvarDialog( QWidget *parent=0, const char *name=0 );
+ ~AddEnvvarDialog();
+
+ QString varname() const
+ { return varname_edit->text(); }
+ QString value() const
+ { return value_edit->text(); }
+ void setvarname(const QString name) const
+ { varname_edit->setText(name); }
+ void setvalue(const QString value) const
+ { value_edit->setText(value); }
+ private slots:
+ void slotTextChanged();
+private:
+ KLineEdit *varname_edit;
+ KLineEdit *value_edit;
+ QPushButton *m_pOk;
+};
+
+#endif
diff --git a/buildtools/lib/widgets/addfilesdialog.cpp b/buildtools/lib/widgets/addfilesdialog.cpp
new file mode 100644
index 00000000..8ba14539
--- /dev/null
+++ b/buildtools/lib/widgets/addfilesdialog.cpp
@@ -0,0 +1,78 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <klocale.h>
+#include <kapplication.h>
+
+#include <qcombobox.h>
+
+#include "addfilesdialog.h"
+#include "addfilesdialog.moc"
+
+AddFilesDialog::AddFilesDialog(const QString& startDir, const QString& filter,
+ QWidget *parent, const char *name, bool modal):
+ KFileDialog(startDir, filter, parent, name, modal)
+{
+ KConfig *config = kapp->config();
+ config->setGroup("Add Files Dialog");
+
+ m_extraWidget = new QComboBox(false, this);
+ m_extraWidget->insertItem(i18n("Copy File(s)"), 0);
+ m_extraWidget->insertItem(i18n("Create Symbolic Link(s)"), 1);
+ m_extraWidget->insertItem(i18n("Add Relative Path(s)"), 2);
+ m_extraWidget->setCurrentItem(config->readNumEntry("Mode"));
+ connect(m_extraWidget, SIGNAL(activated(int)), this, SLOT(storePreferred(int)));
+
+ setPreviewWidget(m_extraWidget);
+
+ setOperationMode(Opening);
+}
+
+
+AddFilesDialog::AddFilesDialog(const QString& startDir, const QString& filter,
+ QWidget *parent, const char *name, bool modal, QComboBox *extraWidget):
+ KFileDialog(startDir, filter, parent, name, modal, extraWidget), m_extraWidget(extraWidget)
+{
+ KConfig *config = kapp->config();
+ config->setGroup("Add Files Dialog");
+
+ m_extraWidget->insertItem(i18n("Copy File(s)"), 0);
+ m_extraWidget->insertItem(i18n("Create Symbolic Link(s)"), 1);
+ m_extraWidget->insertItem(i18n("Add Relative Path(s)"), 2);
+ m_extraWidget->setCurrentItem(config->readNumEntry("Mode"));
+ connect(m_extraWidget, SIGNAL(activated(int)), this, SLOT(storePreferred(int)));
+
+ setOperationMode(Opening);
+}
+
+
+AddFilesDialog::~AddFilesDialog()
+{
+}
+
+AddFilesDialog::Mode AddFilesDialog::mode( )
+{
+ return (AddFilesDialog::Mode)m_extraWidget->currentItem();
+}
+
+void AddFilesDialog::storePreferred( int index )
+{
+ KConfig *config = kapp->config();
+ config->setGroup("Add Files Dialog");
+ config->writeEntry("Mode", index);
+}
diff --git a/buildtools/lib/widgets/addfilesdialog.h b/buildtools/lib/widgets/addfilesdialog.h
new file mode 100644
index 00000000..00b238a7
--- /dev/null
+++ b/buildtools/lib/widgets/addfilesdialog.h
@@ -0,0 +1,57 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#ifndef ADDFILESDIALOG_H
+#define ADDFILESDIALOG_H
+
+#include <kdeversion.h>
+#include <kfiledialog.h>
+
+class QComboBox;
+
+/**
+This class allows you to choose additional modes when adding
+files to the project.
+Currently available modes are Copy, Link and Relative.
+Relative means that file should be not copied but added
+with the relative path (e.g. ../../dir/filename)
+*/
+class AddFilesDialog : public KFileDialog
+{
+ Q_OBJECT
+public:
+ enum Mode { Copy, Link, Relative };
+
+ AddFilesDialog(const QString& startDir, const QString& filter,
+ QWidget *parent, const char *name, bool modal);
+
+ AddFilesDialog(const QString& startDir, const QString& filter,
+ QWidget *parent, const char *name, bool modal, QComboBox *extraWidget);
+
+ virtual ~AddFilesDialog();
+
+ virtual AddFilesDialog::Mode mode();
+
+private:
+ QComboBox * m_extraWidget;
+
+private slots:
+ void storePreferred(int index);
+};
+
+#endif
diff --git a/buildtools/lib/widgets/environmentdisplaydialog.cpp b/buildtools/lib/widgets/environmentdisplaydialog.cpp
new file mode 100644
index 00000000..7d01b031
--- /dev/null
+++ b/buildtools/lib/widgets/environmentdisplaydialog.cpp
@@ -0,0 +1,54 @@
+/* This file is part of the KDE project
+ Copyright (C) 2007 Jens Dagerbo <jens.dagerbo@swipnet.se>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <unistd.h>
+#include <klistview.h>
+#include <qstringlist.h>
+
+#include "environmentdisplaydialog.h"
+
+extern char **environ;
+
+EnvironmentDisplayDialog::EnvironmentDisplayDialog(QWidget* parent, const char* name, bool modal, WFlags fl)
+: EnvironmentDisplayDialogBase(parent,name, modal,fl)
+{
+ QStringList environment;
+ char ** e = ::environ;
+
+ while ( *e )
+ {
+ environment << *e;
+ e++;
+ }
+
+ QStringList::ConstIterator it = environment.begin();
+ while( it !=environment.end() )
+ {
+ QStringList pair = QStringList::split( QChar('='), *it );
+ if ( pair.count() == 2 )
+ {
+ new QListViewItem( environmentListView, pair.first(), pair.last() );
+ }
+ ++it;
+ }
+}
+
+
+#include "environmentdisplaydialog.moc"
+
diff --git a/buildtools/lib/widgets/environmentdisplaydialog.h b/buildtools/lib/widgets/environmentdisplaydialog.h
new file mode 100644
index 00000000..af284a3b
--- /dev/null
+++ b/buildtools/lib/widgets/environmentdisplaydialog.h
@@ -0,0 +1,35 @@
+/* This file is part of the KDE project
+ Copyright (C) 2007 Jens Dagerbo <jens.dagerbo@swipnet.se>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef ENVIRONMENTDISPLAYDIALOG_H
+#define ENVIRONMENTDISPLAYDIALOG_H
+
+
+#include "environmentdisplaydialogbase.h"
+
+class EnvironmentDisplayDialog : public EnvironmentDisplayDialogBase
+{
+Q_OBJECT
+
+public:
+ EnvironmentDisplayDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+};
+
+#endif
+
diff --git a/buildtools/lib/widgets/environmentdisplaydialogbase.ui b/buildtools/lib/widgets/environmentdisplaydialogbase.ui
new file mode 100644
index 00000000..8b41862f
--- /dev/null
+++ b/buildtools/lib/widgets/environmentdisplaydialogbase.ui
@@ -0,0 +1,111 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>EnvironmentDisplayDialogBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>EnvironmentDisplayDialogBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>583</width>
+ <height>523</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Environment</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Current Environment</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KListView">
+ <column>
+ <property name="text">
+ <string>Variable</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Value</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>environmentListView</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <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>321</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>closeButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>closeButton</sender>
+ <signal>clicked()</signal>
+ <receiver>EnvironmentDisplayDialogBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+</includehints>
+</UI>
diff --git a/buildtools/lib/widgets/environmentvariableswidget.cpp b/buildtools/lib/widgets/environmentvariableswidget.cpp
new file mode 100644
index 00000000..7ba08427
--- /dev/null
+++ b/buildtools/lib/widgets/environmentvariableswidget.cpp
@@ -0,0 +1,126 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
+ Copyright (C) 2003 John Firebaugh <jfirebaugh@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "environmentvariableswidget.h"
+#include "environmentdisplaydialog.h"
+
+#include <qcheckbox.h>
+#include <qlineedit.h>
+#include <qspinbox.h>
+#include <qlistview.h>
+#include "domutil.h"
+#include "addenvvardlg.h"
+
+
+void EnvironmentVariablesWidget::addVarClicked()
+{
+ AddEnvvarDialog dlg( this, "add env dialog" ) ;
+ if (QListViewItem *Item = listview->selectedItem())
+ {
+ dlg.setvarname(Item->text(0));
+ dlg.setvalue(Item->text(1));
+ }
+ if (!dlg.exec())
+ return;
+
+ (void) new QListViewItem(listview, dlg.varname(), dlg.value());
+}
+
+
+void EnvironmentVariablesWidget::editVarClicked()
+{
+ AddEnvvarDialog dlg( this, "edit env dialog" );
+ QListViewItem *item = listview->selectedItem();
+ if ( !item )
+ return;
+ dlg.setvarname(item->text(0));
+ dlg.setvalue(item->text(1));
+ if (!dlg.exec())
+ return;
+
+ item->setText(0,dlg.varname());
+ item->setText(1,dlg.value());
+}
+
+
+void EnvironmentVariablesWidget::removeVarClicked()
+{
+ delete listview->selectedItem();
+}
+
+
+EnvironmentVariablesWidget::EnvironmentVariablesWidget(QDomDocument &dom, const QString &configGroup,
+ QWidget *parent, const char *name)
+ : EnvironmentVariablesWidgetBase(parent, name),
+ m_dom(dom), m_configGroup(configGroup)
+{
+ readEnvironment(dom, configGroup);
+ connect( listview, SIGNAL( doubleClicked ( QListViewItem *, const QPoint &, int ) ), this, SLOT( editVarClicked() ) );
+}
+
+
+EnvironmentVariablesWidget::~EnvironmentVariablesWidget()
+{}
+
+void EnvironmentVariablesWidget::readEnvironment(QDomDocument &dom, const QString &configGroup)
+{
+ m_dom = dom;
+ m_configGroup = configGroup;
+
+ listview->clear();
+
+ DomUtil::PairList list =
+ DomUtil::readPairListEntry(dom, m_configGroup, "envvar", "name", "value");
+
+ QListViewItem *lastItem = 0;
+
+ DomUtil::PairList::ConstIterator it;
+ for (it = list.begin(); it != list.end(); ++it) {
+ QListViewItem *newItem = new QListViewItem(listview, (*it).first, (*it).second);
+ if (lastItem)
+ newItem->moveItem(lastItem);
+ lastItem = newItem;
+ }
+}
+
+void EnvironmentVariablesWidget::changeConfigGroup( const QString &configGroup)
+{
+ m_configGroup = configGroup;
+}
+
+void EnvironmentVariablesWidget::accept()
+{
+ DomUtil::PairList list;
+ QListViewItem *item = listview->firstChild();
+ while (item) {
+ list << DomUtil::Pair(item->text(0), item->text(1));
+ item = item->nextSibling();
+ }
+
+ DomUtil::writePairListEntry(m_dom, m_configGroup, "envvar", "name", "value", list);
+}
+
+void EnvironmentVariablesWidget::environmentClicked()
+{
+ EnvironmentDisplayDialog dlg;
+ dlg.exec();
+}
+
+#include "environmentvariableswidget.moc"
diff --git a/buildtools/lib/widgets/environmentvariableswidget.h b/buildtools/lib/widgets/environmentvariableswidget.h
new file mode 100644
index 00000000..9f2d472e
--- /dev/null
+++ b/buildtools/lib/widgets/environmentvariableswidget.h
@@ -0,0 +1,59 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
+ Copyright (C) 2003 John Firebaugh <jfirebaugh@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef _ENVIRONMENTVARIABLESWIDGET_H_
+#define _ENVIRONMENTVARIABLESWIDGET_H_
+
+#include "environmentvariableswidgetbase.h"
+
+#include <qdom.h>
+
+/**
+Environment variables widget.
+*/
+class EnvironmentVariablesWidget : public EnvironmentVariablesWidgetBase
+{
+ Q_OBJECT
+
+public:
+ EnvironmentVariablesWidget( QDomDocument &dom, const QString &configGroup,
+ QWidget *parent=0, const char *name=0 );
+ ~EnvironmentVariablesWidget();
+
+ /// read in a set of environment variables from the DOM document
+ void readEnvironment(QDomDocument &dom, const QString &configGroup);
+
+ /// changes the path in the DOM structure where the environment variables are stored
+ void changeConfigGroup( const QString &configGroup);
+
+public slots:
+ void accept();
+
+private:
+ virtual void addVarClicked();
+ virtual void removeVarClicked();
+ virtual void editVarClicked();
+ virtual void environmentClicked();
+
+ QDomDocument &m_dom;
+ QString m_configGroup;
+};
+
+#endif
diff --git a/buildtools/lib/widgets/environmentvariableswidgetbase.ui b/buildtools/lib/widgets/environmentvariableswidgetbase.ui
new file mode 100644
index 00000000..d16cc613
--- /dev/null
+++ b/buildtools/lib/widgets/environmentvariableswidgetbase.ui
@@ -0,0 +1,200 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>EnvironmentVariablesWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>EnvironmentVariablesWidgetBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>566</width>
+ <height>451</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Environment Variables</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0" rowspan="6" colspan="1">
+ <column>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Value</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>listview</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>removevar_button</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>editvar_button</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Edit</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>addvar_button</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>A&amp;dd / Copy</string>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>Spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>60</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>environmentButton</cstring>
+ </property>
+ <property name="text">
+ <string>E&amp;nvironment</string>
+ </property>
+ </widget>
+ <spacer row="5" column="1">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>171</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>addvar_button</sender>
+ <signal>clicked()</signal>
+ <receiver>EnvironmentVariablesWidgetBase</receiver>
+ <slot>addVarClicked()</slot>
+ </connection>
+ <connection>
+ <sender>removevar_button</sender>
+ <signal>clicked()</signal>
+ <receiver>EnvironmentVariablesWidgetBase</receiver>
+ <slot>removeVarClicked()</slot>
+ </connection>
+ <connection>
+ <sender>editvar_button</sender>
+ <signal>clicked()</signal>
+ <receiver>EnvironmentVariablesWidgetBase</receiver>
+ <slot>editVarClicked()</slot>
+ </connection>
+ <connection>
+ <sender>environmentButton</sender>
+ <signal>clicked()</signal>
+ <receiver>EnvironmentVariablesWidgetBase</receiver>
+ <slot>environmentClicked()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>listview</tabstop>
+ <tabstop>addvar_button</tabstop>
+ <tabstop>removevar_button</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<slots>
+ <slot>addVarClicked()</slot>
+ <slot>removeVarClicked()</slot>
+ <slot>editVarClicked()</slot>
+ <slot>environmentClicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</UI>
diff --git a/buildtools/lib/widgets/envvartools.cpp b/buildtools/lib/widgets/envvartools.cpp
new file mode 100644
index 00000000..bc8eaf51
--- /dev/null
+++ b/buildtools/lib/widgets/envvartools.cpp
@@ -0,0 +1,31 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include "envvartools.h"
+
+#include <qregexp.h>
+
+QString EnvVarTools::quote( const QString & arg )
+{
+ QString res = arg;
+ res.replace(QRegExp(QString::fromLatin1("'")), QString::fromLatin1("'\\''"));
+ res.prepend("\"");
+ res.append("\"");
+ return res;
+}
+
diff --git a/buildtools/lib/widgets/envvartools.h b/buildtools/lib/widgets/envvartools.h
new file mode 100644
index 00000000..65db1b8d
--- /dev/null
+++ b/buildtools/lib/widgets/envvartools.h
@@ -0,0 +1,28 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <qstring.h>
+
+/**Environment support functions.*/
+namespace EnvVarTools{
+
+ /**Quotes the argument using double quotes ("). Created as a replacement
+ for KShellProcess::quote.*/
+ QString quote(const QString &arg);
+
+}
diff --git a/buildtools/lib/widgets/makeoptionswidget.cpp b/buildtools/lib/widgets/makeoptionswidget.cpp
new file mode 100644
index 00000000..c720de8b
--- /dev/null
+++ b/buildtools/lib/widgets/makeoptionswidget.cpp
@@ -0,0 +1,64 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "makeoptionswidget.h"
+
+#include <qcheckbox.h>
+#include <klineedit.h>
+#include <qspinbox.h>
+#include <qlistview.h>
+#include <qgroupbox.h>
+
+#include "domutil.h"
+#include "environmentvariableswidget.h"
+
+MakeOptionsWidget::MakeOptionsWidget(QDomDocument &dom, const QString &configGroup,
+ QWidget *parent, const char *name)
+ : MakeOptionsWidgetBase(parent, name),
+ m_dom(dom), m_configGroup(configGroup)
+{
+ env_var_group->setColumnLayout( 1, Qt::Vertical );
+ m_environmentVariablesWidget = new EnvironmentVariablesWidget( dom, configGroup + "/make/envvars", env_var_group );
+
+ abort_box->setChecked(DomUtil::readBoolEntry(dom, configGroup + "/make/abortonerror", true ));
+ jobs_box->setValue(DomUtil::readIntEntry(dom, configGroup + "/make/numberofjobs"));
+ runMultiJobs->setChecked(DomUtil::readBoolEntry(dom, configGroup + "/make/runmultiplejobs"));
+ dontact_box->setChecked(DomUtil::readBoolEntry(dom, configGroup + "/make/dontact"));
+ makebin_edit->setText(DomUtil::readEntry(dom, configGroup + "/make/makebin"));
+ prio_box->setValue(DomUtil::readIntEntry(dom, configGroup + "/make/prio"));
+}
+
+
+MakeOptionsWidget::~MakeOptionsWidget()
+{}
+
+
+void MakeOptionsWidget::accept()
+{
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/make/abortonerror", abort_box->isChecked());
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/make/runmultiplejobs", runMultiJobs->isChecked());
+ DomUtil::writeIntEntry(m_dom, m_configGroup + "/make/numberofjobs", jobs_box->value());
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/make/dontact", dontact_box->isChecked());
+ DomUtil::writeEntry(m_dom, m_configGroup + "/make/makebin", makebin_edit->text());
+ DomUtil::writeIntEntry(m_dom, m_configGroup + "/make/prio", prio_box->value());
+
+ m_environmentVariablesWidget->accept();
+}
+
+#include "makeoptionswidget.moc"
diff --git a/buildtools/lib/widgets/makeoptionswidget.h b/buildtools/lib/widgets/makeoptionswidget.h
new file mode 100644
index 00000000..b6deeb05
--- /dev/null
+++ b/buildtools/lib/widgets/makeoptionswidget.h
@@ -0,0 +1,50 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef _MAKEOPTIONSWIDGET_H_
+#define _MAKEOPTIONSWIDGET_H_
+
+#include "makeoptionswidgetbase.h"
+
+#include <qdom.h>
+
+class EnvironmentVariablesWidget;
+
+/**
+Make options widget.
+*/
+class MakeOptionsWidget : public MakeOptionsWidgetBase
+{
+ Q_OBJECT
+
+public:
+ MakeOptionsWidget( QDomDocument &dom, const QString &configGroup,
+ QWidget *parent=0, const char *name=0 );
+ ~MakeOptionsWidget();
+
+public slots:
+ void accept();
+
+private:
+ QDomDocument &m_dom;
+ QString m_configGroup;
+ EnvironmentVariablesWidget* m_environmentVariablesWidget;
+};
+
+#endif
diff --git a/buildtools/lib/widgets/makeoptionswidgetbase.ui b/buildtools/lib/widgets/makeoptionswidgetbase.ui
new file mode 100644
index 00000000..4bddebd1
--- /dev/null
+++ b/buildtools/lib/widgets/makeoptionswidgetbase.ui
@@ -0,0 +1,194 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>MakeOptionsWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>make_options_widget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>507</width>
+ <height>366</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Make Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>abort_box</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Abort on first error</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>dontact_box</cstring>
+ </property>
+ <property name="text">
+ <string>Onl&amp;y display commands without actually executing them</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="6" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>env_var_group</cstring>
+ </property>
+ <property name="title">
+ <string>Environment &amp;Variables</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>makebin_label</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Name of make executable:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>makebin_edit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>makebin_edit</cstring>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="4" column="4">
+ <property name="name">
+ <cstring>jobs_box</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Num&amp;ber of jobs to run simultaneously:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>jobs_box</cstring>
+ </property>
+ </widget>
+ <spacer row="4" column="5">
+ <property name="name">
+ <cstring>spacer33</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>121</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="4" column="0">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>runMultiJobs</cstring>
+ </property>
+ <property name="text">
+ <string>Run more than one &amp;job at a time</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>prio_label</cstring>
+ </property>
+ <property name="text">
+ <string>Make priority:</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="2" column="2">
+ <property name="name">
+ <cstring>prio_box</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxValue">
+ <number>19</number>
+ </property>
+ <property name="minValue">
+ <number>-20</number>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>runMultiJobs</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>runMultiJobs</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>jobs_box</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>abort_box</tabstop>
+ <tabstop>dontact_box</tabstop>
+ <tabstop>makebin_edit</tabstop>
+ <tabstop>jobs_box</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</UI>
diff --git a/buildtools/lib/widgets/removesubprojectdialog.cpp b/buildtools/lib/widgets/removesubprojectdialog.cpp
new file mode 100644
index 00000000..37f9aaf8
--- /dev/null
+++ b/buildtools/lib/widgets/removesubprojectdialog.cpp
@@ -0,0 +1,52 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include "removesubprojectdialog.h"
+
+RemoveSubprojectDialog::RemoveSubprojectDialog(QString caption, QString question, QWidget* parent, const char* name, bool modal, WFlags fl)
+ : RemoveSubprojectDlgBase(parent,name, modal,fl)
+{
+ setCaption(caption);
+ removeLabel->setText(question);
+}
+
+RemoveSubprojectDialog::~RemoveSubprojectDialog()
+{
+}
+
+/*$SPECIALIZATION$*/
+void RemoveSubprojectDialog::reject()
+{
+ QDialog::reject();
+}
+
+void RemoveSubprojectDialog::accept()
+{
+ QDialog::accept();
+}
+
+bool RemoveSubprojectDialog::removeFromDisk( )
+{
+ return removeCheckBox->isChecked();
+}
+
+
+#include "removesubprojectdialog.moc"
+
diff --git a/buildtools/lib/widgets/removesubprojectdialog.h b/buildtools/lib/widgets/removesubprojectdialog.h
new file mode 100644
index 00000000..89487511
--- /dev/null
+++ b/buildtools/lib/widgets/removesubprojectdialog.h
@@ -0,0 +1,52 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef REMOVESUBPROJECTDIALOG_H
+#define REMOVESUBPROJECTDIALOG_H
+
+#include "removesubprojectdlgbase.h"
+
+/**
+Subproject removal dialog.
+*/
+class RemoveSubprojectDialog : public RemoveSubprojectDlgBase
+{
+ Q_OBJECT
+
+public:
+ RemoveSubprojectDialog(QString caption, QString question, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~RemoveSubprojectDialog();
+ /*$PUBLIC_FUNCTIONS$*/
+ bool removeFromDisk();
+
+public slots:
+ /*$PUBLIC_SLOTS$*/
+
+protected:
+ /*$PROTECTED_FUNCTIONS$*/
+
+protected slots:
+ /*$PROTECTED_SLOTS$*/
+ virtual void reject();
+ virtual void accept();
+
+};
+
+#endif
+
diff --git a/buildtools/lib/widgets/removesubprojectdlgbase.ui b/buildtools/lib/widgets/removesubprojectdlgbase.ui
new file mode 100644
index 00000000..cd36b6ff
--- /dev/null
+++ b/buildtools/lib/widgets/removesubprojectdlgbase.ui
@@ -0,0 +1,154 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>RemoveSubprojectDlgBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>RemoveSubprojectDlgBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>378</width>
+ <height>147</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>[REMOVE SUBPROJECT]</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>fileGroupBox</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>140</height>
+ </size>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="title">
+ <string>&amp;Information</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>removeLabel</cstring>
+ </property>
+ <property name="text">
+ <string>[REMOVE QUESTION]</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>removeCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>Also &amp;remove it from disk</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>noticeLabel</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;b&gt;Note:&lt;/b&gt; You will not be able to undo this operation.</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>buttonLayout</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>buttonSpacer</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>removeButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>removeButton</sender>
+ <signal>clicked()</signal>
+ <receiver>RemoveSubprojectDlgBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>RemoveSubprojectDlgBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<slots>
+ <slot>accept()</slot>
+ <slot>reject()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</UI>
diff --git a/buildtools/lib/widgets/runoptionswidget.cpp b/buildtools/lib/widgets/runoptionswidget.cpp
new file mode 100644
index 00000000..95fe4529
--- /dev/null
+++ b/buildtools/lib/widgets/runoptionswidget.cpp
@@ -0,0 +1,138 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "runoptionswidget.h"
+
+#include <klocale.h>
+#include <kfiledialog.h>
+#include <kurlrequester.h>
+#include <kurlcompletion.h>
+#include <klineedit.h>
+#include <urlutil.h>
+
+#include <qlistview.h>
+#include <qgroupbox.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+#include <qbuttongroup.h>
+#include <qlabel.h>
+
+#include "domutil.h"
+#include "environmentvariableswidget.h"
+
+
+RunOptionsWidget::RunOptionsWidget(QDomDocument &dom, const QString &configGroup,
+ const QString &buildDirectory, QWidget *parent, const char *name)
+ : RunOptionsWidgetBase(parent, name),
+ m_dom(dom), m_configGroup(configGroup)
+{
+ // Create the "Environment Variables" GUI
+ env_var_group->setColumnLayout( 1, Qt::Vertical );
+ m_environmentVariablesWidget = new EnvironmentVariablesWidget( dom, configGroup + "/run/envvars", env_var_group );
+
+ mainprogram_edit->completionObject()->setMode(KURLCompletion::FileCompletion);
+ mainprogram_edit->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly );
+ if( DomUtil::readEntry(dom, configGroup + "/run/mainprogram").isEmpty() && QFileInfo( buildDirectory ).exists() )
+ {
+ mainprogram_edit->setURL( buildDirectory );
+ mainprogram_edit->fileDialog()->setURL( KURL::fromPathOrURL(buildDirectory) );
+ }else if ( QFileInfo( DomUtil::readEntry(dom, configGroup + "/run/mainprogram") ).exists() )
+ {
+ QString program = DomUtil::readEntry(dom, configGroup + "/run/mainprogram");
+ if( QDir::isRelativePath(program) )
+ program = buildDirectory + "/" + program;
+ mainprogram_edit->setURL(program);
+ mainprogram_edit->fileDialog()->setURL( program );
+ }else
+ {
+ mainprogram_edit->setURL(QString());
+ mainprogram_edit->fileDialog()->setURL(QString());
+ }
+
+ cwd_edit->completionObject()->setMode(KURLCompletion::DirCompletion);
+ cwd_edit->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
+ if( DomUtil::readEntry(dom, configGroup + "/run/globalcwd").isEmpty() && QFileInfo( buildDirectory ).exists() )
+ {
+ cwd_edit->setURL( buildDirectory );
+ cwd_edit->fileDialog()->setURL( KURL::fromPathOrURL(buildDirectory) );
+ }else if( QFileInfo( DomUtil::readEntry(dom, configGroup + "/run/globalcwd") ).exists() )
+ {
+ cwd_edit->setURL(DomUtil::readEntry(dom, configGroup + "/run/globalcwd"));
+ cwd_edit->fileDialog()->setURL( KURL::fromPathOrURL( DomUtil::readEntry(dom, configGroup + "/run/globalcwd") ) );
+ }else
+ {
+ cwd_edit->setURL(QString());
+ cwd_edit->fileDialog()->setURL(QString());
+ }
+
+ if( configGroup == "/kdevautoproject" || configGroup == "/kdevtrollproject" )
+ {
+ mainProgramGroupBox->setCheckable(true);
+ mainProgramGroupBox->setChecked( DomUtil::readBoolEntry(dom, configGroup+"/run/useglobalprogram", false ) );
+ }else
+ {
+ delete notelabel;
+ }
+
+ // Read the main program command line arguments and store them in the edit box
+
+ runargs_edit->setText(DomUtil::readEntry(dom, configGroup + "/run/programargs"));
+ debugargs_edit->setText(DomUtil::readEntry(dom, configGroup + "/run/globaldebugarguments"));
+
+ startinterminal_box->setChecked(DomUtil::readBoolEntry(dom, configGroup + "/run/terminal"));
+ autocompile_box->setChecked(DomUtil::readBoolEntry(dom, configGroup + "/run/autocompile", false));
+ autoinstall_box->setChecked(DomUtil::readBoolEntry(dom, configGroup + "/run/autoinstall", false));
+ autokdesu_box->setChecked(DomUtil::readBoolEntry(dom, configGroup + "/run/autokdesu", false));
+}
+
+
+RunOptionsWidget::~RunOptionsWidget()
+{}
+
+
+void RunOptionsWidget::accept()
+{
+ DomUtil::writeEntry(m_dom, m_configGroup + "/run/mainprogram", mainprogram_edit->url());
+ DomUtil::writeEntry(m_dom, m_configGroup + "/run/programargs", runargs_edit->text());
+ DomUtil::writeEntry(m_dom, m_configGroup + "/run/globaldebugarguments", debugargs_edit->text());
+ DomUtil::writeEntry(m_dom, m_configGroup + "/run/globalcwd", cwd_edit->url());
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/run/useglobalprogram", mainProgramGroupBox->isChecked());
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/run/terminal", startinterminal_box->isChecked());
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/run/autocompile", autocompile_box->isChecked());
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/run/autoinstall", autoinstall_box->isChecked());
+ DomUtil::writeBoolEntry(m_dom, m_configGroup + "/run/autokdesu", autokdesu_box->isChecked());
+
+ m_environmentVariablesWidget->accept();
+}
+
+void RunOptionsWidget::mainProgramChanged( )
+{
+
+ if( mainProgramGroupBox->isChecked() && mainprogram_edit->url().isEmpty() )
+ {
+ mainprogram_label->setPaletteForegroundColor(QColor("#ff0000"));
+ }
+ else
+ {
+ mainprogram_label->unsetPalette();
+ }
+}
+
+#include "runoptionswidget.moc"
diff --git a/buildtools/lib/widgets/runoptionswidget.h b/buildtools/lib/widgets/runoptionswidget.h
new file mode 100644
index 00000000..758ef4b1
--- /dev/null
+++ b/buildtools/lib/widgets/runoptionswidget.h
@@ -0,0 +1,57 @@
+/* This file is part of the KDE project
+ Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef _RUNOPTIONSWIDGET_H_
+#define _RUNOPTIONSWIDGET_H_
+
+#include "runoptionswidgetbase.h"
+
+#include <qdom.h>
+#include <kurl.h>
+
+class EnvironmentVariablesWidget;
+
+/**
+Run options widget.
+*/
+class RunOptionsWidget : public RunOptionsWidgetBase
+{
+ Q_OBJECT
+
+public:
+ RunOptionsWidget( QDomDocument &dom, //!< document DOM
+ const QString &configGroup, //!< configuration group
+ const QString &buildDirectory, //!< project build directory
+ QWidget *parent=0, //!< parent widget
+ const char *name=0 //!< widget's name
+ );
+ ~RunOptionsWidget();
+
+public slots:
+ void accept();
+
+private:
+ virtual void mainProgramChanged( );
+
+ QDomDocument &m_dom;
+ QString m_configGroup;
+ EnvironmentVariablesWidget* m_environmentVariablesWidget;
+};
+
+#endif
diff --git a/buildtools/lib/widgets/runoptionswidgetbase.ui b/buildtools/lib/widgets/runoptionswidgetbase.ui
new file mode 100644
index 00000000..1163484c
--- /dev/null
+++ b/buildtools/lib/widgets/runoptionswidgetbase.ui
@@ -0,0 +1,257 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>RunOptionsWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>run_options_widget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>500</width>
+ <height>506</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Run Options</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>mainProgramGroupBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Main Program</string>
+ </property>
+ <property name="checkable">
+ <bool>false</bool>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>notelabel</cstring>
+ </property>
+ <property name="text">
+ <string>Note: These options override target specific settings.</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>For Automake and QMake type projects, the proper way to set these options are per target in the &lt;b&gt;Automake Manager&lt;/b&gt; and &lt;b&gt;QMake Manager&lt;/b&gt;, respectively.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>runargs_edit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The command line arguments passed to the main program when run</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>mainprogram_label_2</cstring>
+ </property>
+ <property name="text">
+ <string>Run Arg&amp;uments:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mainprogram_edit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>mainprogram_label</cstring>
+ </property>
+ <property name="text">
+ <string>Executa&amp;ble:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mainprogram_edit</cstring>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="1" column="1">
+ <property name="name">
+ <cstring>mainprogram_edit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Full path to the executable</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>mainprogram_label_3</cstring>
+ </property>
+ <property name="text">
+ <string>Debug Ar&amp;guments:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mainprogram_edit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="1">
+ <property name="name">
+ <cstring>debugargs_edit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The command line arguments passed to the main program when debugged</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>mainprogram_label_3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Working &amp;Directory:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mainprogram_edit</cstring>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="4" column="1">
+ <property name="name">
+ <cstring>cwd_edit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Sets the current working directory for the launched process</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Options</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>autocompile_box</cstring>
+ </property>
+ <property name="text">
+ <string>Automaticall&amp;y compile before execution</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>If the program is not up-to-date with the source code, compile it before starting its execution</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>autoinstall_box</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Automatically install before execution</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>autokdesu_box</cstring>
+ </property>
+ <property name="text">
+ <string>Use &amp;kdesu when installing</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>startinterminal_box</cstring>
+ </property>
+ <property name="text">
+ <string>Start in e&amp;xternal terminal</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Start the main program in an external terminal</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>env_var_group</cstring>
+ </property>
+ <property name="title">
+ <string>Environment &amp;Variables</string>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>mainprogram_edit</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>run_options_widget</receiver>
+ <slot>mainProgramChanged()</slot>
+ </connection>
+ <connection>
+ <sender>mainprogram_edit</sender>
+ <signal>urlSelected(const QString&amp;)</signal>
+ <receiver>run_options_widget</receiver>
+ <slot>mainProgramChanged()</slot>
+ </connection>
+ <connection>
+ <sender>mainProgramGroupBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>run_options_widget</receiver>
+ <slot>mainProgramChanged()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>startinterminal_box</tabstop>
+ <tabstop>autocompile_box</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+ <include location="global" impldecl="in declaration">ksqueezedtextlabel.h</include>
+</includes>
+<slots>
+ <slot>mainProgramChanged()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>klineedit.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/buildtools/lib/widgets/subclassesdlg.cpp b/buildtools/lib/widgets/subclassesdlg.cpp
new file mode 100644
index 00000000..5c3a0fef
--- /dev/null
+++ b/buildtools/lib/widgets/subclassesdlg.cpp
@@ -0,0 +1,122 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+#include <qlistbox.h>
+#include <kurlrequester.h>
+
+#include "subclassesdlg.h"
+#include "subclassesdlg.moc"
+SubclassesDlg::SubclassesDlg(QString form, DomUtil::PairList &config, QString projectDir, QWidget* parent, const char* name, bool modal, WFlags fl)
+: SubclassesDlgBase(parent,name, modal,fl), m_form(form), m_config(config), m_projectDir(projectDir)
+{
+ subclass_url->setEnabled(false);
+
+ DomUtil::PairList::iterator it;
+ for ( it = config.begin(); it != config.end(); ++it )
+ {
+ if ((*it).second == form)
+ subclasses_box->insertItem(projectDir + (*it).first);
+ }
+}
+
+SubclassesDlg::~SubclassesDlg()
+{
+}
+
+/*$SPECIALIZATION$*/
+void SubclassesDlg::accept()
+{
+ QPtrList<DomUtil::Pair> pairsToRemove;
+
+ DomUtil::PairList::iterator it;
+ for ( it = m_config.begin(); it != m_config.end(); ++it )
+ {
+ if ((*it).second == m_form)
+ {
+ pairsToRemove.append(&(*it));
+ }
+ }
+
+ DomUtil::Pair *pair;
+ for ( pair = pairsToRemove.first(); pair; pair = pairsToRemove.next() )
+ {
+ m_config.remove(*pair);
+ }
+
+ for (int i = 0; i < (int)subclasses_box->count(); ++i)
+ {
+ m_config << DomUtil::Pair(subclasses_box->text(i).remove(0,m_projectDir.length()), m_form);
+ }
+
+ SubclassesDlgBase::accept();
+}
+
+
+void SubclassesDlg::newRelation()
+{
+ subclasses_box->setFocus();
+ subclasses_box->insertItem("");
+ subclasses_box->setCurrentItem(subclasses_box->count()-1);
+ subclass_url->setEnabled(true);
+ subclass_url->setURL("");
+ subclass_url->setFocus();
+}
+
+void SubclassesDlg::removeRelation()
+{
+ if (subclasses_box->currentItem() > -1)
+ {
+ QListBoxItem *item = subclasses_box->item(subclasses_box->currentItem());
+ int itemIdx = subclasses_box->currentItem();
+
+ if (item->prev())
+ {
+ subclasses_box->setCurrentItem(item->prev());
+ subclass_url->setURL(item->prev()->text());
+ }
+ else if (item->next())
+ {
+ subclasses_box->setCurrentItem(item->next());
+ subclass_url->setURL(item->next()->text());
+ }
+ else
+ {
+ subclass_url->setEnabled(false);
+ subclass_url->setURL("");
+ }
+ subclasses_box->removeItem(itemIdx);
+ }
+}
+
+void SubclassesDlg::changeCurrentURL(const QString &str)
+{
+ if ( subclasses_box->currentItem() > -1 )
+ {
+ subclasses_box->changeItem(str, subclasses_box->currentItem());
+ }
+}
+
+void SubclassesDlg::currentRelationChanged( QListBoxItem * item )
+{
+ if (item)
+ {
+ subclass_url->setEnabled(true);
+ subclass_url->setURL(item->text());
+ }
+}
+
diff --git a/buildtools/lib/widgets/subclassesdlg.h b/buildtools/lib/widgets/subclassesdlg.h
new file mode 100644
index 00000000..46b07b31
--- /dev/null
+++ b/buildtools/lib/widgets/subclassesdlg.h
@@ -0,0 +1,58 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef SUBCLASSESDLG_H
+#define SUBCLASSESDLG_H
+#include "domutil.h"
+#include "subclassesdlgbase.h"
+
+/**
+Subclass creation dialog.
+*/
+class SubclassesDlg : public SubclassesDlgBase
+{
+ Q_OBJECT
+
+public:
+ SubclassesDlg(QString form, DomUtil::PairList &config, QString projectDir, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~SubclassesDlg();
+ /*$PUBLIC_FUNCTIONS$*/
+
+public slots:
+ /*$PUBLIC_SLOTS$*/
+ virtual void accept();
+
+protected:
+ /*$PROTECTED_FUNCTIONS$*/
+
+protected slots:
+ /*$PROTECTED_SLOTS$*/
+ virtual void newRelation();
+ virtual void removeRelation();
+ virtual void changeCurrentURL(const QString &str);
+ virtual void currentRelationChanged(QListBoxItem *item);
+
+private:
+ QString m_form;
+ DomUtil::PairList &m_config;
+ QString m_projectDir;
+};
+
+#endif
+
diff --git a/buildtools/lib/widgets/subclassesdlgbase.ui b/buildtools/lib/widgets/subclassesdlgbase.ui
new file mode 100644
index 00000000..026ab2ca
--- /dev/null
+++ b/buildtools/lib/widgets/subclassesdlgbase.ui
@@ -0,0 +1,224 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>SubclassesDlgBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>SubclassesDlgBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>514</width>
+ <height>278</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Related Subclasses</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>add_button</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add Relation</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>remove_button</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Remove Relation</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QListBox" row="1" column="1" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>subclasses_box</cstring>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="0" column="1">
+ <property name="name">
+ <cstring>subclass_url</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>WheelFocus</enum>
+ </property>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>90</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Related subclass &amp;location:</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>subclass_url</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>310</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>SubclassesDlgBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>subclass_url</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>SubclassesDlgBase</receiver>
+ <slot>changeCurrentURL(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>remove_button</sender>
+ <signal>clicked()</signal>
+ <receiver>SubclassesDlgBase</receiver>
+ <slot>removeRelation()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>SubclassesDlgBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>add_button</sender>
+ <signal>clicked()</signal>
+ <receiver>SubclassesDlgBase</receiver>
+ <slot>newRelation()</slot>
+ </connection>
+ <connection>
+ <sender>subclasses_box</sender>
+ <signal>clicked(QListBoxItem*)</signal>
+ <receiver>SubclassesDlgBase</receiver>
+ <slot>currentRelationChanged(QListBoxItem*)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>subclasses_box</tabstop>
+ <tabstop>add_button</tabstop>
+ <tabstop>subclass_url</tabstop>
+ <tabstop>remove_button</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<slots>
+ <slot access="protected">changeCurrentURL(const QString &amp;str)</slot>
+ <slot access="protected">removeRelation()</slot>
+ <slot access="protected">newRelation()</slot>
+ <slot access="protected">currentRelationChanged(QListBoxItem *item)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>