summaryrefslogtreecommitdiffstats
path: root/parts/partexplorer
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 /parts/partexplorer
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 'parts/partexplorer')
-rw-r--r--parts/partexplorer/Makefile.am17
-rw-r--r--parts/partexplorer/README3
-rw-r--r--parts/partexplorer/README.dox24
-rw-r--r--parts/partexplorer/kdevpartexplorer.desktop76
-rw-r--r--parts/partexplorer/kdevpartexplorer.rc8
-rw-r--r--parts/partexplorer/partexplorer_plugin.cpp65
-rw-r--r--parts/partexplorer/partexplorer_plugin.h48
-rw-r--r--parts/partexplorer/partexplorerform.cpp231
-rw-r--r--parts/partexplorer/partexplorerform.h49
-rw-r--r--parts/partexplorer/partexplorerformbase.ui139
10 files changed, 660 insertions, 0 deletions
diff --git a/parts/partexplorer/Makefile.am b/parts/partexplorer/Makefile.am
new file mode 100644
index 00000000..459c6778
--- /dev/null
+++ b/parts/partexplorer/Makefile.am
@@ -0,0 +1,17 @@
+# Here resides the PartExplorer plugin
+
+INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes)
+
+kde_module_LTLIBRARIES = libkdevpartexplorer.la
+libkdevpartexplorer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
+libkdevpartexplorer_la_LIBADD = $(top_builddir)/lib/libkdevelop.la
+
+libkdevpartexplorer_la_SOURCES = partexplorerformbase.ui partexplorerform.cpp partexplorer_plugin.cpp
+
+METASOURCES = AUTO
+
+servicedir = $(kde_servicesdir)
+service_DATA = kdevpartexplorer.desktop
+
+rcdir = $(kde_datadir)/kdevpartexplorer
+rc_DATA = kdevpartexplorer.rc
diff --git a/parts/partexplorer/README b/parts/partexplorer/README
new file mode 100644
index 00000000..731741e1
--- /dev/null
+++ b/parts/partexplorer/README
@@ -0,0 +1,3 @@
+Please read the on-line, automaticaly updated KDevelop API documentation at:
+http://www.kdevelop.org
+or read the README.dox file.
diff --git a/parts/partexplorer/README.dox b/parts/partexplorer/README.dox
new file mode 100644
index 00000000..08afdd92
--- /dev/null
+++ b/parts/partexplorer/README.dox
@@ -0,0 +1,24 @@
+/** \class PartExplorerPlugin
+A Graphical tool for performing KTrader-like queries about registered services
+
+PartExplorer is a frontend to KTrader class (http://developer.kde.org/documentation/library/3.1-api/kio/html/classKTrader.html)
+and uses its syntax, no more no less: so before saying "it really sucks", give a look at
+http://developer.kde.org/documentation/library/kdeqt/tradersyntax.html.
+
+The real job is done by the @see PartExplorerForm class which handles user input, query system
+configuration and (eventually) fills the property list.
+
+It has helped figuring out several problems when querying KParts (ok, mostly mispelled names ;-), and I
+hope that some other people will find it useful.
+
+Last updated on 28.07.2003 by Mario Scalas
+
+\authors <a href="mailto:mario.scalas AT libero.it">Mario Scalas</a>
+
+\maintainer <a href="mailto:mario.scalas AT libero.it">Mario Scalas</a>
+
+\feature Performs KTrader-like queries about registered services
+
+\bug bugs in <a href="http://bugs.kde.org/buglist.cgi?product=kdevelop&component=partexplorer&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=Bug+Number">partexplorer component at Bugzilla database</a>
+
+*/
diff --git a/parts/partexplorer/kdevpartexplorer.desktop b/parts/partexplorer/kdevpartexplorer.desktop
new file mode 100644
index 00000000..8b031c49
--- /dev/null
+++ b/parts/partexplorer/kdevpartexplorer.desktop
@@ -0,0 +1,76 @@
+[Desktop Entry]
+Type=Service
+Exec=blubb
+Comment=A Graphical tool for performing KTrader-like queries about registered services
+Comment[ca]=Una eina gràfica per a realitzar consultes del tipus KTrader sobre els serveis registrats
+Comment[da]=Et grafisk værktøj til at udføre KTrader-lignende forespørgsler om registrerede tjenester
+Comment[de]=Ein grafisches Werkzeug, mit dem Abfragen nach im System verfügbaren Komponten durchgeführt werden können
+Comment[el]=Ένα γραφικό εργαλείο για την εκτέλεση ερωτήσεων όπως το KTrader σχετικά με καταχωρημένες υπηρεσίες
+Comment[es]=Una herramienta gráfica para realizar consultas del tipo KTrader sobre los servicios registrados
+Comment[et]=Graafiline vahend KTraderi-laadsete päringute sooritamiseks registreeritud teenuste kohta
+Comment[eu]=Erregistratutako zerbitzuei buruzko kontsultak egiteko, KTrader-en antzeko tresna grafikoa
+Comment[fa]=یک ابزار نگاره‌ای برای انجام KTrader- مثل پرس‌وجوهایی در مورد خدمات ثبت‌شده
+Comment[fr]=Un outil graphique pour effectuer des requêtes de type KTrader sur les services enregistrés
+Comment[gl]=Unha ferramente gráfica para realizar peticións tipo KTrader dos servizos rexistrados
+Comment[hu]=Grafikus felületű program a regisztrált szolgáltatások KTrader-szerű lekérdezéséhez
+Comment[it]=Uno strumento grafico per eseguire interrogazioni tipo KTrader sui servizi registrati
+Comment[ja]=登録されたサービスに関する KTrader のような質問を実行するための視覚化されたツール
+Comment[ms]=Alatan bergrafik untuk melaksanakan pertanyaan seperti-KTrader mengenai servis berdaftar
+Comment[nds]=En graafsch Warktüüch för KTrader-liek Anfragen över indragen Deensten.
+Comment[ne]=दर्ता गरेको सेवाका बारेमा क्वेरीहरू जस्तै-KTrader कार्यसम्पादन गर्नका लागि एउटा ग्राफिकल उपकरण
+Comment[nl]=Een grafische tool om naar geregistreerde diensten te zoeken
+Comment[pl]=Narzędzie graficzne do wykonywania zapytań na temat zarejestrowanych usług (jak KTrader)
+Comment[pt]=Uma ferramenta gráfica para efectuar pesquisas do tipo KTrader sobre os serviços registados
+Comment[pt_BR]=Uma ferramenta Gráfica para realizar consultas como KTrader sobre serviços registrados
+Comment[ru]=Графическое средство для выполнения запросов KTrader о зарегистрированных сервисах.
+Comment[sk]=Grafický nástroj pre vyhľadávanie KTraderregistrovaných služieb
+Comment[sr]=Графички алат за обављање упита налик KTrader-овим о регистрованим сервисима
+Comment[sr@Latn]=Grafički alat za obavljanje upita nalik KTrader-ovim o registrovanim servisima
+Comment[sv]=Ett grafiskt verktyg för att utföra KTrader-liknande förfrågningar om registrerade tjänster.
+Comment[ta]=வரைகலை கருவி மூலம் பதிப்பு சேவையில் இருந்து Kட்ரேடர் கேள்விகளை செயலாக்கலாம்.
+Comment[tg]=Воситаи графикӣ барои иҷро намудани дархостҳои KTrader дар бораи қайдкунии муҳаррирҳо
+Comment[tr]=Kayıtlı servisler için KTrader-benzeri sorgular yapmayı sağlayan bir grafiksel araç
+Comment[zh_CN]=调用KTrader的图形工具-就像查询已经注册的服务。
+Comment[zh_TW]=執行類似 KTrader 查詢註冊服務的圖形化工具
+Name=KDevPartExplorer
+Name[da]=KDevelop Part-søger
+Name[nds]=KDevelop-Komponentkieker
+Name[sk]=KDev Part prieskumník
+Name[sv]=KDevelop delutforskare
+Name[zh_TW]=KDevelop 元件探索
+GenericName=Part Explorer Tool
+GenericName[ca]=Eina Part per a explorar
+GenericName[da]=Partsøger værktøj
+GenericName[de]=Komponenten-Explorer
+GenericName[el]=Εργαλείο περιηγητή τμημάτων
+GenericName[es]=Herramienta de exploración de partes
+GenericName[et]=Komponentide näitaja
+GenericName[eu]=Parteen arakatzaile tresna
+GenericName[fa]=ابزار کاوشگر جزء
+GenericName[fr]=Outil d'exploration des composants
+GenericName[hu]=Objektumböngésző
+GenericName[it]=Strumento per l'esplorazione di componenti
+GenericName[ja]=部分調査ツール
+GenericName[ms]=Alat Penjelajah Bahagian
+GenericName[nds]=Kiekwarktüüch för Komponenten
+GenericName[ne]=भाग एक्सप्लोरर उपकरण
+GenericName[nl]=Part Explorer gereedschap
+GenericName[pl]=Przeglądarka elementów KPart
+GenericName[pt]=Ferramenta de Exploração de Partes
+GenericName[pt_BR]=Ferramenta de Explorador de Parte
+GenericName[ru]=Средство опроса компонентов
+GenericName[sk]=Part prieskumník
+GenericName[sl]=Orodje Part Explorer
+GenericName[sr]=Алат за истраживање делова
+GenericName[sr@Latn]=Alat za istraživanje delova
+GenericName[sv]=Delutforskningsverktyg
+GenericName[ta]=முழுவதும் தேடும் கருவியில் ஒரு பகுதி
+GenericName[tg]=Восиати дархости қисматҳо
+GenericName[tr]=Bileşen Gezinti Aracı
+GenericName[zh_CN]=模块浏览器工具
+GenericName[zh_TW]=元件探索工具
+ServiceTypes=KDevelop/Plugin
+X-KDE-Library=libkdevpartexplorer
+X-KDevelop-Version=5
+X-KDevelop-Scope=Global
+X-KDevelop-Properties=KDEDevelopment
diff --git a/parts/partexplorer/kdevpartexplorer.rc b/parts/partexplorer/kdevpartexplorer.rc
new file mode 100644
index 00000000..9632115b
--- /dev/null
+++ b/parts/partexplorer/kdevpartexplorer.rc
@@ -0,0 +1,8 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="KDevPartExplorer" version="4">
+<MenuBar>
+ <Menu name="tools" >
+ <Action name="show_partexplorerform"/>
+ </Menu>
+</MenuBar>
+</kpartgui>
diff --git a/parts/partexplorer/partexplorer_plugin.cpp b/parts/partexplorer/partexplorer_plugin.cpp
new file mode 100644
index 00000000..92aaf696
--- /dev/null
+++ b/parts/partexplorer/partexplorer_plugin.cpp
@@ -0,0 +1,65 @@
+/***************************************************************************
+ * Copyright (C) 2003 by Mario Scalas *
+ * mario.scalas@libero.it *
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include "partexplorer_plugin.h"
+
+#include <kinstance.h>
+#include <klocale.h>
+#include <kdevgenericfactory.h>
+#include <kdebug.h>
+#include <kaction.h>
+#include <kmainwindow.h>
+
+#include <kdevplugininfo.h>
+#include <kdevmainwindow.h>
+
+#include "partexplorerform.h"
+
+static const KDevPluginInfo data("kdevpartexplorer");
+
+typedef KDevGenericFactory<PartExplorerPlugin> PartExplorerPluginFactory;
+K_EXPORT_COMPONENT_FACTORY( libkdevpartexplorer, PartExplorerPluginFactory( data ) )
+
+PartExplorerPlugin::PartExplorerPlugin( QObject *parent, const char *name, const QStringList & )
+ : KDevPlugin( &data, parent, name ? name : "PartExplorerPlugin" )
+{
+ // we need an instance
+ setInstance( PartExplorerPluginFactory::instance() );
+
+ setXMLFile( "kdevpartexplorer.rc" );
+
+ // this should be your custom internal widget
+ m_widget = new PartExplorerForm( mainWindow()->main() );
+// mainWindow()->embedSelectView( m_widget, i18n("PartExplorer"), i18n("Query system services"));
+
+ KAction *action = new KAction( i18n("&Part Explorer"), 0, this, SLOT(slotShowForm()),
+ actionCollection(), "show_partexplorerform" );
+ action->setToolTip(i18n("KTrader query execution"));
+ action->setWhatsThis(i18n("<b>Part explorer</b><p>Shows a dialog for KTrader query execution. Search your KDE documentation for more information about KDE services and KTrader."));
+}
+
+PartExplorerPlugin::~PartExplorerPlugin()
+{
+/*
+ if (m_widget)
+ {
+ mainWindow()->removeView( m_widget );
+ }
+*/
+ //delete m_widget;
+}
+
+void PartExplorerPlugin::slotShowForm()
+{
+ m_widget->show();
+}
+
+#include "partexplorer_plugin.moc"
diff --git a/parts/partexplorer/partexplorer_plugin.h b/parts/partexplorer/partexplorer_plugin.h
new file mode 100644
index 00000000..28f3cd95
--- /dev/null
+++ b/parts/partexplorer/partexplorer_plugin.h
@@ -0,0 +1,48 @@
+/***************************************************************************
+ * Copyright (C) 2003 by Mario Scalas *
+ * mario.scalas@libero.it *
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _PARTEXPLORERPLUGIN_H_
+#define _PARTEXPLORERPLUGIN_H_
+
+#include <qguardedptr.h>
+
+#include "kdevplugin.h"
+
+class QWidget;
+class QPainter;
+class KURL;
+class PartExplorerForm;
+
+class PartExplorerPlugin : public KDevPlugin
+{
+ Q_OBJECT
+public:
+ /**
+ * Default constructor
+ */
+ PartExplorerPlugin( QObject *parent, const char *name, const QStringList & );
+
+ /**
+ * Destructor
+ */
+ virtual ~PartExplorerPlugin();
+
+private slots:
+ void slotShowForm();
+
+private:
+ /**
+ * The dialog for user interaction, so the plugin is usable too ;)
+ */
+ QGuardedPtr<PartExplorerForm> m_widget;
+};
+
+#endif // _PARTEXPLORERPLUGIN_H_
diff --git a/parts/partexplorer/partexplorerform.cpp b/parts/partexplorer/partexplorerform.cpp
new file mode 100644
index 00000000..f3a1caad
--- /dev/null
+++ b/parts/partexplorer/partexplorerform.cpp
@@ -0,0 +1,231 @@
+/***************************************************************************
+ * Copyright (C) 2003 by Mario Scalas *
+ * mario.scalas@libero.it *
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include <qlineedit.h>
+#include <qtextedit.h>
+#include <qpushbutton.h>
+#include <qtooltip.h>
+#include <qlayout.h>
+#include <qwhatsthis.h>
+#include <qlabel.h>
+
+#include <klistview.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kdebug.h>
+#include <kcombobox.h>
+#include <kservicetype.h>
+
+#include "partexplorerformbase.h"
+#include "partexplorerform.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// class PropertyItem
+///////////////////////////////////////////////////////////////////////////////
+namespace PartExplorer{
+
+class PropertyItem : public KListViewItem
+{
+public:
+ PropertyItem( KListViewItem *parent, const QString &propertyName,
+ const QString &propertyType, const QString &propertyValue )
+ : KListViewItem( parent )
+ {
+ setText( 0, propertyName );
+ setText( 1, propertyType );
+ setText( 2, propertyValue );
+ }
+
+ QString tipText() const
+ {
+ QString tip = i18n("Name: %1 | Type: %2 | Value: %3");
+ return tip.arg( text(0) ).arg( text(1) ).arg( text(2) );
+ }
+};
+
+}
+///////////////////////////////////////////////////////////////////////////////
+// class ResultsList
+///////////////////////////////////////////////////////////////////////////////
+
+class ResultList;
+
+class ResultsToolTip: public QToolTip
+{
+public:
+ ResultsToolTip( ResultsList* parent );
+ virtual void maybeTip( const QPoint& p );
+
+private:
+ ResultsList* m_resultsList;
+};
+
+class ResultsList : public KListView
+{
+public:
+ ResultsList( QWidget *parent )
+ : KListView( parent, "resultslist" )
+ {
+ this->setShowToolTips( false );
+ new ResultsToolTip( this );
+ }
+
+ virtual ~ResultsList() {}
+
+ void clear()
+ {
+ KListView::clear();
+ }
+};
+
+ResultsToolTip::ResultsToolTip( ResultsList* parent )
+ : QToolTip( parent->viewport() ), m_resultsList( parent )
+{
+}
+
+void ResultsToolTip::maybeTip( const QPoint& p )
+{
+ PartExplorer::PropertyItem *item = dynamic_cast<PartExplorer::PropertyItem*>( m_resultsList->itemAt( p ) );
+ if ( item )
+ {
+ QRect r = m_resultsList->itemRect( item );
+ if ( r.isValid() )
+ tip( r, item->tipText() );
+ }
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// class PartExplorerForm
+///////////////////////////////////////////////////////////////////////////////
+
+PartExplorerForm::PartExplorerForm( QWidget *parent )
+ : KDialogBase( parent, "parteplorerform", false,
+ i18n("Part Explorer - A Services Lister"), User1 | Close, User1, true )
+{
+ m_base = new PartExplorerFormBase( this, "partexplorerformbase", 0 );
+ m_resultsList = new ResultsList( m_base );
+ m_resultsList->addColumn( i18n( "Property" ) );
+ m_resultsList->addColumn( i18n( "Type" ) );
+ m_resultsList->addColumn( i18n( "Value" ) );
+ m_resultsList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3,
+ (QSizePolicy::SizeType)3, 0, 0,
+ m_resultsList->sizePolicy().hasHeightForWidth() ) );
+ QWhatsThis::add( m_resultsList, i18n("<b>Matching services</b><p>Results (if any) are shown grouped by matching service name.") );
+ m_base->resultsLabel->setBuddy(m_resultsList);
+ m_base->layout()->add( m_resultsList );
+ setMainWidget( m_base );
+ m_base->typeCombo->lineEdit()->setFocus();
+
+ // User1 button text
+ setButtonText( User1, i18n("&Search") );
+
+ // Resize dialog
+ resize( 480, 512 );
+
+// connect( m_base->typeCombo->lineEdit(), SIGNAL(returnPressed()), this, SLOT(slotSearchRequested()) );
+// connect( m_base->constraintsText, SIGNAL(returnPressed()), this, SLOT(slotSearchRequested()) );
+
+ connect( actionButton(User1), SIGNAL(clicked()), this, SLOT(slotSearchRequested()) );
+// connect( m_base->typeCombo->lineEdit(), SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotServicetypeChanged( const QString& ) ) );
+// slotServicetypeChanged( m_base->typeCombo->lineEdit()->text() );
+
+ // populating with all known servicetypes
+ KServiceType::List serviceList = KServiceType::allServiceTypes();
+ QStringList list;
+ KServiceType::List::Iterator it = serviceList.begin();
+ while( it != serviceList.end() )
+ {
+ list << (*it)->name();
+ ++it;
+ }
+ list.sort();
+ m_base->typeCombo->insertStringList( list );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+PartExplorerForm::~PartExplorerForm()
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void PartExplorerForm::slotSearchRequested()
+{
+ QString serviceType = m_base->typeCombo->lineEdit()->text();
+ QString constraints = m_base->constraintsText->text();
+
+ kdDebug(9000) << "===> PartExplorerForm::slotSearchRequested(): " <<
+ " serviceType = " << serviceType << ", constraints = " << constraints << endl;
+
+ // Query for requested services
+ KTrader::OfferList foundServices = KTrader::self()->query( serviceType, constraints );
+ fillServiceList( foundServices );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void PartExplorerForm::slotDisplayError( QString errorMessage )
+{
+ if (errorMessage.isEmpty())
+ {
+ errorMessage = i18n("Unknown error.");
+ }
+ KMessageBox::error( this, errorMessage );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+void PartExplorerForm::fillServiceList( const KTrader::OfferList &services )
+{
+ this->m_resultsList->clear();
+
+ if ( services.isEmpty())
+ {
+ slotDisplayError( i18n("No service found matching the criteria.") );
+ return;
+ }
+
+ this->m_resultsList->setRootIsDecorated( true );
+
+ KListViewItem *rootItem = 0;
+
+ KTrader::OfferList::ConstIterator it = services.begin();
+ for ( ; it != services.end(); ++it )
+ {
+ KService::Ptr service = (*it);
+ KListViewItem *serviceItem = new KListViewItem( this->m_resultsList, rootItem, service->name() );
+
+ QStringList propertyNames = service->propertyNames();
+ for ( QStringList::const_iterator it = propertyNames.begin(); it != propertyNames.end(); ++it )
+ {
+ QString propertyName = (*it);
+ QVariant property = service->property( propertyName );
+ QString propertyType = property.typeName();
+ QString propertyValue;
+ if (propertyType == "QStringList") {
+ propertyValue = property.toStringList().join(", ");
+ }
+ else {
+ propertyValue = property.toString();
+ }
+
+ QString dProperty = " *** Found property < %1, %2, %3 >";
+ dProperty = dProperty.arg( propertyName ).arg( propertyType ).arg( propertyValue );
+ kdDebug( 9000 ) << dProperty << endl;
+
+ new PartExplorer::PropertyItem( serviceItem, propertyName, propertyType, propertyValue );
+ }
+ }
+}
+
+#include "partexplorerform.moc"
diff --git a/parts/partexplorer/partexplorerform.h b/parts/partexplorer/partexplorerform.h
new file mode 100644
index 00000000..21fe2fba
--- /dev/null
+++ b/parts/partexplorer/partexplorerform.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * Copyright (C) 2003 by Mario Scalas *
+ * mario.scalas@libero.it *
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef PARTEXPLORERFORM_H
+#define PARTEXPLORERFORM_H
+
+#include <ktrader.h>
+#include <kdialogbase.h>
+
+class ResultsList;
+class PartExplorerFormBase;
+
+/**
+* The GUI for the PartExplorer.
+*
+* @author Mario Scalas
+*/
+class PartExplorerForm : public KDialogBase
+{
+ Q_OBJECT
+public:
+ PartExplorerForm( QWidget *parent = 0 );
+ virtual ~PartExplorerForm();
+
+ /**
+ * Fills the widget with data gathered for system's query.
+ */
+ void fillServiceList( const KTrader::OfferList &services );
+
+public slots:
+ void slotDisplayError( QString );
+
+protected slots:
+ void slotSearchRequested();
+
+private:
+ ResultsList *m_resultsList;
+ PartExplorerFormBase *m_base;
+};
+
+#endif
diff --git a/parts/partexplorer/partexplorerformbase.ui b/parts/partexplorer/partexplorerformbase.ui
new file mode 100644
index 00000000..dd9beeb3
--- /dev/null
+++ b/parts/partexplorer/partexplorerformbase.ui
@@ -0,0 +1,139 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>PartExplorerFormBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>PartExplorerFormBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>335</width>
+ <height>241</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>PartExplorer</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>This is a front-end to KDE's KTrader: search your KDE documentation for more information about KDE services and KTrader</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>KDE service &amp;type:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>typeCombo</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>typeCombo</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="autoCompletion">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Additional constraints:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>constraintsText</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QTextEdit">
+ <property name="name">
+ <cstring>constraintsText</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Constraints&lt;/b&gt;Refine your query by writing additional constraints such as &lt;i&gt;([X-KDevelop-Scope]='Global')&lt;/i&gt;).</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>resultsLabel</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;Results</string>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+</customwidgets>
+<tabstops>
+ <tabstop>constraintsText</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"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+</includehints>
+</UI>