[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace/plasma/sreich/sal-lenses] plasma/netbook/containments/sal: add basic tabbar
From: Shaun Reich <shaun.reich () kdemail ! net>
Date: 2012-02-24 18:59:10
Message-ID: 20120224185910.6A312A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 624c1bd962f8c05a6cfabee5b391d6687cfc6ee7 by Shaun Reich.
Committed on 24/02/2012 at 19:30.
Pushed by sreich into branch 'plasma/sreich/sal-lenses'.
add basic tabbar
M +4 -0 plasma/netbook/containments/sal/runnersconfig.cpp
M +13 -0 plasma/netbook/containments/sal/sal.cpp
M +2 -0 plasma/netbook/containments/sal/sal.h
http://commits.kde.org/kde-workspace/624c1bd962f8c05a6cfabee5b391d6687cfc6ee7
diff --git a/plasma/netbook/containments/sal/runnersconfig.cpp b/plasma/netbook/containments/sal/runnersconfig.cpp
index 4076500..6ecb2e2 100644
--- a/plasma/netbook/containments/sal/runnersconfig.cpp
+++ b/plasma/netbook/containments/sal/runnersconfig.cpp
@@ -38,6 +38,10 @@ RunnersConfig::RunnersConfig(Plasma::RunnerManager *manager, QWidget *parent)
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Runner");
QList<KPluginInfo> runnerInfo = KPluginInfo::fromServices(offers);
+ foreach (const KPluginInfo info, runnerInfo) {
+ //TODO: CREATE CATEGORIES FOR RUNNERS
+ kDebug() << "SREICH RUNNERSCONFIG: " << info.name() << info.pluginName();
+ }
addPlugins(runnerInfo, KPluginSelector::ReadConfigFile, i18n("Available Features"), QString(), KGlobal::config());
}
diff --git a/plasma/netbook/containments/sal/sal.cpp b/plasma/netbook/containments/sal/sal.cpp
index ee47eb1..5db13b6 100644
--- a/plasma/netbook/containments/sal/sal.cpp
+++ b/plasma/netbook/containments/sal/sal.cpp
@@ -54,6 +54,7 @@
#include <Plasma/IconWidget>
#include <Plasma/RunnerManager>
#include <Plasma/ScrollWidget>
+#include <Plasma/TabBar>
#include <Plasma/ToolButton>
@@ -64,6 +65,7 @@ SearchLaunch::SearchLaunch(QObject *parent, const QVariantList &args)
m_queryCounter(0),
m_maxColumnWidth(0),
m_searchField(0),
+ m_filterTabs(0),
m_resultsView(0),
m_orientation(Qt::Vertical),
m_firstItem(0),
@@ -224,6 +226,15 @@ void SearchLaunch::init()
searchLayout->addAnchors(m_backButton, searchLayout, Qt::Vertical);
searchLayout->addAnchor(m_backButton, Qt::AnchorRight, m_searchField, Qt::AnchorLeft);
+ m_filterTabs = new Plasma::TabBar(this);
+ m_filterTabs->addTab("Apps");
+ m_filterTabs->addTab("Files");
+ m_filterTabs->addTab("Internet");
+
+ searchLayout->addAnchor(m_filterTabs, Qt::AnchorTop, m_searchField, Qt::AnchorBottom);
+ searchLayout->addAnchor(m_filterTabs, Qt::AnchorLeft, m_searchField, Qt::AnchorLeft);
+ searchLayout->addAnchor(m_filterTabs, Qt::AnchorRight, m_searchField, Qt::AnchorRight);
+
// add our layouts to main vertical layout
m_mainLayout->addItem(m_stripWidget);
@@ -275,6 +286,8 @@ void SearchLaunch::configChanged()
connect(addApplicationsAction, SIGNAL(triggered()), this, SLOT(launchPackageManager()));
}
}
+
+ m_runnerModel->runnerManager()->setAllowedRunners(QStringList() << "services");
}
void SearchLaunch::availableScreenRegionChanged()
diff --git a/plasma/netbook/containments/sal/sal.h b/plasma/netbook/containments/sal/sal.h
index 367934f..d26dd45 100644
--- a/plasma/netbook/containments/sal/sal.h
+++ b/plasma/netbook/containments/sal/sal.h
@@ -45,6 +45,7 @@ namespace Plasma
class LineEdit;
class Frame;
class FrameSvg;
+ class TabBar;
}
class SearchLaunch : public Plasma::Containment
@@ -109,6 +110,7 @@ private:
QTimer *m_searchTimer;
Plasma::LineEdit *m_searchField;
+ Plasma::TabBar *m_filterTabs;
ItemView *m_resultsView;
StripWidget *m_stripWidget;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic