summaryrefslogtreecommitdiffstats
path: root/src/profileengine/editor
diff options
context:
space:
mode:
Diffstat (limited to 'src/profileengine/editor')
-rw-r--r--src/profileengine/editor/Makefile.am22
-rw-r--r--src/profileengine/editor/addprofilewidget.ui121
-rw-r--r--src/profileengine/editor/main.cpp45
-rw-r--r--src/profileengine/editor/profileeditor.cpp400
-rw-r--r--src/profileengine/editor/profileeditor.h69
-rw-r--r--src/profileengine/editor/profileeditorbase.ui680
6 files changed, 1337 insertions, 0 deletions
diff --git a/src/profileengine/editor/Makefile.am b/src/profileengine/editor/Makefile.am
new file mode 100644
index 00000000..c83169cd
--- /dev/null
+++ b/src/profileengine/editor/Makefile.am
@@ -0,0 +1,22 @@
+INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/lib/external_interfaces \
+ -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets \
+ -I$(top_srcdir)/src/profileengine/lib -I$(top_srcdir)/lib/structure $(all_includes)
+METASOURCES = AUTO
+
+libprofileeditor_la_LDFLAGS = $(all_libraries)
+libprofileeditor_la_LIBADD = $(top_builddir)/src/profileengine/lib/libprofileengine.la
+noinst_LTLIBRARIES = libprofileeditor.la
+libprofileeditor_COMPILE_FIRST = profileeditorbase.h
+libprofileeditor_la_SOURCES = profileeditorbase.ui profileeditor.cpp \
+ addprofilewidget.ui
+noinst_HEADERS = profileeditor.h
+
+
+bin_PROGRAMS = kdevprofileeditor
+kdevprofileeditor_LDFLAGS = $(all_libraries)
+kdevprofileeditor_LDADD = \
+ $(top_builddir)/src/profileengine/lib/libprofileengine.la libprofileeditor.la \
+ $(LIB_KDEUI) $(LIB_KIO)
+kdevprofileeditor_SOURCES = main.cpp
+
+
diff --git a/src/profileengine/editor/addprofilewidget.ui b/src/profileengine/editor/addprofilewidget.ui
new file mode 100644
index 00000000..56a46f1d
--- /dev/null
+++ b/src/profileengine/editor/addprofilewidget.ui
@@ -0,0 +1,121 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>AddProfileWidget</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>AddProfileWidget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>312</width>
+ <height>192</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Add Profile</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>nameEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>nameEdit</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Generic name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>genericNameEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>genericNameEdit</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Description:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>descriptionEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QTextEdit">
+ <property name="name">
+ <cstring>descriptionEdit</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/profileengine/editor/main.cpp b/src/profileengine/editor/main.cpp
new file mode 100644
index 00000000..52e8d0f1
--- /dev/null
+++ b/src/profileengine/editor/main.cpp
@@ -0,0 +1,45 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Alexander Dymo *
+ * adymo@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+
+#include "profileeditor.h"
+
+static KCmdLineOptions options[] =
+{
+ KCmdLineLastOption
+};
+
+int main(int argc, char **argv)
+{
+ KAboutData about("kdevprofileeditor", I18N_NOOP("KDevelop Profile Editor"), "1", "",
+ KAboutData::License_GPL, I18N_NOOP("(c) 2004, The KDevelop Developers"), 0, 0, "");
+ about.addAuthor("Alexander Dymo", 0, "adymo@kdevelop.org");
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineArgs::addCmdLineOptions(options);
+
+ KApplication app(argc, argv);
+ ProfileEditor editor;
+ editor.show();
+ app.setMainWidget(&editor);
+
+ return app.exec();
+}
diff --git a/src/profileengine/editor/profileeditor.cpp b/src/profileengine/editor/profileeditor.cpp
new file mode 100644
index 00000000..0303793f
--- /dev/null
+++ b/src/profileengine/editor/profileeditor.cpp
@@ -0,0 +1,400 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Alexander Dymo <adymo@kdevelop.org> *
+ * *
+ * This program 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 program 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Library General Public *
+ * License along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#include "profileeditor.h"
+
+#include <qlayout.h>
+#include <klineedit.h>
+#include <qtextedit.h>
+#include <qpalette.h>
+
+#include <kdebug.h>
+#include <kpushbutton.h>
+#include <klistbox.h>
+#include <klistview.h>
+#include <kcombobox.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kdialogbase.h>
+#include <kglobalsettings.h>
+#include <kdeversion.h>
+
+#include <profile.h>
+
+#include "addprofilewidget.h"
+
+class ProfileItem: public KListViewItem {
+public:
+ ProfileItem(KListView *parent, Profile *profile)
+ :KListViewItem(parent), m_profile(profile)
+ {
+ setText(0, profile->genericName());
+ setText(1, profile->description());
+ }
+
+ ProfileItem(KListViewItem *parent, Profile *profile)
+ : KListViewItem(parent), m_profile(profile)
+ {
+ setText(0, profile->genericName());
+ setText(1, profile->description());
+ }
+
+ Profile *profile() const { return m_profile; }
+
+private:
+ Profile *m_profile;
+};
+
+class EDListItem: public KListViewItem{
+public:
+ EDListItem(KListView *parent, const QString &text, bool derived)
+ : KListViewItem(parent, text), m_derived(derived)
+ {
+ }
+
+ bool isDerived() const { return m_derived; }
+
+ virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+ {
+ QColorGroup cgNew = cg;
+ if (m_derived)
+ cgNew.setColor(QColorGroup::Text, KGlobalSettings::inactiveTextColor());
+ KListViewItem::paintCell(p, cgNew, column, width, alignment);
+ }
+
+private:
+ bool m_derived;
+};
+
+
+class ProfileListBuilding {
+public:
+ ProfileItem * operator() (ProfileItem *parent, Profile *profile)
+ {
+ parent->setOpen(true);
+ return new ProfileItem(parent, profile);
+ }
+};
+
+
+ProfileEditor::ProfileEditor(QWidget *parent, const char *name)
+ :ProfileEditorBase(parent, name)
+{
+ refresh();
+}
+
+void ProfileEditor::refresh()
+{
+ profilesList->clear();
+
+ ProfileItem *item = new ProfileItem(profilesList, engine.rootProfile());
+ ProfileListBuilding op;
+ engine.walkProfiles<ProfileListBuilding, ProfileItem>(op, item, engine.rootProfile());
+
+ profilesList->setSelected(item, true);
+ profilesList->setCurrentItem(item);
+
+ refreshAvailableList();
+ refreshPropertyCombo();
+}
+
+void ProfileEditor::refreshPropertyCombo()
+{
+ KTrader::OfferList list = KTrader::self()->query(QString::fromLatin1("KDevelop/Plugin"));
+ QStringList props;
+ for (KTrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it)
+ {
+ QStringList currProps = (*it)->property("X-KDevelop-Properties").toStringList();
+ for (QStringList::const_iterator p = currProps.constBegin();
+ p != currProps.constEnd(); ++p)
+ if (!props.contains(*p))
+ props.append(*p);
+ }
+ props.sort();
+ propertyCombo->insertStringList(props);
+ propertyCombo->setCurrentText("");
+}
+
+void ProfileEditor::refreshAvailableList()
+{
+ //filling a list of available plugins
+ allList->clear();
+ allCore = new KListViewItem(allList, i18n("Core"));
+ allCore->setOpen(true);
+ allGlobal = new KListViewItem(allList, i18n("Global"));
+ allGlobal->setOpen(true);
+ allProject = new KListViewItem(allList, i18n("Project"));
+ allProject->setOpen(true);
+
+ KTrader::OfferList olist = engine.allOffers(ProfileEngine::Core);
+ for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
+ new KListViewItem(allCore, (*it)->desktopEntryName(), (*it)->genericName());
+ olist = engine.allOffers(ProfileEngine::Global);
+ for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
+ new KListViewItem(allGlobal, (*it)->desktopEntryName(), (*it)->genericName());
+ olist = engine.allOffers(ProfileEngine::Project);
+ for (KTrader::OfferList::iterator it = olist.begin(); it != olist.end(); ++it)
+ new KListViewItem(allProject, (*it)->desktopEntryName(), (*it)->genericName());
+}
+
+void ProfileEditor::profileExecuted(QListViewItem *item)
+{
+ if (!item || item->text(0) == "KDevelop")
+ removeProfileButton->setEnabled(false);
+ else
+ removeProfileButton->setEnabled(true);
+
+ fillPropertyList(currentProfile());
+ fillEDLists(currentProfile());
+ fillPluginsList(currentProfile());
+}
+
+void ProfileEditor::fillPropertyList(Profile *profile)
+{
+ derivedPropertiesBox->clear();
+ ownPropertiesBox->clear();
+
+ Profile::EntryList list = profile->list(Profile::Properties);
+ for (Profile::EntryList::const_iterator it = list.begin(); it != list.end(); ++it)
+ {
+ if ((*it).derived)
+ derivedPropertiesBox->insertItem((*it).name);
+ else
+ ownPropertiesBox->insertItem((*it).name);
+ }
+}
+
+void ProfileEditor::fillEDLists(Profile *profile)
+{
+ //filling a list of enabled plugins
+ enabledList->clear();
+ Profile::EntryList list = profile->list(Profile::ExplicitEnable);
+ for (Profile::EntryList::const_iterator it = list.begin(); it != list.end(); ++it)
+ new EDListItem(enabledList, (*it).name, (*it).derived);
+
+ //filling a list of disabled plugins
+ disabledList->clear();
+ list = profile->list(Profile::ExplicitDisable);
+ for (Profile::EntryList::const_iterator it = list.begin(); it != list.end(); ++it)
+ new EDListItem(disabledList, (*it).name, (*it).derived);
+}
+
+void ProfileEditor::fillPluginsList(Profile *profile)
+{
+ pluginsView->clear();
+
+ KListViewItem *core = new KListViewItem(pluginsView, i18n("Core Plugins"));
+ core->setOpen(true);
+ KListViewItem *global = new KListViewItem(pluginsView, i18n("Global Plugins"));
+ global->setOpen(true);
+ KListViewItem *project = new KListViewItem(pluginsView, i18n("Project Plugins"));
+ project->setOpen(true);
+
+ KTrader::OfferList coreOffers = engine.offers(profile->name(), ProfileEngine::Core);
+ for (KTrader::OfferList::const_iterator it = coreOffers.constBegin();
+ it != coreOffers.constEnd(); ++it)
+ new KListViewItem(core, (*it)->desktopEntryName(), (*it)->genericName(),
+ (*it)->property("X-KDevelop-Properties").toStringList().join(", "));
+
+ KTrader::OfferList globalOffers = engine.offers(profile->name(), ProfileEngine::Global);
+ for (KTrader::OfferList::const_iterator it = globalOffers.constBegin();
+ it != globalOffers.constEnd(); ++it)
+ new KListViewItem(global, (*it)->desktopEntryName(), (*it)->genericName(),
+ (*it)->property("X-KDevelop-Properties").toStringList().join(", "));
+
+ KTrader::OfferList projectOffers = engine.offers(profile->name(), ProfileEngine::Project);
+ for (KTrader::OfferList::const_iterator it = projectOffers.constBegin();
+ it != projectOffers.constEnd(); ++it)
+ new KListViewItem(project, (*it)->desktopEntryName(), (*it)->genericName(),
+ (*it)->property("X-KDevelop-Properties").toStringList().join(", "));
+}
+
+void ProfileEditor::propertyExecuted(QListBoxItem *item)
+{
+ removePropertyButton->setEnabled(item != 0);
+}
+
+void ProfileEditor::addProfile()
+{
+ if (!profilesList->currentItem())
+ return;
+
+ KDialogBase dlg(KDialogBase::Plain, i18n("Add Profile"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok);
+ dlg.plainPage()->setMargin(0);
+ (new QVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true);
+ AddProfileWidget *prof = new AddProfileWidget(dlg.plainPage());
+ prof->nameEdit->setFocus();
+ if (dlg.exec() == QDialog::Accepted)
+ {
+ Profile *profile = new Profile(currentProfile(), prof->nameEdit->text(),
+ prof->genericNameEdit->text(),
+ prof->descriptionEdit->text());
+ profilesList->currentItem()->setOpen(true);
+ new ProfileItem(static_cast<KListViewItem*>(profilesList->currentItem()), profile);
+ }
+}
+
+void ProfileEditor::removeProfile()
+{
+ if (KMessageBox::warningContinueCancel(this, i18n("Remove selected profile and all its subprofiles?"),
+ i18n("Remove Profile"),KStdGuiItem::del()) == KMessageBox::Continue)
+ {
+ Profile *profile = currentProfile();
+ if (profile->remove())
+ {
+ QListViewItem *item = profilesList->currentItem();
+ profilesList->setCurrentItem(item->parent());
+ profile->detachFromParent();
+ delete profile;
+ delete item;
+ }
+ else
+ KMessageBox::error(this, i18n("Cannot remove this profile because it is not a local (user-created) profile."), i18n("Remove Profile"));
+ }
+}
+
+void ProfileEditor::addProperty()
+{
+ if ( (!propertyCombo->currentText().isEmpty()) &&
+ (ownPropertiesBox->findItem(propertyCombo->currentText()) == 0) &&
+ (derivedPropertiesBox->findItem(propertyCombo->currentText()) == 0) )
+ {
+ ownPropertiesBox->insertItem(propertyCombo->currentText());
+
+ currentProfile()->addEntry(Profile::Properties, propertyCombo->currentText());
+ currentProfile()->save();
+ }
+
+ fillPluginsList(currentProfile());
+}
+
+void ProfileEditor::removeProperty()
+{
+ currentProfile()->removeEntry(Profile::Properties, ownPropertiesBox->currentText());
+ currentProfile()->save();
+
+ ownPropertiesBox->removeItem(ownPropertiesBox->currentItem());
+
+ fillPluginsList(currentProfile());
+}
+
+Profile *ProfileEditor::currentProfile()
+{
+ ProfileItem *item = dynamic_cast<ProfileItem*>(profilesList->currentItem());
+ if (!item)
+ return 0;
+ return item->profile();
+}
+
+void ProfileEditor::accept()
+{
+}
+
+void ProfileEditor::addEnabled()
+{
+ if (!allList->currentItem() && allEdit->text().isEmpty())
+ return;
+ QString text;
+ if (!allEdit->text().isEmpty())
+ {
+ text = allEdit->text();
+ allEdit->clear();
+ }
+ else
+ {
+ if ((allList->currentItem() == allGlobal) || (allList->currentItem() == allProject))
+ return;
+ text = allList->currentItem()->text(0);
+ }
+
+ if (enabledList->findItem(text, 0) != 0)
+ return;
+ if (disabledList->findItem(text, 0) != 0)
+ {
+ KMessageBox::error(this, i18n("This plugin is already contained in the list of disabled plugins."),
+ i18n("Enable Plugin"));
+ return;
+ }
+ currentProfile()->addEntry(Profile::ExplicitEnable, text);
+ currentProfile()->save();
+ fillPluginsList(currentProfile());
+ new EDListItem(enabledList, text, false);
+}
+
+void ProfileEditor::delEnabled()
+{
+ if (!enabledList->currentItem())
+ return;
+
+ EDListItem *item = dynamic_cast<EDListItem*>(enabledList->currentItem());
+ if (item && !item->isDerived())
+ {
+ currentProfile()->removeEntry(Profile::ExplicitEnable, enabledList->currentItem()->text(0));
+ currentProfile()->save();
+ fillPluginsList(currentProfile());
+ delete enabledList->currentItem();
+ }
+}
+
+void ProfileEditor::addDisabled()
+{
+ if (!allList->currentItem() && allEdit->text().isEmpty())
+ return;
+ QString text;
+ if (!allEdit->text().isEmpty())
+ {
+ text = allEdit->text();
+ allEdit->clear();
+ }
+ else
+ {
+ if ((allList->currentItem() == allGlobal) || (allList->currentItem() == allProject))
+ return;
+ text = allList->currentItem()->text(0);
+ }
+
+ if (disabledList->findItem(text, 0) != 0)
+ return;
+ if (enabledList->findItem(text, 0) != 0)
+ {
+ KMessageBox::error(this, i18n("This plugin is already contained in the list of enabled plugins."),
+ i18n("Disable Plugin"));
+ return;
+ }
+ currentProfile()->addEntry(Profile::ExplicitDisable, text);
+ currentProfile()->save();
+ fillPluginsList(currentProfile());
+ new EDListItem(disabledList, text, false);
+}
+
+void ProfileEditor::delDisabled()
+{
+ if (!disabledList->currentItem())
+ return;
+
+ EDListItem *item = dynamic_cast<EDListItem*>(disabledList->currentItem());
+ if (item && !item->isDerived())
+ {
+ currentProfile()->removeEntry(Profile::ExplicitDisable, disabledList->currentItem()->text(0));
+ delete disabledList->currentItem();
+ currentProfile()->save();
+ fillPluginsList(currentProfile());
+ }
+}
+
+#include "profileeditor.moc"
diff --git a/src/profileengine/editor/profileeditor.h b/src/profileengine/editor/profileeditor.h
new file mode 100644
index 00000000..1ec6e91a
--- /dev/null
+++ b/src/profileengine/editor/profileeditor.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * Copyright (C) 2004 by Alexander Dymo <adymo@kdevelop.org> *
+ * *
+ * This program 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 program 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 General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Library General Public *
+ * License along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef PROFILEEDITOR_H
+#define PROFILEEDITOR_H
+
+#include <profileengine.h>
+
+#include "profileeditorbase.h"
+
+class QListBoxItem;
+class QListViewItem;
+class KListViewItem;
+
+class ProfileEditor : public ProfileEditorBase {
+ Q_OBJECT
+public:
+ ProfileEditor(QWidget *parent = 0, const char *name = 0);
+
+public slots:
+ virtual void removeProperty();
+ virtual void addProperty();
+ virtual void removeProfile();
+ virtual void addProfile();
+ virtual void propertyExecuted(QListBoxItem *item);
+ virtual void profileExecuted(QListViewItem *item);
+
+ virtual void delDisabled();
+ virtual void addDisabled();
+ virtual void delEnabled();
+ virtual void addEnabled();
+
+ virtual void accept();
+
+protected:
+ void refresh();
+ void refreshPropertyCombo();
+ void refreshAvailableList();
+
+ void fillPropertyList(Profile *profile);
+ void fillEDLists(Profile *profile);
+ void fillPluginsList(Profile *profile);
+
+ Profile *currentProfile();
+
+private:
+ ProfileEngine engine;
+
+ KListViewItem *allCore;
+ KListViewItem *allGlobal;
+ KListViewItem *allProject;
+};
+
+#endif
diff --git a/src/profileengine/editor/profileeditorbase.ui b/src/profileengine/editor/profileeditorbase.ui
new file mode 100644
index 00000000..e91fd13d
--- /dev/null
+++ b/src/profileengine/editor/profileeditorbase.ui
@@ -0,0 +1,680 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ProfileEditorBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ProfileEditorBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>637</width>
+ <height>476</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Profile Editor for The KDevelop Platform</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QSplitter" row="0" column="0">
+ <property name="name">
+ <cstring>splitter2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <widget class="QWidgetStack">
+ <property name="name">
+ <cstring>widgetStack1</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>addProfileButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add Profile</string>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>142</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KListView" row="0" column="0" rowspan="3" 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>Description</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>profilesList</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>removeProfileButton</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Remove Profile</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+ </widget>
+ </widget>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>tabWidget2</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Properties</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>addPropertyButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>propertyCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="autoCompletion">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>removePropertyButton</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Derived properties:</string>
+ </property>
+ </widget>
+ <widget class="KListBox">
+ <property name="name">
+ <cstring>derivedPropertiesBox</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Own properties:</string>
+ </property>
+ </widget>
+ <widget class="KListBox">
+ <property name="name">
+ <cstring>ownPropertiesBox</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Lists of Explicitly Enabled &amp;&amp; Disabled Plugins</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="2" rowspan="4" colspan="1">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Enabled:</string>
+ </property>
+ </widget>
+ <widget class="KListView">
+ <column>
+ <property name="text">
+ <string>Plugin Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>enabledList</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="2" rowspan="4" colspan="1">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Disabled:</string>
+ </property>
+ </widget>
+ <widget class="KListView">
+ <column>
+ <property name="text">
+ <string>Plugin Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>disabledList</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="KPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>delEnabledButton</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;-</string>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>spacer2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="4" column="1">
+ <property name="name">
+ <cstring>spacer2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="6" column="1">
+ <property name="name">
+ <cstring>delDisabledButton</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;-</string>
+ </property>
+ </widget>
+ <spacer row="7" column="1">
+ <property name="name">
+ <cstring>spacer2_4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="8" colspan="1">
+ <property name="name">
+ <cstring>layout10</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Available plugins:</string>
+ </property>
+ </widget>
+ <widget class="KListView">
+ <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>Generic Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>allList</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>allEdit</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="0" 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>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>addEnabledButton</cstring>
+ </property>
+ <property name="text">
+ <string>-&gt;</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="5" column="1">
+ <property name="name">
+ <cstring>addDisabledButton</cstring>
+ </property>
+ <property name="text">
+ <string>-&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>List of Plugins to Be Loaded</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KListView" row="0" column="0">
+ <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>Generic Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>pluginsView</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>profilesList</sender>
+ <signal>currentChanged(QListViewItem*)</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>profileExecuted(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>ownPropertiesBox</sender>
+ <signal>currentChanged(QListBoxItem*)</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>propertyExecuted(QListBoxItem*)</slot>
+ </connection>
+ <connection>
+ <sender>addProfileButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>addProfile()</slot>
+ </connection>
+ <connection>
+ <sender>removeProfileButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>removeProfile()</slot>
+ </connection>
+ <connection>
+ <sender>addPropertyButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>addProperty()</slot>
+ </connection>
+ <connection>
+ <sender>removePropertyButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>removeProperty()</slot>
+ </connection>
+ <connection>
+ <sender>profilesList</sender>
+ <signal>executed(QListViewItem*)</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>profileExecuted(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>profilesList</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>profileExecuted(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>addEnabledButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>addEnabled()</slot>
+ </connection>
+ <connection>
+ <sender>delEnabledButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>delEnabled()</slot>
+ </connection>
+ <connection>
+ <sender>addDisabledButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>addDisabled()</slot>
+ </connection>
+ <connection>
+ <sender>delDisabledButton</sender>
+ <signal>clicked()</signal>
+ <receiver>ProfileEditorBase</receiver>
+ <slot>delDisabled()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>profilesList</tabstop>
+ <tabstop>addProfileButton</tabstop>
+ <tabstop>removeProfileButton</tabstop>
+ <tabstop>tabWidget2</tabstop>
+ <tabstop>derivedPropertiesBox</tabstop>
+ <tabstop>ownPropertiesBox</tabstop>
+ <tabstop>propertyCombo</tabstop>
+ <tabstop>addPropertyButton</tabstop>
+ <tabstop>removePropertyButton</tabstop>
+ <tabstop>enabledList</tabstop>
+ <tabstop>disabledList</tabstop>
+ <tabstop>pluginsView</tabstop>
+</tabstops>
+<slots>
+ <slot>profileExecuted(QListViewItem *item)</slot>
+ <slot>propertyExecuted(QListBoxItem *item)</slot>
+ <slot>addProfile()</slot>
+ <slot>removeProfile()</slot>
+ <slot>addProperty()</slot>
+ <slot>removeProperty()</slot>
+ <slot>addEnabled()</slot>
+ <slot>delEnabled()</slot>
+ <slot>addDisabled()</slot>
+ <slot>delDisabled()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klistview.h</includehint>
+</includehints>
+</UI>