summaryrefslogtreecommitdiffstats
path: root/kicker/applets/taskbar
diff options
context:
space:
mode:
Diffstat (limited to 'kicker/applets/taskbar')
-rw-r--r--kicker/applets/taskbar/Makefile.am22
-rw-r--r--kicker/applets/taskbar/taskbarapplet.cpp126
-rw-r--r--kicker/applets/taskbar/taskbarapplet.desktop138
-rw-r--r--kicker/applets/taskbar/taskbarapplet.h56
4 files changed, 342 insertions, 0 deletions
diff --git a/kicker/applets/taskbar/Makefile.am b/kicker/applets/taskbar/Makefile.am
new file mode 100644
index 000000000..35cb337e6
--- /dev/null
+++ b/kicker/applets/taskbar/Makefile.am
@@ -0,0 +1,22 @@
+INCLUDES = -I$(srcdir)/../../taskbar -I$(srcdir)/../../taskmanager -I$(srcdir)/../../libkicker $(all_includes)
+
+kde_module_LTLIBRARIES = taskbar_panelapplet.la
+
+taskbar_panelapplet_la_SOURCES = taskbarapplet.cpp
+
+taskbar_panelapplet_la_METASOURCES = AUTO
+taskbar_panelapplet_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+taskbar_panelapplet_la_LIBADD = $(LIB_KDEUI) ../../taskbar/libtaskbar.la ../../libkicker/libkickermain.la
+
+noinst_HEADERS = taskbarapplet.h
+
+lnkdir = $(kde_datadir)/kicker/applets
+lnk_DATA = taskbarapplet.desktop
+
+EXTRA_DIST = $(lnk_DATA)
+
+messages:
+ $(XGETTEXT) *.cpp *.h -o $(podir)/ktaskbarapplet.pot
+
+srcdoc:
+ kdoc -a -p -H -d $$HOME/web/src/ktaskbarapplet ktaskbarapplet *.h -lqt -lkdecore -lkdeui -lkfile
diff --git a/kicker/applets/taskbar/taskbarapplet.cpp b/kicker/applets/taskbar/taskbarapplet.cpp
new file mode 100644
index 000000000..dc3428bf8
--- /dev/null
+++ b/kicker/applets/taskbar/taskbarapplet.cpp
@@ -0,0 +1,126 @@
+/*****************************************************************
+
+Copyright (c) 2001 Matthias Elter <elter@kde.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#include <qlayout.h>
+#include <qpalette.h>
+
+#include <kapplication.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+#include "global.h"
+
+#include "taskbarcontainer.h"
+
+#include "taskbarapplet.h"
+#include "taskbarapplet.moc"
+
+extern "C"
+{
+ KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString& configFile )
+ {
+ // FIXME: what about two taskbars? perhaps this should be inserted just once
+ KGlobal::locale()->insertCatalogue( "ktaskbarapplet" );
+ int options = 0;
+ if (kapp->authorizeControlModule("kde-kcmtaskbar.desktop"))
+ options = KPanelApplet::Preferences;
+ TaskbarApplet *taskbar = new TaskbarApplet( configFile, KPanelApplet::Stretch,
+ options, parent, "ktaskbarapplet" );
+ return taskbar;
+ }
+}
+
+TaskbarApplet::TaskbarApplet( const QString& configFile, Type type, int actions,
+ QWidget *parent, const char *name )
+ : KPanelApplet( configFile, type, actions, parent, name )
+{
+ setBackgroundOrigin( AncestorOrigin );
+ QHBoxLayout* layout = new QHBoxLayout( this );
+ container = new TaskBarContainer( false, this );
+ container->setBackgroundOrigin( AncestorOrigin );
+ connect(container, SIGNAL(containerCountChanged()), this, SIGNAL(updateLayout()));
+ layout->addWidget( container, 1 );
+ container->popupDirectionChange(popupDirection());
+}
+
+TaskbarApplet::~TaskbarApplet()
+{
+ // FIXME: what about TWO taskbars?
+ KGlobal::locale()->removeCatalogue( "ktaskbarapplet" );
+}
+
+int TaskbarApplet::widthForHeight(int h) const
+{
+ if (orientation() == Qt::Vertical)
+ {
+ return width();
+ }
+
+ // FIXME KDE4: when either TaskBarContainer or Applet smartens up
+ // simplify this
+ KPanelExtension::Position d = orientation() == Qt::Horizontal ?
+ KPanelExtension::Top :
+ KPanelExtension::Left;
+ return container->sizeHint(d, QSize(200, h)).width();
+}
+
+int TaskbarApplet::heightForWidth(int w) const
+{
+ if (orientation() == Qt::Horizontal)
+ {
+ return height();
+ }
+
+ // FIXME KDE4: when either TaskBarContainer or Applet smartens up
+ // simplify this
+ KPanelExtension::Position d = orientation() == Qt::Horizontal ?
+ KPanelExtension::Top :
+ KPanelExtension::Left;
+ return container->sizeHint(d, QSize(w, 200)).height();
+}
+
+void TaskbarApplet::preferences()
+{
+ container->preferences();
+}
+
+void TaskbarApplet::orientationChange( Orientation o )
+{
+ container->orientationChange( o );
+}
+
+void TaskbarApplet::popupDirectionChange( Direction d )
+{
+ container->popupDirectionChange( d );
+}
+
+void TaskbarApplet::moveEvent(QMoveEvent *)
+{
+ container->setBackground();
+}
+
+void TaskbarApplet::paletteChange(const QPalette &)
+{
+ container->setBackground();
+}
diff --git a/kicker/applets/taskbar/taskbarapplet.desktop b/kicker/applets/taskbar/taskbarapplet.desktop
new file mode 100644
index 000000000..d54e39832
--- /dev/null
+++ b/kicker/applets/taskbar/taskbarapplet.desktop
@@ -0,0 +1,138 @@
+[Desktop Entry]
+Type=Plugin
+Name=Taskbar
+Name[af]=Kasbar
+Name[ar]=شريط المهام
+Name[az]=Vəzifə Çubuğu
+Name[be]=Панэль заданняў
+Name[bg]=Панел за задачи
+Name[bn]=টাস্কবার
+Name[br]=Barrenn dleadoù
+Name[ca]=Barra de tasques
+Name[cs]=Pruh úloh
+Name[csb]=Lëstew dzejaniów
+Name[cy]=Bar tasgau
+Name[da]=Opgavelinje
+Name[de]=Fensterleiste
+Name[el]=Γραμμή εργασιών
+Name[eo]=Taskostrio
+Name[es]=Barra de tareas
+Name[et]=Tegumiriba
+Name[eu]=Ataza-barra
+Name[fa]=میله تکلیف
+Name[fi]=Tehtäväpalkki
+Name[fr]=Barre des tâches
+Name[fy]=Taakbalke
+Name[ga]=Tascbharra
+Name[gl]=Barra de tarefas
+Name[he]=שורת המשימות
+Name[hi]=कार्यपट्टी
+Name[hr]=Traka zadataka
+Name[hu]=Feladatlista
+Name[is]=Verkefnaslá
+Name[it]=Barra delle applicazioni
+Name[ja]=タスクバー
+Name[ka]=ამოცანათა პანელი
+Name[kk]=Тапсырмалар панелі
+Name[km]=របារ​ភារកិច្ច
+Name[ko]=작업 표시줄
+Name[lo]=ແຖບຫນ້າຕ່າງງານ
+Name[lt]=Užduočių juosta
+Name[lv]=Uzdevumjosla
+Name[mk]=Лента со програми
+Name[mn]=Цонхны самбар
+Name[nb]=Oppgavelinje
+Name[nds]=Programmbalken
+Name[ne]=कार्यपट्टी
+Name[nl]=Taakbalk
+Name[nn]=Oppgåvelinje
+Name[nso]=Bar ya Mosongwana
+Name[oc]=Barra de tasques
+Name[pa]=ਸੰਦਪੱਟੀ
+Name[pl]=Pasek zadań
+Name[pt]=Barra de Tarefas
+Name[pt_BR]=Barra de tarefas
+Name[ro]=Bara de procese
+Name[ru]=Панель задач
+Name[rw]=Umurongoibikorwa
+Name[se]=Bargoholga
+Name[sk]=Panel úloh
+Name[sl]=Opravilna vrstica
+Name[sr]=Трака задатака
+Name[sr@Latn]=Traka zadataka
+Name[ss]=Ibar yemsebenti
+Name[sv]=Aktivitetsfält
+Name[ta]=பணிப்பட்டி
+Name[tg]=Пайраҳаи вазифа
+Name[th]=แถบหน้าต่างงาน
+Name[tr]=Görev Çubuğu
+Name[tt]=Qoraltirä
+Name[uk]=Смужка задач
+Name[uz]=Vazifalar paneli
+Name[uz@cyrillic]=Вазифалар панели
+Name[ven]=Bara ya mushumo
+Name[vi]=Thanh tác vụ
+Name[wa]=Bår des bouyes
+Name[xh]=Ibar yomsebenzi
+Name[zh_CN]=任务条
+Name[zh_TW]=工作列
+Name[zu]=Ibha yemisebenzi
+
+Comment=The default task bar for window management
+Comment[af]=Die standaard taak balk vir venster bestuur
+Comment[be]=Стандартная панэль заданняў для кіравання вокнамі
+Comment[bg]=Системен панел за лентата със задачите
+Comment[bn]=উইণ্ডো ব্যবস্থাপনার জন্য ডিফল্ট টাস্ক বার
+Comment[bs]=Osnovni taskbar za upravljanje prozorima
+Comment[ca]=La barra de tasques per omissió per a la gestió de finestres
+Comment[cs]=Výchozí pruh úloh pro správu oken
+Comment[csb]=Domëslnô lëstew dzejaniów do sprôwianiô òknama
+Comment[da]=Standard-opgavelinje for vindueshåndtering
+Comment[de]=Standardmäßiger Bereich für offene Fenster in der Kontrollleiste
+Comment[el]=Η προκαθορισμένη γραμμή εργασιών για τη διαχείριση των παραθύρων
+Comment[eo]=La defaŭlta taskostrio por fenestroadministrado.
+Comment[es]=La barra de tareas predeterminada para gestionar las ventanas
+Comment[et]=Vaikimisi kasutatav tegumiriba akende halduseks
+Comment[eu]=Ataza-barra lehenetsia leihoen kudeaketarako
+Comment[fa]=میله تکلیف پیش‌فرض برای مدیریت پنجره
+Comment[fi]=Oletustyökalupalkki ikkunoiden hallintaan
+Comment[fr]=La barre des tâches gérant les fenêtres
+Comment[fy]=De standert taakbalke foar finsterbehear
+Comment[gl]=A barra de tarefas por defeito para xestión de fiestras.
+Comment[he]=ברירת מחדל של יישומון שורת משימות ללוח
+Comment[hr]=Zadana traka zadataka za upravljanje prozorima
+Comment[hu]=Az alapértelmezett feladatlista ablakkezeléshez
+Comment[is]=Sjálfgefna verkefnasláin fyrir gluggastjórnun
+Comment[it]=La barra delle applicazioni per la gestione delle finestre
+Comment[ja]=ウィンドウマネージャ用のデフォルトのタスクバー
+Comment[ka]=ფანჯრის მართვის ძირითადი პულტი
+Comment[kk]=Терезелерді басқару әдетті тапсырмалар панелі
+Comment[km]=របារ​ភារកិច្ច​លំនាំដើម សម្រាប់​គ្រប់គ្រង​បង្អួច
+Comment[lt]=Numatyta užduočių juostos langų tvarkymo priemonė
+Comment[mk]=Стандардната линија со задачи за менаџмент на прозорци
+Comment[nb]=Den vanlige oppgavelinja for å behandle vinduer
+Comment[nds]=Standard-Programmbalken för de Finsterpleeg
+Comment[ne]=सञ्झ्याल व्यवस्थापनका लागि पूर्वनिर्धारित उपकरणपट्टी
+Comment[nl]=De standaard taakbalk voor vensterbeheer
+Comment[nn]=Den vanlege oppgåvelinja for å handsama vindauge
+Comment[pa]=ਮੂਲ ਵੇਹੜੇ ਲਈ ਮੂਲ ਕੰਮ ਪੱਟੀ
+Comment[pl]=Domyślny pasek zadań do zarządzania oknami
+Comment[pt]=A barra de tarefas por omissão para a gestão de janelas
+Comment[pt_BR]=A barra de tarefas padrão para o gerenciamento de janelas.
+Comment[ro]=Bara de procese implicită pentru managementul ferestrelor
+Comment[ru]=Панель списка задач по умолчанию для управления окнами
+Comment[se]=Standárda bargoholga lásegieđaheami várás
+Comment[sk]=Prednastavený panel úloh pre správcu okien
+Comment[sl]=Privzeta opravilna vrstica za upravljanje z okni
+Comment[sr]=Подразумевана трака задатака за управљање прозорима
+Comment[sr@Latn]=Podrazumevana traka zadataka za upravljanje prozorima
+Comment[sv]=Det förvalda aktivitetsfältet för fönsterhantering
+Comment[th]=แอพเพล็ตถาดงานโดยปริยายของพาเนลสำหรับการจัดการหน้าต่าง
+Comment[tr]=Pencere yönetimi için öntanımlı görev çubuğu
+Comment[uk]=Типова панель задач для керування вікнами
+Comment[vi]=Thanh tác vụ mặc định cho trình quản lý cửa sổ
+Comment[wa]=Li prémetowe bår di bouyes do manaedjmint d' purnea
+Comment[zh_CN]=窗口管理的默认任务栏
+Comment[zh_TW]=預設的視窗管理工作列
+Icon=taskbar
+X-KDE-Library=taskbar_panelapplet
diff --git a/kicker/applets/taskbar/taskbarapplet.h b/kicker/applets/taskbar/taskbarapplet.h
new file mode 100644
index 000000000..f0842baca
--- /dev/null
+++ b/kicker/applets/taskbar/taskbarapplet.h
@@ -0,0 +1,56 @@
+/*****************************************************************
+
+Copyright (c) 2001 Matthias Elter <elter@kde.org>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef __taskbarapplet_h__
+#define __taskbarapplet_h__
+
+#include <kpanelapplet.h>
+
+class TaskBarContainer;
+class QPalette;
+
+class TaskbarApplet : public KPanelApplet
+{
+ Q_OBJECT
+
+public:
+ TaskbarApplet( const QString& configFile, Type t = Normal, int actions = 0,
+ QWidget *parent = 0, const char *name = 0 );
+ ~TaskbarApplet();
+
+ int widthForHeight( int h ) const;
+ int heightForWidth( int w ) const;
+
+ void preferences();
+
+protected:
+ void moveEvent(QMoveEvent *);
+ void popupDirectionChange( Direction );
+ void orientationChange( Orientation );
+ void paletteChange(const QPalette &);
+
+private:
+ TaskBarContainer* container;
+};
+
+#endif