summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/charlatan
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
commit84da08d7b7fcda12c85caeb5a10b4903770a6f69 (patch)
tree2a6aea76f2dfffb4cc04bb907c4725af94f70e72 /noatun-plugins/charlatan
downloadtdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.tar.gz
tdeaddons-84da08d7b7fcda12c85caeb5a10b4903770a6f69.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/kdeaddons@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/charlatan')
-rw-r--r--noatun-plugins/charlatan/Makefile.am23
-rw-r--r--noatun-plugins/charlatan/charlatanui.cpp35
-rw-r--r--noatun-plugins/charlatan/charlatanui.plugin77
-rw-r--r--noatun-plugins/charlatan/configmodule.cpp71
-rw-r--r--noatun-plugins/charlatan/configmodule.h53
-rw-r--r--noatun-plugins/charlatan/pixmaps.h612
-rw-r--r--noatun-plugins/charlatan/seeker.cpp104
-rw-r--r--noatun-plugins/charlatan/seeker.h58
-rw-r--r--noatun-plugins/charlatan/userinterface.cpp408
-rw-r--r--noatun-plugins/charlatan/userinterface.h99
10 files changed, 1540 insertions, 0 deletions
diff --git a/noatun-plugins/charlatan/Makefile.am b/noatun-plugins/charlatan/Makefile.am
new file mode 100644
index 0000000..0603703
--- /dev/null
+++ b/noatun-plugins/charlatan/Makefile.am
@@ -0,0 +1,23 @@
+INCLUDES= $(all_includes)
+
+kde_module_LTLIBRARIES = noatuncharlatan.la
+
+noatuncharlatan_la_SOURCES = \
+ charlatanui.cpp \
+ seeker.cpp \
+ userinterface.cpp \
+ configmodule.cpp
+
+noatuncharlatan_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+
+noatuncharlatan_la_LIBADD = -lnoatuncontrols -lnoatun
+
+noatuncharlatan_la_METASOURCES = AUTO
+
+noinst_HEADERS = userinterface.h configmodule.h seeker.h
+
+noatun_DATA = charlatanui.plugin
+noatundir = $(kde_datadir)/noatun
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp *.h -o $(podir)/charlatanui.pot
diff --git a/noatun-plugins/charlatan/charlatanui.cpp b/noatun-plugins/charlatan/charlatanui.cpp
new file mode 100644
index 0000000..a2a9bec
--- /dev/null
+++ b/noatun-plugins/charlatan/charlatanui.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 "userinterface.h"
+#include <klocale.h>
+
+extern "C"
+{
+ Plugin * create_plugin()
+ {
+ KGlobal::locale()->insertCatalogue("charlatanui");
+ return new Charlatan;
+ }
+}
+
+// vim:ts=2:sw=2:tw=78:noet
diff --git a/noatun-plugins/charlatan/charlatanui.plugin b/noatun-plugins/charlatan/charlatanui.plugin
new file mode 100644
index 0000000..254074d
--- /dev/null
+++ b/noatun-plugins/charlatan/charlatanui.plugin
@@ -0,0 +1,77 @@
+Filename=noatuncharlatan.la
+Author=Rik Hemsley
+Site=http://noatun.kde.org/plugins/charlatan/
+Email=rik@kde.org
+Type=userinterface
+License=Artistic
+Name=Charlatan
+Name[af]=Voorgewer
+Name[az]=Şarlatan
+Name[cs]=Šarlatán
+Name[eo]=Ĉarlatano
+Name[hi]=चार्लटन
+Name[hr]=Šarlatan
+Name[ne]=नक्कली
+Name[nn]=Sjarlatan
+Name[pl]=Szarlatan
+Name[pt_BR]=Charlatão
+Name[ro]=Şarlatan
+Name[ru]=Обманщик
+Name[ta]=சர்லதான்
+Name[tg]=Шарлатан
+Name[tr]=Şarlatan
+Name[uk]=Шарлатан
+Comment=The dead man's interface
+Comment[az]=Ölü adamın ara üzü
+Comment[bg]=Интерфейс за плеъра Noatun
+Comment[bs]=Interfejs mrtvog čovjeka
+Comment[ca]=Interfície per al penjat
+Comment[cs]=Rozhraní "mrtvého muže"
+Comment[cy]=Rhyngwyneb y marw
+Comment[da]=Den døde mands grænseflade
+Comment[de]=Schnittstelle eines toten Mannes
+Comment[el]=Το γραφικό περιβάλλον dead man
+Comment[eo]=La interfaco de la mortinta homo
+Comment[es]=La interfaz del ahorcado
+Comment[et]=Surnud mehe pale
+Comment[eu]=Hilda dagoen gizonaren interfazea
+Comment[fi]=Kuolleen miehen liittymä
+Comment[fr]=L'interface de l'homme mort
+Comment[fy]=Interface fan in deade man
+Comment[ga]=Comhéadan na marbh
+Comment[gl]=A interface do home morto
+Comment[hi]=द डीड मैन्स इंटरफेस
+Comment[hr]=Sučelje mrtve straže
+Comment[hu]=Egy haláli vizualizációs modul
+Comment[is]=Viðmót dauða mannsins
+Comment[it]=L'interfaccia per l'uomo duro
+Comment[ja]=dead man のインターフェース
+Comment[ka]=მკვდრის ინტერფეისი
+Comment[kk]=Charlatan интерфейсі
+Comment[km]=ចំណុច​ប្រទាក់​របស់ man ស្លាប់
+Comment[lt]=Mirusio žmogaus sąsaja
+Comment[mk]=Интерфејсот на мртвиот човек
+Comment[ms]=Antaramuka lelaki mati
+Comment[nb]=Død manns grensesnitt
+Comment[nds]=Koppelsteed vun den doden Mann
+Comment[ne]=मृत मानिसको इन्टरफेस
+Comment[nl]=Interface van een dode man
+Comment[nn]=Daudmannsgrensesnitt
+Comment[pl]=Motyw ascetyczny
+Comment[pt]=A interface do homem morto
+Comment[pt_BR]=Uma interface para homens sem saída
+Comment[ro]=Interfaţa "dead man"
+Comment[ru]=Интерфейс Обманщик
+Comment[sk]=Rozhranie dead man
+Comment[sl]=Vmesnik mrtvega človeka
+Comment[sr]=Интерфејс мртвог човека
+Comment[sr@Latn]=Interfejs mrtvog čoveka
+Comment[sv]=Död mans gränssnitt
+Comment[ta]=இறந்த மனிதனின் இடைமுகம்
+Comment[tg]=Интерфейси шарлатан
+Comment[tr]=Ölü adamın arabirimi
+Comment[uk]=Інтерфейс обманка
+Comment[vi]=Giao diện của người chết
+Comment[xh]=Ubuso bendoda ubujongeneyo
+Comment[zh_CN]=死人界面
+Comment[zh_TW]=The dead man 介面
diff --git a/noatun-plugins/charlatan/configmodule.cpp b/noatun-plugins/charlatan/configmodule.cpp
new file mode 100644
index 0000000..0b2e178
--- /dev/null
+++ b/noatun-plugins/charlatan/configmodule.cpp
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 <klocale.h>
+#include <kglobal.h>
+#include <kconfig.h>
+
+#include <qcheckbox.h>
+#include <qlayout.h>
+
+#include "configmodule.h"
+#include "configmodule.moc"
+CharlatanConfigModule::CharlatanConfigModule(QObject * parent)
+ :
+ CModule
+ (
+ i18n("Charlatan"),
+ i18n("Charlatan Interface Settings"),
+ "appearance",
+ parent
+ )
+{
+ scroll_ = new QCheckBox(i18n("Scroll song title"), this);
+
+ QVBoxLayout * layout = new QVBoxLayout(this);
+
+ layout->addWidget(scroll_);
+
+ layout->addStretch(100);
+
+ reopen();
+}
+
+ void
+CharlatanConfigModule::save()
+{
+ KConfig * c(KGlobal::config());
+ c->setGroup("CharlatanInterface");
+ c->writeEntry("ScrollTitle", scroll_->isChecked());
+ c->sync();
+ emit(saved());
+}
+
+ void
+CharlatanConfigModule::reopen()
+{
+ KConfig * c(KGlobal::config());
+ c->setGroup("CharlatanInterface");
+ scroll_->setChecked(c->readBoolEntry("ScrollTitle", true));
+}
+
+// vim:ts=2:sw=2:tw=78:noet
diff --git a/noatun-plugins/charlatan/configmodule.h b/noatun-plugins/charlatan/configmodule.h
new file mode 100644
index 0000000..92b0bf7
--- /dev/null
+++ b/noatun-plugins/charlatan/configmodule.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 CHARLATAN_CONFIG_MODULE_H
+#define CHARLATAN_CONFIG_MODULE_H
+
+#include <noatun/pref.h>
+
+class QCheckBox;
+
+class CharlatanConfigModule : public CModule
+{
+ Q_OBJECT
+
+ public:
+
+ CharlatanConfigModule(QObject *);
+
+ signals:
+
+ void saved();
+
+ public slots:
+
+ virtual void save();
+ virtual void reopen();
+
+ private:
+
+ QCheckBox * scroll_;
+};
+
+#endif // CHARLATAN_CONFIG_MODULE_H
+// vim:ts=2:sw=2:tw=78:noet
diff --git a/noatun-plugins/charlatan/pixmaps.h b/noatun-plugins/charlatan/pixmaps.h
new file mode 100644
index 0000000..9235f9b
--- /dev/null
+++ b/noatun-plugins/charlatan/pixmaps.h
@@ -0,0 +1,612 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 __PIXMAP_H__
+#define __PIXMAP_H__
+
+static const char * const px_close[] = {
+"16 16 4 1",
+"o c black",
+"x c Gray50",
+". c white",
+" c None",
+" ",
+" oo oo ",
+" o.xo ox.o ",
+" ox.xo ox.xo ",
+" ox.xo ox.xo ",
+" ox.xoox.xo ",
+" ox.xx.xo ",
+" ox..xo ",
+" ox..xo ",
+" ox.xx.xo ",
+" ox.xoox.xo ",
+" ox.xo ox.xo ",
+" ox.xo ox.xo ",
+" o.xo ox.o ",
+" oo oo ",
+" "
+};
+
+static const char * const px_playlist[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" ooo ",
+" o . o ",
+" o . . o ",
+" o . . . o ",
+" o. . . .o ",
+" o . . . o ",
+" o . . o ",
+" o . ooo ",
+" ooo ooo ",
+" ooo ",
+" ooo ",
+" o ",
+" ",
+" "
+};
+
+static const char * const px_album[] = {
+"16 16 4 1",
+"o c black",
+"x c Gray50",
+". c White",
+" c None",
+" ",
+" ",
+" ",
+" oooooo ",
+" oo......oo ",
+" o..x....xxxo ",
+" o....xooxx...o ",
+"o.....o o.....o",
+"o.....o o.....o",
+" o...xxoox....o ",
+" oxxx....x..o ",
+" oo......oo ",
+" oooooo ",
+" ",
+" ",
+" "
+};
+
+static const char * const px_artist[] = {
+"16 16 4 1",
+"o c black",
+"x c Gray50",
+". c White",
+" c None",
+" oxxo ",
+" oxxo ",
+" oxxo ",
+" oxxo ",
+" oxxo ",
+" oxxo ",
+" oxxo ",
+" oxxo ",
+" oooo ",
+" oxxoo ",
+" o..xoo ",
+" o.xxoo ",
+" o.xxoo ",
+" oxxoo ",
+" o.xoo ",
+" oooo "
+};
+
+static const char * const px_track[] = {
+"16 16 4 1",
+"o c black",
+"x c Gray50",
+". c white",
+" c None",
+" ",
+" oo ",
+" ooxoo ",
+" oo..xoo ",
+" oox...xoo ",
+" oooox...oo ",
+" oo oox.oo ",
+" ooooo oooo ",
+" oo.xoo oo ",
+" oxoooo oo ",
+" ooooo ooooo ",
+" ooo oo.xoo ",
+" oxoooo ",
+" ooooo ",
+" ooo ",
+" "
+};
+
+static const char * const px_next[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" o o ",
+" o.o o o ",
+" o .o o.o ",
+" o. .o o o ",
+" o . .o o.o ",
+" o. . .o o o ",
+" o . . o o.o ",
+" o. . o o o ",
+" o . o o.o ",
+" o. o o o ",
+" o o o.o ",
+" o o ",
+" ",
+" "
+};
+
+static const char * const px_pause[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" oo oo ",
+" o. o o. o ",
+" o .o o .o ",
+" o. o o. o ",
+" o .o o .o ",
+" o. o o. o ",
+" o .o o .o ",
+" o. o o. o ",
+" o .o o .o ",
+" o. o o. o ",
+" o .o o .o ",
+" oo oo ",
+" ",
+" "
+};
+
+static const char * const px_play1[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" oo ",
+" o .oo ",
+" o. . oo ",
+" o . . .oo ",
+" o. . . . oo ",
+" o . . . . .o ",
+" o. . . . . o ",
+" o . . . .oo ",
+" o. . . oo ",
+" o . .oo ",
+" o. oo ",
+" oo ",
+" ",
+" "
+};
+
+static const char * const px_play2[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" ",
+" oo ",
+" o .oo ",
+" o. . oo ",
+" o . . .oo ",
+" o. . . . o ",
+" o . . . .o ",
+" o. . . oo ",
+" o . .oo ",
+" o. oo ",
+" oo ",
+" ",
+" ",
+" "
+};
+
+static const char * const px_play3[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" ",
+" ",
+" oo ",
+" o .oo ",
+" o. . oo ",
+" o . . .o ",
+" o. . . o ",
+" o . .oo ",
+" o. oo ",
+" oo ",
+" ",
+" ",
+" ",
+" "
+};
+
+static const char * const px_restart[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" o o ",
+" o.o o.o ",
+" o. o o. o ",
+" o. .oo. .o ",
+" o. . o. . o ",
+" o. . o. . .o ",
+" o . .o . . o ",
+" o . .o . .o ",
+" o . oo . o ",
+" o .o o .o ",
+" o o o o ",
+" o o ",
+" ",
+" "
+};
+
+static const char * const px_previous[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" o o ",
+" o o o.o ",
+" o.o o. o ",
+" o o o. .o ",
+" o.o o. . o ",
+" o o o. . .o ",
+" o.o o . . o ",
+" o o o . .o ",
+" o.o o . o ",
+" o o o .o ",
+" o.o o o ",
+" o o ",
+" ",
+" "
+};
+
+static const char * const px_stop[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ",
+" oooooooooo ",
+" o . . . . .o ",
+" o. . . . . o ",
+" o . . . . .o ",
+" o. . . . . o ",
+" o . . . . .o ",
+" o. . . . . o ",
+" o . . . . .o ",
+" o. . . . . o ",
+" o . . . . .o ",
+" o. . . . . o ",
+" oooooooooo ",
+" ",
+" "
+};
+
+static const char * const px_config[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" ",
+" ooo ",
+" o. o ",
+" o. o ",
+" oo o .o ",
+" o.oo . o ",
+" o . . . o ",
+" o . . . ooo ",
+" ooo . . . o ",
+" o . . . o ",
+" o . oo.o ",
+" o. o oo ",
+" o .o ",
+" o .o ",
+" ooo ",
+" "
+};
+
+static const char * const px_x[] = {
+"12 12 2 1",
+"o c black",
+" c None",
+" ",
+" o ",
+" ooo ",
+" ooooo ",
+" ooooo ",
+" ooooo ",
+" ooooo ",
+" ooooo ",
+" o oo ",
+" oo o ",
+" ooo ",
+" "
+};
+
+static const char * const px_plus[] = {
+"12 12 2 1",
+"o c black",
+" c None",
+" ",
+" oo ",
+" oo ",
+" oo ",
+" oo ",
+" oooooooooo ",
+" oooooooooo ",
+" oo ",
+" oo ",
+" oo ",
+" oo ",
+" "
+};
+
+static const char * const px_minus[] = {
+"12 12 2 1",
+"o c black",
+" c None",
+" ",
+" ",
+" ",
+" ",
+" ",
+" oooooooooo ",
+" oooooooooo ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
+
+static const char * const px_none[] = {
+"16 16 1 1",
+" c None",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "
+};
+
+static const char * const px_squelch[] = {
+"16 16 3 1",
+"o c black",
+". c white",
+" c None",
+" oo ",
+" o. o ",
+" o. .o ",
+" o. .o ",
+" o. .o o ",
+" o. .o o.o ",
+"o. .o o. .o ",
+" o. .o o. .o ",
+" o. .o o. .o ",
+" o. .o o. .o",
+" o .o o. .o ",
+" oo o. .o ",
+" o. .o ",
+" o. .o ",
+" o .o ",
+" oo "
+};
+
+
+static const char * const px_squelch_large[] = {
+"32 32 124 2",
+" c None",
+". c #090D11",
+"+ c #000000",
+"@ c #151B21",
+"# c #9AB9DD",
+"$ c #688BB5",
+"% c #0D1319",
+"& c #9DBCDE",
+"* c #CDE4FF",
+"= c #739CCA",
+"- c #06080B",
+"; c #20262B",
+"> c #A5C1E1",
+", c #AED3FF",
+"' c #789FCC",
+") c #181E23",
+"! c #C8D9EC",
+"~ c #C7E0FF",
+"{ c #6D98C8",
+"] c #10161C",
+"^ c #A3C0E0",
+"/ c #C7E1FF",
+"( c #6F99C8",
+"_ c #171D22",
+": c #95B6DB",
+"< c #A1CDFF",
+"[ c #6A96C7",
+"} c #191F24",
+"| c #B4CBE6",
+"1 c #BBDAFF",
+"2 c #B3CBE5",
+"3 c #719AC9",
+"4 c #C4DFFF",
+"5 c #79A0CC",
+"6 c #0F151B",
+"7 c #98B8DC",
+"8 c #759DCB",
+"9 c #111821",
+"0 c #05080A",
+"a c #0E1216",
+"b c #A6C2E1",
+"c c #D7E9FF",
+"d c #9AB9DC",
+"e c #131A23",
+"f c #BBD3EF",
+"g c #9AB6D5",
+"h c #06090C",
+"i c #111315",
+"j c #ACC3DD",
+"k c #C2DEFF",
+"l c #82ABDA",
+"m c #10171E",
+"n c #0E141A",
+"o c #B9CFE9",
+"p c #B5D7FF",
+"q c #6B94C2",
+"r c #0D1013",
+"s c #7DA1CA",
+"t c #9DCAFF",
+"u c #75A1D4",
+"v c #192026",
+"w c #92B5DD",
+"x c #81A4CB",
+"y c #9AC9FF",
+"z c #7BA5D5",
+"A c #8FB3DC",
+"B c #A5CEFF",
+"C c #6690C0",
+"D c #111417",
+"E c #80A4CB",
+"F c #77A2D4",
+"G c #7FA8D7",
+"H c #92C4FF",
+"I c #6590C0",
+"J c #101316",
+"K c #7EA2CA",
+"L c #9FCBFF",
+"M c #6F9DD2",
+"N c #161D24",
+"O c #A3C0E2",
+"P c #070A0D",
+"Q c #7299C5",
+"R c #86BEFF",
+"S c #040608",
+"T c #5F6469",
+"U c #A5CAF3",
+"V c #5E85B2",
+"W c #010202",
+"X c #27384B",
+"Y c #171717",
+"Z c #90A8C4",
+"` c #90C3FF",
+" . c #7DB1ED",
+".. c #1E2A39",
+"+. c #020203",
+"@. c #101010",
+"#. c #9EB3CC",
+"$. c #C0DDFF",
+"%. c #7FB2ED",
+"&. c #111111",
+"*. c #9FB3CC",
+"=. c #C3DFFF",
+"-. c #8DBAEF",
+";. c #262626",
+">. c #A3B7CE",
+",. c #A8D0FF",
+"'. c #81B3ED",
+"). c #1E1E1E",
+"!. c #A6B9D0",
+"~. c #A7D0FF",
+"{. c #010101",
+"]. c #96ACC7",
+"^. c #8BA4C1",
+"/. c #ABD1FF",
+"(. c #80B3ED",
+"_. c #070707",
+":. c #829DBD",
+"<. c #ADD3FF",
+"[. c #141414",
+"}. c #A5B9D0",
+"|. c #ABD2FF",
+"1. c #7EB1ED",
+"2. c #63788F",
+"3. c #5679A2",
+" . + ",
+" @ # $ + ",
+" % & * = - ",
+" ; > , ' . ",
+" ) ! ~ { . ",
+" ] ^ / ( . ",
+" _ : < [ . ",
+" } | 1 ( . ",
+" ] 2 * 3 . ",
+" ] > 4 5 . ",
+" 6 7 1 8 . 9 0 ",
+" a b c d . e f g h ",
+" i j k l m n o p q h ",
+" r s t u m v w , q h ",
+" r x y z m m A B C h ",
+" D E t F m m G H I h ",
+" J K L M m N O H I h ",
+" P Q R M S + T U R V W ",
+" h I X + Y Z ` ...+ ",
+" +.+ @.#.$.%...+ ",
+" &.*.=.-...+ ",
+" ;.>.,.'...+ ",
+" ).!.~. ...+ ",
+" {.].p ...+ ",
+" + ^./.(...+ ",
+" _.:.<.'...+ ",
+" [.}.|.1...+ ",
+" + 2.|. ...+ ",
+" + 3...+ ",
+" + + ",
+" ",
+" "
+};
+
+#endif
+
diff --git a/noatun-plugins/charlatan/seeker.cpp b/noatun-plugins/charlatan/seeker.cpp
new file mode 100644
index 0000000..4c07411
--- /dev/null
+++ b/noatun-plugins/charlatan/seeker.cpp
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 <qtimer.h>
+
+#include <noatun/app.h>
+#include <noatun/player.h>
+#include "seeker.h"
+#include "seeker.moc"
+
+Seeker::Seeker(QWidget * parent)
+ : QSlider(0, 60, 10, 0, Horizontal, parent),
+ adjusting_(false)
+{
+ delayedUpdateTimer_ = new QTimer(this);
+
+ connect(this, SIGNAL(sliderPressed()), SLOT(slotSliderPressed()));
+ connect(this, SIGNAL(sliderReleased()), SLOT(slotSliderReleased()));
+ connect(this, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+
+ connect(napp->player(), SIGNAL(timeout()), SLOT(slotTimeout()));
+ connect(delayedUpdateTimer_, SIGNAL(timeout()), SLOT(slotDelayedUpdate()));
+}
+
+Seeker::~Seeker()
+{
+}
+
+ void
+Seeker::slotSliderPressed()
+{
+ adjusting_ = true;
+}
+
+ void
+Seeker::slotValueChanged(int)
+{
+ if (adjusting_)
+ delayedUpdateTimer_->start(100, true);
+}
+
+ void
+Seeker::slotDelayedUpdate()
+{
+ napp->player()->skipTo(value());
+}
+
+ void
+Seeker::slotSliderReleased()
+{
+ delayedUpdateTimer_->stop();
+ adjusting_ = false;
+ napp->player()->skipTo(value());
+}
+
+ void
+Seeker::wheelEvent(QWheelEvent *)
+{
+ // Ignore.
+}
+
+ void
+Seeker::slotTimeout()
+{
+ blockSignals(true);
+ {
+ delayedUpdateTimer_->stop();
+
+ int currentLength = int(napp->player()->getLength());
+ int currentTime = int(napp->player()->getTime());
+
+ if (currentLength != maxValue())
+ setMaxValue(currentLength);
+
+ if (!adjusting_)
+ {
+ if (currentTime != value())
+ setValue(currentTime);
+ }
+ }
+ blockSignals(false);
+ update();
+}
+
+// vim:ts=2:sw=2:tw=78:noet
diff --git a/noatun-plugins/charlatan/seeker.h b/noatun-plugins/charlatan/seeker.h
new file mode 100644
index 0000000..ff7af93
--- /dev/null
+++ b/noatun-plugins/charlatan/seeker.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 SEEKER_H
+#define SEEKER_H
+
+#include <qslider.h>
+
+class QTimer;
+
+class Seeker : public QSlider
+{
+ Q_OBJECT
+
+ public:
+
+ Seeker(QWidget * parent);
+ virtual ~Seeker();
+
+ protected slots:
+
+ void slotValueChanged(int i);
+ void slotSliderPressed();
+ void slotSliderReleased();
+ void slotDelayedUpdate();
+ void slotTimeout();
+
+ protected:
+
+ void wheelEvent(QWheelEvent *);
+
+ private:
+
+ bool adjusting_;
+ QTimer * delayedUpdateTimer_;
+};
+
+#endif
+// vim:ts=2:sw=2:tw=78:noet
diff --git a/noatun-plugins/charlatan/userinterface.cpp b/noatun-plugins/charlatan/userinterface.cpp
new file mode 100644
index 0000000..e15a686
--- /dev/null
+++ b/noatun-plugins/charlatan/userinterface.cpp
@@ -0,0 +1,408 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 <noatun/scrollinglabel.h>
+#include "userinterface.h"
+#include <noatun/app.h>
+#include <noatun/player.h>
+#include <noatun/controls.h>
+#include <noatun/effects.h>
+
+#include <qaccel.h>
+#include <qtoolbutton.h>
+#include <qdragobject.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qframe.h>
+#include <kurldrag.h>
+#include <kstatusbar.h>
+#include <kglobal.h>
+#include <kconfig.h>
+#include <klocale.h>
+#include <kurldrag.h>
+#include <kiconloader.h>
+#include <noatun/playlist.h>
+#include <noatun/stdaction.h>
+
+#include "configmodule.h"
+#include "pixmaps.h"
+#include "seeker.h"
+
+Charlatan::Charlatan()
+ : QWidget (0, "Charlatan"),
+ UserInterface (),
+ previousButton_ (0L),
+ stopButton_ (0L),
+ playButton_ (0L),
+ nextButton_ (0L),
+ playListToggleButton_ (0L),
+ restartButton_ (0L),
+ seekSlider_ (0L),
+ titleLabel_ (0L),
+ positionLabel_ (0L),
+ showingVolumeTimer_ (0L),
+ title_ ("c.h.a.r.l.a.t.a.n")
+{
+ setAcceptDrops(true);
+
+ showingVolumeTimer_ = new QTimer(this);
+
+ connect
+ (
+ showingVolumeTimer_,
+ SIGNAL(timeout()),
+ SLOT(slotStopShowingVolume())
+ );
+
+ playListToggleButton_ = new QToolButton(this);
+ previousButton_ = new QToolButton(this);
+ nextButton_ = new QToolButton(this);
+ stopButton_ = new QToolButton(this);
+ restartButton_ = new QToolButton(this);
+ playButton_ = new QToolButton(this);
+
+ seekSlider_ = new Seeker(this);
+ positionLabel_ = new QLabel(this);
+
+ titleLabel_ = new ScrollingLabel(i18n("No File Loaded"), this);
+
+ playListToggleButton_ ->setPixmap(QPixmap((const char **)px_playlist));
+ previousButton_ ->setPixmap(QPixmap((const char **)px_previous));
+ nextButton_ ->setPixmap(QPixmap((const char **)px_next));
+ stopButton_ ->setPixmap(QPixmap((const char **)px_stop));
+ restartButton_ ->setPixmap(QPixmap((const char **)px_restart));
+ playButton_ ->setPixmap(QPixmap((const char **)px_play1));
+
+ playListToggleButton_ ->setToggleButton(true);
+
+ QVBoxLayout * mainLayout = new QVBoxLayout(this);
+
+ mainLayout->addWidget(titleLabel_);
+
+ mainLayout->addSpacing(2);
+
+ QHBoxLayout * positionLayout = new QHBoxLayout(mainLayout);
+
+ positionLayout->addWidget(seekSlider_);
+ positionLayout->addSpacing(2);
+ positionLayout->addWidget(positionLabel_);
+
+ mainLayout->addSpacing(2);
+
+ QHBoxLayout * buttonLayout = new QHBoxLayout(mainLayout);
+
+ buttonLayout->addWidget(playListToggleButton_);
+ buttonLayout->addWidget(previousButton_);
+ buttonLayout->addWidget(nextButton_);
+ buttonLayout->addWidget(stopButton_);
+ buttonLayout->addWidget(restartButton_);
+ buttonLayout->addWidget(playButton_);
+
+ playListToggleButton_ ->installEventFilter(this);
+ previousButton_ ->installEventFilter(this);
+ nextButton_ ->installEventFilter(this);
+ stopButton_ ->installEventFilter(this);
+ restartButton_ ->installEventFilter(this);
+ playButton_ ->installEventFilter(this);
+ seekSlider_ ->installEventFilter(this);
+ positionLabel_ ->installEventFilter(this);
+ titleLabel_ ->installEventFilter(this);
+
+ connect
+ (
+ playListToggleButton_,
+ SIGNAL(clicked()),
+ napp->player(),
+ SLOT(toggleListView())
+ );
+
+ connect
+ (
+ previousButton_,
+ SIGNAL(clicked()),
+ napp->player(),
+ SLOT(back())
+ );
+
+ connect
+ (
+ nextButton_,
+ SIGNAL(clicked()),
+ napp->player(),
+ SLOT(forward())
+ );
+
+ connect
+ (
+ stopButton_,
+ SIGNAL(clicked()),
+ napp->player(),
+ SLOT(stop())
+ );
+
+ connect(restartButton_, SIGNAL(clicked()), SLOT(slotRestart()));
+
+ connect
+ (
+ playButton_,
+ SIGNAL(clicked()),
+ napp->player(),
+ SLOT(playpause())
+ );
+
+ connect(napp, SIGNAL(hideYourself()), SLOT(hide()));
+ connect(napp, SIGNAL(showYourself()), SLOT(show()));
+
+ connect(napp->player(), SIGNAL(playlistShown()), SLOT(slotPlayListShown()));
+ connect(napp->player(), SIGNAL(playlistHidden()), SLOT(slotPlayListHidden()));
+ connect(napp->player(), SIGNAL(playing()), SLOT(slotPlaying()));
+ connect(napp->player(), SIGNAL(stopped()), SLOT(slotStopped()));
+ connect(napp->player(), SIGNAL(paused()), SLOT(slotPaused()));
+
+ connect(napp->player(), SIGNAL(timeout()), SLOT(slotTimeout()));
+
+ connect
+ (
+ napp->player(),
+ SIGNAL(volumeChanged(int)),
+ SLOT(slotVolumeChanged(int))
+ );
+
+ connect
+ (
+ new CharlatanConfigModule(this),
+ SIGNAL(saved()),
+ SLOT(slotConfigChanged())
+ );
+
+ setCaption(i18n("Noatun"));
+ setIcon(BarIcon("noatun"));
+
+ napp->player()->handleButtons();
+
+ loadConfig();
+
+ // Using QAccel, because I don't want any strings associated or
+ // configurability.
+
+ QAccel * a = new QAccel(this, "Accelerators");
+
+ int accelPlay = a->insertItem(Key_Space);
+ int accelNext = a->insertItem(Key_H);
+ int accelPrev = a->insertItem(Key_L);
+ int accelStop = a->insertItem(Key_Escape);
+ int accelRstt = a->insertItem(Key_Return);
+ int accelQuit = a->insertItem(Key_Q);
+
+ a->connectItem(accelPlay, napp->player(), SLOT(playpause()));
+ a->connectItem(accelNext, napp->player(), SLOT(forward()));
+ a->connectItem(accelPrev, napp->player(), SLOT(back()));
+ a->connectItem(accelStop, napp->player(), SLOT(stop()));
+ a->connectItem(accelRstt, this, SLOT(slotRestart()));
+ a->connectItem(accelQuit, napp, SLOT(quit()));
+
+ show();
+
+ setTitleText();
+}
+
+Charlatan::~Charlatan()
+{
+ // Empty.
+}
+
+void Charlatan::closeEvent(QCloseEvent *)
+{
+ unload();
+}
+
+void Charlatan::dragEnterEvent(QDragEnterEvent *event)
+{
+ event->accept(KURLDrag::canDecode(event));
+}
+
+void Charlatan::dropEvent(QDropEvent *event)
+{
+ KURL::List uri;
+ if (KURLDrag::decode(event, uri))
+ {
+ for (KURL::List::Iterator i = uri.begin(); i != uri.end(); ++i)
+ napp->player()->openFile(*i, false);
+ }
+
+}
+
+void Charlatan::setTitleText(const QString & s)
+{
+ QString titleText;
+
+ if (!s.isNull())
+ {
+ titleText = s;
+ }
+ else
+ {
+ Player * player = napp->player();
+
+ if (0 == player)
+ {
+ qWarning("Noatun's player is null. WTF ?");
+ return;
+ }
+ else
+ {
+ PlaylistItem currentItem = player->current();
+
+ if (!!currentItem)
+ {
+ titleText = currentItem.title();
+ }
+ }
+ }
+
+ if (title_ != titleText)
+ {
+ showingVolumeTimer_->stop();
+ title_ = titleText;
+
+ if (!showingVolumeTimer_->isActive())
+ titleLabel_->setText(title_);
+ }
+}
+
+void Charlatan::slotPlaying()
+{
+ setTitleText();
+
+ playButton_->setOn(true);
+ stopButton_->setEnabled(true);
+ playButton_->setPixmap(QPixmap((const char **)px_pause));
+}
+
+void Charlatan::slotStopped()
+{
+ setTitleText(i18n("No File Loaded"));
+
+ stopButton_->setEnabled(false);
+ playButton_->setOn(false);
+ playButton_->setPixmap(QPixmap((const char **)px_play1));
+}
+
+void Charlatan::slotPaused()
+{
+ setTitleText();
+
+ stopButton_->setEnabled(true);
+ playButton_->setOn(false);
+ playButton_->setPixmap(QPixmap((const char **)px_play1));
+}
+
+bool Charlatan::eventFilter(QObject *o, QEvent *e)
+{
+ switch (e->type())
+ {
+ case QEvent::Wheel:
+ wheelEvent(static_cast<QWheelEvent*>(e));
+ return true;
+ break;
+
+ default:
+ break;
+ }
+
+ return QWidget::eventFilter(o, e);
+}
+
+void Charlatan::slotPlayListShown()
+{
+ playListToggleButton_->setOn(true);
+}
+
+void Charlatan::slotPlayListHidden()
+{
+ playListToggleButton_->setOn(false);
+}
+
+void Charlatan::mousePressEvent(QMouseEvent * e)
+{
+ if (e->button() == RightButton)
+ {
+ NoatunStdAction::ContextMenu::showContextMenu();
+ return;
+ }
+
+ return QWidget::mousePressEvent(e);
+}
+
+void Charlatan::wheelEvent(QWheelEvent * e)
+{
+ int newVolume = napp->player()->volume() + (e->delta() / 120) * 4;
+ napp->player()->setVolume(newVolume);
+}
+
+void Charlatan::slotConfigChanged()
+{
+ loadConfig();
+}
+
+void Charlatan::slotVolumeChanged(int i)
+{
+ QString message(i18n("Volume: %1").arg(i));
+
+ showingVolumeTimer_->start(2000, true);
+ titleLabel_->setText(message);
+}
+
+void Charlatan::slotStopShowingVolume()
+{
+ titleLabel_->setText(title_);
+}
+
+void Charlatan::slotTimeout()
+{
+ // noatun bug: napp->player()->lengthString() will crash if there's
+ // no 'current track'.
+ if (!napp->player()->current())
+ return;
+
+ setTitleText();
+
+ QString lengthText(napp->player()->lengthString());
+
+ if (positionLabel_->text() != lengthText)
+ positionLabel_->setText(lengthText);
+}
+
+void Charlatan::loadConfig()
+{
+ KConfig * c(KGlobal::config());
+ c->setGroup("CharlatanInterface");
+ titleLabel_->setScroll(c->readBoolEntry("ScrollTitle", true));
+}
+
+void Charlatan::slotRestart()
+{
+ napp->player()->skipTo(0);
+}
+
+#include "userinterface.moc"
+// vim:ts=2:sw=2:tw=78:noet
diff --git a/noatun-plugins/charlatan/userinterface.h b/noatun-plugins/charlatan/userinterface.h
new file mode 100644
index 0000000..c6a4e06
--- /dev/null
+++ b/noatun-plugins/charlatan/userinterface.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@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 USERINTERFACE_H
+#define USERINTERFACE_H
+
+#include <noatun/plugin.h>
+
+class QToolButton;
+class ScrollingLabel;
+class Seeker;
+class QLabel;
+
+/**
+ * @short Main window class
+ * @author Rik Hemsley <rik@kde.org>
+ * @version 1.0
+ */
+class Charlatan : public QWidget, public UserInterface
+{
+ Q_OBJECT
+
+ public:
+
+ Charlatan();
+ virtual ~Charlatan();
+
+ void load(const QString & url);
+
+ protected slots:
+
+ virtual void slotConfigChanged();
+
+ virtual void slotVolumeChanged(int);
+
+ virtual void slotPlaying();
+ virtual void slotStopped();
+ virtual void slotPaused();
+
+ virtual void slotPlayListShown();
+ virtual void slotPlayListHidden();
+
+ virtual void slotTimeout();
+
+ virtual void slotRestart();
+
+ virtual void slotStopShowingVolume();
+
+ protected:
+
+ virtual void mousePressEvent (QMouseEvent *);
+ virtual void dragEnterEvent (QDragEnterEvent *);
+ virtual void dropEvent (QDropEvent *);
+ virtual void closeEvent (QCloseEvent *);
+ virtual bool eventFilter (QObject *, QEvent *);
+ virtual void wheelEvent (QWheelEvent *);
+ virtual void setTitleText (const QString & = QString::null);
+
+ void loadConfig();
+
+ private:
+
+ QToolButton * previousButton_;
+ QToolButton * stopButton_;
+ QToolButton * playButton_;
+ QToolButton * nextButton_;
+ QToolButton * playListToggleButton_;
+ QToolButton * restartButton_;
+
+ Seeker * seekSlider_;
+ ScrollingLabel * titleLabel_;
+
+ QLabel * positionLabel_;
+
+ QTimer * showingVolumeTimer_;
+ QString title_;
+};
+
+#endif
+// vim:ts=2:sw=2:tw=78:noet