http://code.google.com/p/quarkplayer/source/detail?r=1434
Added:
/trunk/libs/TkUtil/ActionCollection.cpp
/trunk/libs/TkUtil/ActionCollection.h
Deleted:
/trunk/libs/TkUtil/Actions.cpp
/trunk/libs/TkUtil/Actions.h
Modified:
/trunk/libs/Logger/LogWindow.h
/trunk/libs/TkUtil/CMakeLists.txt
/trunk/libs/WebBrowser/WebBrowser.h
/trunk/quarkplayer/PluginInterface.cpp
/trunk/quarkplayer-plugins/ConfigWindow/ConfigWindowPlugin.cpp
/trunk/quarkplayer-plugins/ConfigWindow/ShortcutsConfig.cpp
/trunk/quarkplayer-plugins/ConfigWindow/ShortcutsConfigWidget.cpp
/trunk/quarkplayer-plugins/FileBrowser/FileBrowserTreeView.h
/trunk/quarkplayer-plugins/FileBrowser/FileBrowserWidget.h
/trunk/quarkplayer-plugins/FindSubtitles/FindSubtitles.cpp
/trunk/quarkplayer-plugins/FindSubtitles/FindSubtitlesWindow.cpp
/trunk/quarkplayer-plugins/MainWindow/CommonActions.cpp
/trunk/quarkplayer-plugins/MainWindow/MainWindow.cpp
/trunk/quarkplayer-plugins/MainWindow/MockMainWindow.cpp
/trunk/quarkplayer-plugins/MediaController/MediaController.cpp
/trunk/quarkplayer-plugins/MediaController/MediaControllerToolBar.cpp
/trunk/quarkplayer-plugins/PlayToolBar/PlayToolBar.cpp
/trunk/quarkplayer-plugins/Playlist/DragAndDropTreeView.h
/trunk/quarkplayer-plugins/Playlist/PlaylistWidget.cpp
/trunk/quarkplayer-plugins/Playlist/PlaylistWidget.h
/trunk/quarkplayer-plugins/QuickSettings/QuickSettingsWindow.cpp
/trunk/quarkplayer-plugins/VideoWidget/MyVideoWidget.cpp
/trunk/quarkplayer-plugins/VideoWidget/MyVideoWidget.h
=======================================
--- /dev/null
+++ /trunk/libs/TkUtil/ActionCollection.cpp Wed Feb 23 18:38:25 2011
@@ -0,0 +1,107 @@
+/*
+ * QuarkPlayer, a Phonon media player
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
published by
+ * the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ActionCollection.h"
+
+#include "TkUtilLogger.h"
+
+#include <QtGui/QtGui>
+
+ActionCollection::ActionCollection() {
+ GlobalActionCollection::instance().registerCollection(this);
+}
+
+ActionCollection::~ActionCollection() {
+ GlobalActionCollection::instance().unregisterCollection(this);
+ _actionHash.clear();
+}
+
+void ActionCollection::add(const QString & name, QAction * action) {
+ Q_ASSERT(action);
+ Q_ASSERT(!name.isEmpty());
+
+ if (_actionHash.contains(name)) {
+ TkUtilCritical() << "QAction:" << name << "already exist";
+ }
+
+ action->setObjectName(name);
+ _actionHash[name] = action;
+}
+
+QAction * ActionCollection::operator[](const QString & name) const {
+ QAction * action = _actionHash.value(name);
+ Q_ASSERT(action);
+
+ return action;
+}
+
+QList<QAction *> ActionCollection::actions() const {
+ QList<QAction *> actionList;
+
+ QHashIterator<QString, QAction *> it(_actionHash);
+ while (it.hasNext()) {
+ it.next();
+
+ QAction * action = it.value();
+ actionList += action;
+ }
+
+ return actionList;
+}
+
+
+GlobalActionCollection & GlobalActionCollection::instance() {
+ static GlobalActionCollection instance;
+ return instance;
+}
+
+ActionCollection & GlobalActionCollection::collection() {
+ static ActionCollection collection;
+ return collection;
+}
+
+QList<QAction *> GlobalActionCollection::allActions() const {
+ QList<QAction *> actionList;
+ foreach (ActionCollection * collection, _collections) {
+ QList<QAction *> actions = collection->actions();
+ foreach (QAction * action, actions) {
+
+ //Remove all duplicated QAction (QAction with the same names)
+ QString name = action->objectName();
+ bool already = false;
+ /*foreach (QAction * tmp, actionList) {
+ if (tmp->objectName() == name) {
+ already = true;
+ break;
+ }
+ }*/
+ if (!already) {
+ actionList += action;
+ }
+ }
+ }
+ return actionList;
+}
+
+void GlobalActionCollection::registerCollection(ActionCollection *
collection) {
+ _collections += collection;
+}
+
+void GlobalActionCollection::unregisterCollection(ActionCollection *
collection) {
+ _collections.removeAll(collection);
+}
=======================================
--- /dev/null
+++ /trunk/libs/TkUtil/ActionCollection.h Wed Feb 23 18:38:25 2011
@@ -0,0 +1,103 @@
+/*
+ * QuarkPlayer, a Phonon media player
+ * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
published by
+ * the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ACTIONCOLLECTION_H
+#define ACTIONCOLLECTION_H
+
+#include <TkUtil/TkUtilExport.h>
+#include <TkUtil/Singleton.h>
+
+#include <QtCore/QString>
+#include <QtCore/QHash>
+
+class QAction;
+struct QUuid;
+
+/**
+ * Contains all QuarkPlayer' QActions.
+ *
+ * This is code factorization, idea is to not duplicate QAction.
+ * QAction are defined once (with translation, icon...) and used
+ * everywhere via this class.
+ *
+ * Checks are done at runtime.
+ *
+ * @author Tanguy Krotoff
+ */
+class TKUTIL_API ActionCollection {
+public:
+
+ ActionCollection();
+
+ ~ActionCollection();
+
+ /**
+ * Retrieves an action given its name.
+ */
+ QAction * operator[](const QString & name) const;
+
+ /**
+ * Adds an action with a name.
+ */
+ void add(const QString & name, QAction * action);
+
+ /**
+ * Retrieves all the actions registered.
+ */
+ QList<QAction *> actions() const;
+
+private:
+
+ /** Associates a name to a QAction. */
+ QHash<QString, QAction *> _actionHash;
+};
+
+
+/**
+ * Global variable ActionCollection.
+ *
+ * Singleton Pattern.
+ */
+class TKUTIL_API GlobalActionCollection : public Singleton {
+ friend class ActionCollection;
+public:
+
+ static GlobalActionCollection & instance();
+
+ static ActionCollection & collection();
+
+ /**
+ * Gets all the QAction from all ActionCollection.
+ *
+ * Implementation removes all duplicated QAction (QAction with the same
names).
+ */
+ QList<QAction *> allActions() const;
+
+private:
+
+ void registerCollection(ActionCollection * collection);
+
+ void unregisterCollection(ActionCollection * collection);
+
+ QList<ActionCollection *> _collections;
+};
+
+/** Simplify the syntax. */
+#define Actions GlobalActionCollection::collection()
+
+#endif //ACTIONCOLLECTION_H
=======================================
--- /trunk/libs/TkUtil/Actions.cpp Wed Feb 23 17:15:29 2011
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
published by
- * the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "Actions.h"
-
-#include "TkUtilLogger.h"
-
-#include <QtGui/QtGui>
-
-ActionCollection::ActionCollection() {
- GlobalActionCollection::instance().registerCollection(this);
-}
-
-ActionCollection::~ActionCollection() {
- GlobalActionCollection::instance().unregisterCollection(this);
- _actionHash.clear();
-}
-
-void ActionCollection::add(const QString & name, QAction * action) {
- Q_ASSERT(action);
- Q_ASSERT(!name.isEmpty());
-
- if (_actionHash.contains(name)) {
- TkUtilCritical() << "QAction:" << name << "already exist";
- }
-
- action->setObjectName(name);
- _actionHash[name] = action;
-}
-
-QAction * ActionCollection::operator[](const QString & name) const {
- QAction * action = _actionHash.value(name);
- Q_ASSERT(action);
-
- return action;
-}
-
-QList<QAction *> ActionCollection::actions() const {
- QList<QAction *> actionList;
-
- QHashIterator<QString, QAction *> it(_actionHash);
- while (it.hasNext()) {
- it.next();
-
- QAction * action = it.value();
- actionList += action;
- }
-
- return actionList;
-}
-
-
-GlobalActionCollection & GlobalActionCollection::instance() {
- static GlobalActionCollection instance;
- return instance;
-}
-
-ActionCollection & GlobalActionCollection::collection() {
- static ActionCollection collection;
- return collection;
-}
-
-QList<QAction *> GlobalActionCollection::allActions() const {
- QList<QAction *> actionList;
- foreach (ActionCollection * collection, _collections) {
- QList<QAction *> actions = collection->actions();
- foreach (QAction * action, actions) {
-
- //Remove all duplicated QAction (QAction with the same names)
- QString name = action->objectName();
- bool already = false;
- /*foreach (QAction * tmp, actionList) {
- if (tmp->objectName() == name) {
- already = true;
- break;
- }
- }*/
- if (!already) {
- actionList += action;
- }
- }
- }
- return actionList;
-}
-
-void GlobalActionCollection::registerCollection(ActionCollection *
collection) {
- _collections += collection;
-}
-
-void GlobalActionCollection::unregisterCollection(ActionCollection *
collection) {
- _collections.removeAll(collection);
-}
=======================================
--- /trunk/libs/TkUtil/Actions.h Wed Feb 23 17:15:29 2011
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
published by
- * the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef ACTIONCOLLECTION_H
-#define ACTIONCOLLECTION_H
-
-#include <TkUtil/TkUtilExport.h>
-#include <TkUtil/Singleton.h>
-
-#include <QtCore/QString>
-#include <QtCore/QHash>
-
-class QAction;
-struct QUuid;
-
-/**
- * Contains all QuarkPlayer' QActions.
- *
- * This is code factorization, idea is to not duplicate QAction.
- * QAction are defined once (with translation, icon...) and used
- * everywhere via this class.
- *
- * Checks are done at runtime.
- *
- * @author Tanguy Krotoff
- */
-class TKUTIL_API ActionCollection {
-public:
-
- ActionCollection();
-
- ~ActionCollection();
-
- /**
- * Retrieves an action given its name.
- */
- QAction * operator[](const QString & name) const;
-
- /**
- * Adds an action with a name.
- */
- void add(const QString & name, QAction * action);
-
- /**
- * Retrieves all the actions registered.
- */
- QList<QAction *> actions() const;
-
-private:
-
- /** Associates a name to a QAction. */
- QHash<QString, QAction *> _actionHash;
-};
-
-
-/**
- * Global variable ActionCollection.
- *
- * Singleton Pattern.
- */
-class TKUTIL_API GlobalActionCollection : public Singleton {
- friend class ActionCollection;
-public:
-
- static GlobalActionCollection & instance();
-
- static ActionCollection & collection();
-
- /**
- * Gets all the QAction from all ActionCollection.
- *
- * Implementation removes all duplicated QAction (QAction with the same
names).
- */
- QList<QAction *> allActions() const;
-
-private:
-
- void registerCollection(ActionCollection * collection);
-
- void unregisterCollection(ActionCollection * collection);
-
- QList<ActionCollection *> _collections;
-};
-
-/** Simplify the syntax. */
-#define Actions GlobalActionCollection::collection()
-
-#endif //ACTIONCOLLECTION_H
=======================================
--- /trunk/libs/Logger/LogWindow.h Wed Feb 23 10:23:21 2011
+++ /trunk/libs/Logger/LogWindow.h Wed Feb 23 18:38:25 2011
@@ -29,7 +29,7 @@
#include <Logger/LoggerExport.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <QtGui/QMainWindow>
=======================================
--- /trunk/libs/TkUtil/CMakeLists.txt Tue Feb 22 18:44:12 2011
+++ /trunk/libs/TkUtil/CMakeLists.txt Wed Feb 23 18:38:25 2011
@@ -13,7 +13,7 @@
CloseEventFilter.cpp
KeyEventFilter.cpp
DropEventFilter.cpp
- Actions.cpp
+ ActionCollection.cpp
TkConfig.cpp
Translator.cpp
TkStackedWidget.cpp
=======================================
--- /trunk/libs/WebBrowser/WebBrowser.h Wed Feb 23 10:23:21 2011
+++ /trunk/libs/WebBrowser/WebBrowser.h Wed Feb 23 18:38:25 2011
@@ -21,7 +21,7 @@
#include <WebBrowser/WebBrowserExport.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <QtGui/QWidget>
=======================================
--- /trunk/quarkplayer/PluginInterface.cpp Tue Feb 22 18:44:12 2011
+++ /trunk/quarkplayer/PluginInterface.cpp Wed Feb 23 18:38:25 2011
@@ -21,7 +21,7 @@
#include "QuarkPlayer.h"
#include "QuarkPlayerCoreLogger.h"
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
PluginInterface::PluginInterface(QuarkPlayer & quarkPlayer, const QUuid &
uuid)
: _quarkPlayer(quarkPlayer) {
=======================================
--- /trunk/quarkplayer-plugins/ConfigWindow/ConfigWindowPlugin.cpp Wed Feb
23 17:15:29 2011
+++ /trunk/quarkplayer-plugins/ConfigWindow/ConfigWindowPlugin.cpp Wed Feb
23 18:38:25 2011
@@ -27,7 +27,7 @@
#include <quarkplayer-plugins/MainWindow/MainWindow.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <QtGui/QtGui>
@@ -60,7 +60,7 @@
loadSettings();
- connect(Actions["Global.Configure"], SIGNAL(triggered()),
SLOT(showConfigWindow()));
+ connect(Actions["Common.Configure"], SIGNAL(triggered()),
SLOT(showConfigWindow()));
}
ConfigWindowPlugin::~ConfigWindowPlugin() {
=======================================
--- /trunk/quarkplayer-plugins/ConfigWindow/ShortcutsConfig.cpp Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/ConfigWindow/ShortcutsConfig.cpp Wed Feb 23
18:38:25 2011
@@ -24,7 +24,7 @@
#include <quarkplayer/config/Config.h>
#include <TkUtil/TkAction.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <QtGui/QtGui>
=======================================
--- /trunk/quarkplayer-plugins/ConfigWindow/ShortcutsConfigWidget.cpp Wed
Feb 23 17:15:29 2011
+++ /trunk/quarkplayer-plugins/ConfigWindow/ShortcutsConfigWidget.cpp Wed
Feb 23 18:38:25 2011
@@ -26,7 +26,7 @@
#include <quarkplayer/config/Config.h>
#include <TkUtil/TkAction.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/TkFileDialog.h>
#include <QtGui/QtGui>
=======================================
--- /trunk/quarkplayer-plugins/FileBrowser/FileBrowserTreeView.h Wed Feb 23
10:23:21 2011
+++ /trunk/quarkplayer-plugins/FileBrowser/FileBrowserTreeView.h Wed Feb 23
18:38:25 2011
@@ -19,7 +19,7 @@
#ifndef FILEBROWSERTREEVIEW_H
#define FILEBROWSERTREEVIEW_H
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <QtGui/QTreeView>
=======================================
--- /trunk/quarkplayer-plugins/FileBrowser/FileBrowserWidget.h Wed Feb 23
10:23:21 2011
+++ /trunk/quarkplayer-plugins/FileBrowser/FileBrowserWidget.h Wed Feb 23
18:38:25 2011
@@ -21,7 +21,7 @@
#include <quarkplayer/PluginInterface.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <QtGui/QWidget>
=======================================
--- /trunk/quarkplayer-plugins/FindSubtitles/FindSubtitles.cpp Wed Feb 23
10:23:21 2011
+++ /trunk/quarkplayer-plugins/FindSubtitles/FindSubtitles.cpp Wed Feb 23
18:38:25 2011
@@ -28,7 +28,7 @@
#include <quarkplayer-plugins/MainWindow/MainWindow.h>
#include <quarkplayer-plugins/MediaController/MediaController.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/LanguageChangeEventFilter.h>
#include <phonon/mediaobject.h>
=======================================
--- /trunk/quarkplayer-plugins/FindSubtitles/FindSubtitlesWindow.cpp Wed
Feb 23 10:23:21 2011
+++ /trunk/quarkplayer-plugins/FindSubtitles/FindSubtitlesWindow.cpp Wed
Feb 23 18:38:25 2011
@@ -32,7 +32,7 @@
#include <FileTypes/FileTypes.h>
#include <TkUtil/LanguageChangeEventFilter.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/TkFileDialog.h>
#include <QtGui/QtGui>
=======================================
--- /trunk/quarkplayer-plugins/MainWindow/CommonActions.cpp Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/MainWindow/CommonActions.cpp Wed Feb 23
18:38:25 2011
@@ -22,7 +22,7 @@
#include <quarkplayer/QuarkPlayer.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/TkAction.h>
#include <TkUtil/DesktopEnvironment.h>
#include <TkUtil/LanguageChangeEventFilter.h>
@@ -57,174 +57,174 @@
QCoreApplication * app = QApplication::instance();
Q_ASSERT(app);
- Actions.add("Global.OpenFile", new TkAction(app, QKeySequence::Open));
- Actions.add("Global.Quit", new TkAction(app, tr("Ctrl+Q"), tr("Alt+X")));
- Actions.add("Global.ReportBug", new QAction(app));
- Actions.add("Global.ShowMailingList", new QAction(app));
- Actions.add("Global.ShowLog", new QAction(app));
- Actions.add("Global.About", new TkAction(app, tr("Ctrl+F1")));
- Actions.add("Global.AboutQt", new QAction(app));
- Actions.add("Global.OpenDVD", new TkAction(app, tr("Ctrl+D")));
- Actions.add("Global.OpenURL", new TkAction(app, tr("Ctrl+U")));
- Actions.add("Global.OpenVCD", new QAction(app));
- Actions.add("Global.NewMediaObject", new QAction(app));
- Actions.add("Global.Equalizer", new TkAction(app, tr("Ctrl+E")));
- Actions.add("Global.Configure", new QAction(app));
- Actions.add("Global.EmptyMenu", new QAction(app));
+ Actions.add("Common.OpenFile", new TkAction(app, QKeySequence::Open));
+ Actions.add("Common.Quit", new TkAction(app, tr("Ctrl+Q"), tr("Alt+X")));
+ Actions.add("Common.ReportBug", new QAction(app));
+ Actions.add("Common.ShowMailingList", new QAction(app));
+ Actions.add("Common.ShowLog", new QAction(app));
+ Actions.add("Common.About", new TkAction(app, tr("Ctrl+F1")));
+ Actions.add("Common.AboutQt", new QAction(app));
+ Actions.add("Common.OpenDVD", new TkAction(app, tr("Ctrl+D")));
+ Actions.add("Common.OpenURL", new TkAction(app, tr("Ctrl+U")));
+ Actions.add("Common.OpenVCD", new QAction(app));
+ Actions.add("Common.NewMediaObject", new QAction(app));
+ Actions.add("Common.Equalizer", new TkAction(app, tr("Ctrl+E")));
+ Actions.add("Common.Configure", new QAction(app));
+ Actions.add("Common.EmptyMenu", new QAction(app));
TkAction * action = new TkAction(app, tr("Space"), Qt::Key_MediaPlay,
Qt::Key_Pause);
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.PlayPause", action);
+ Actions.add("Common.PlayPause", action);
action = new TkAction(app, Qt::Key_MediaStop);
- Actions.add("Global.Stop", action);
+ Actions.add("Common.Stop", action);
action = new TkAction(app, tr("Ctrl+N"), tr(">"), Qt::Key_MediaNext);
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.NextTrack", action);
+ Actions.add("Common.NextTrack", action);
action = new TkAction(app, tr("Ctrl+P"), tr("<"), Qt::Key_MediaPrevious);
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.PreviousTrack", action);
+ Actions.add("Common.PreviousTrack", action);
action = new TkAction(app, tr("Left"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.JumpBackward10s", action);
+ Actions.add("Common.JumpBackward10s", action);
action = new TkAction(app, tr("Ctrl+Left"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.JumpBackward1min", action);
+ Actions.add("Common.JumpBackward1min", action);
action = new TkAction(app, tr("Shift+Left"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.JumpBackward10min", action);
+ Actions.add("Common.JumpBackward10min", action);
action = new TkAction(app, tr("Right"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.JumpForward10s", action);
+ Actions.add("Common.JumpForward10s", action);
action = new TkAction(app, tr("Ctrl+Right"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.JumpForward1min", action);
+ Actions.add("Common.JumpForward1min", action);
action = new TkAction(app, tr("Shift+Right"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.JumpForward10min", action);
+ Actions.add("Common.JumpForward10min", action);
action = new TkAction(app, tr("["));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.SpeedDecrease10%", action);
+ Actions.add("Common.SpeedDecrease10%", action);
action = new TkAction(app, tr("]"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.SpeedIncrease10%", action);
+ Actions.add("Common.SpeedIncrease10%", action);
action = new TkAction(app, tr("Ctrl+M"));
action->setShortcutContext(Qt::ApplicationShortcut);
action->setCheckable(true);
- Actions.add("Global.VolumeMute", action);
+ Actions.add("Common.VolumeMute", action);
action = new TkAction(app, tr("Ctrl+Down"), tr("-"), tr("Alt+-"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.VolumeDecrease10%", action);
+ Actions.add("Common.VolumeDecrease10%", action);
action = new TkAction(app, tr("Ctrl+Up"), tr("+"), tr("Alt++"));
action->setShortcutContext(Qt::ApplicationShortcut);
- Actions.add("Global.VolumeIncrease10%", action);
+ Actions.add("Common.VolumeIncrease10%", action);
action = new TkAction(app, tr("Ctrl+F"), tr("Alt+Return"));
action->setShortcutContext(Qt::ApplicationShortcut);
action->setCheckable(true);
- Actions.add("Global.FullScreen", action);
+ Actions.add("Common.FullScreen", action);
action = new TkAction(app, tr("Esc"));
- Actions.add("Global.FullScreenExit", action);
+ Actions.add("Common.FullScreenExit", action);
}
void CommonActions::retranslate() {
- Actions["Global.OpenFile"]->setText(tr("Play &File..."));
- Actions["Global.OpenFile"]->setIcon(QIcon::fromTheme("document-open"));
-
- Actions["Global.Quit"]->setText(tr("&Quit"));
- Actions["Global.Quit"]->setIcon(QIcon::fromTheme("application-exit"));
-
- Actions["Global.ReportBug"]->setText(tr("&Report a Problem..."));
+ Actions["Common.OpenFile"]->setText(tr("Play &File..."));
+ Actions["Common.OpenFile"]->setIcon(QIcon::fromTheme("document-open"));
+
+ Actions["Common.Quit"]->setText(tr("&Quit"));
+ Actions["Common.Quit"]->setIcon(QIcon::fromTheme("application-exit"));
+
+ Actions["Common.ReportBug"]->setText(tr("&Report a Problem..."));
if (desktopEnvironment() == GNOME) {
- Actions["Global.ReportBug"]->setIcon(QIcon::fromTheme("apport"));
+ Actions["Common.ReportBug"]->setIcon(QIcon::fromTheme("apport"));
} else {
-
Actions["Global.ReportBug"]->setIcon(QIcon::fromTheme("tools-report-bug"));
+
Actions["Common.ReportBug"]->setIcon(QIcon::fromTheme("tools-report-bug"));
}
- Actions["Global.ShowMailingList"]->setText(tr("&Discuss about
QuarkPlayer..."));
+ Actions["Common.ShowMailingList"]->setText(tr("&Discuss about
QuarkPlayer..."));
if (desktopEnvironment() == GNOME) {
- Actions["Global.ShowMailingList"]->setIcon(QIcon::fromTheme("help-faq"));
+ Actions["Common.ShowMailingList"]->setIcon(QIcon::fromTheme("help-faq"));
} else {
-
Actions["Global.ShowMailingList"]->setIcon(QIcon::fromTheme("help-hint"));
+
Actions["Common.ShowMailingList"]->setIcon(QIcon::fromTheme("help-hint"));
}
- Actions["Global.ShowLog"]->setText(tr("View &Log"));
+ Actions["Common.ShowLog"]->setText(tr("View &Log"));
QIcon logIcon;
if (desktopEnvironment() == GNOME) {
logIcon = QIcon::fromTheme("logviewer");
} else {
logIcon = QIcon::fromTheme("text-x-log");
}
- Actions["Global.ShowLog"]->setIcon(logIcon);
-
- Actions["Global.About"]->setText(tr("&About"));
-
- Actions["Global.AboutQt"]->setText(tr("About &Qt"));
-
- Actions["Global.OpenDVD"]->setText(tr("Play &DVD..."));
- Actions["Global.OpenDVD"]->setIcon(QIcon::fromTheme("media-optical"));
-
- Actions["Global.OpenURL"]->setText(tr("Play &URL..."));
-
- Actions["Global.OpenVCD"]->setText(tr("Play &VCD..."));
+ Actions["Common.ShowLog"]->setIcon(logIcon);
+
+ Actions["Common.About"]->setText(tr("&About"));
+
+ Actions["Common.AboutQt"]->setText(tr("About &Qt"));
+
+ Actions["Common.OpenDVD"]->setText(tr("Play &DVD..."));
+ Actions["Common.OpenDVD"]->setIcon(QIcon::fromTheme("media-optical"));
+
+ Actions["Common.OpenURL"]->setText(tr("Play &URL..."));
+
+ Actions["Common.OpenVCD"]->setText(tr("Play &VCD..."));
\
- Actions["Global.NewMediaObject"]->setText(tr("New Media Window"));
- Actions["Global.NewMediaObject"]->setIcon(QIcon::fromTheme("tab-new"));
-
- Actions["Global.Equalizer"]->setText(tr("&Equalizer..."));
-
Actions["Global.Equalizer"]->setIcon(QIcon::fromTheme("view-media-equalizer"));
-
- Actions["Global.Configure"]->setText(tr("&Configure..."));
-
Actions["Global.Configure"]->setIcon(QIcon::fromTheme("preferences-system"));
-
- Actions["Global.EmptyMenu"]->setText(tr("<empty>"));
- Actions["Global.EmptyMenu"]->setEnabled(false);
-
- Actions["Global.PreviousTrack"]->setText(tr("P&revious Track"));
-
Actions["Global.PreviousTrack"]->setIcon(QIcon::fromTheme("media-skip-backward"));
-
- Actions["Global.PlayPause"]->setText(tr("&Play/Pause"));
-
Actions["Global.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-start"));
-
- Actions["Global.Stop"]->setText(tr("&Stop"));
- Actions["Global.Stop"]->setIcon(QIcon::fromTheme("media-playback-stop"));
-
- Actions["Global.NextTrack"]->setText(tr("&Next Track"));
-
Actions["Global.NextTrack"]->setIcon(QIcon::fromTheme("media-skip-forward"));
-
- Actions["Global.JumpBackward10s"]->setText(tr("Jump &Backward 10s"));
- Actions["Global.JumpBackward1min"]->setText(tr("Jump &Backward 1min"));
-
Actions["Global.JumpBackward1min"]->setIcon(QIcon::fromTheme("media-seek-backward"));
- Actions["Global.JumpBackward10min"]->setText(tr("Jump &Backward 10min"));
- Actions["Global.JumpForward10s"]->setText(tr("Jump &Forward 10s"));
- Actions["Global.JumpForward1min"]->setText(tr("Jump &Forward 1min"));
-
Actions["Global.JumpForward1min"]->setIcon(QIcon::fromTheme("media-seek-forward"));
- Actions["Global.JumpForward10min"]->setText(tr("Jump &Forward 10min"));
- Actions["Global.SpeedDecrease10%"]->setText(tr("Decrease Speed"));
- Actions["Global.SpeedIncrease10%"]->setText(tr("Increase Speed"));
-
- Actions["Global.VolumeMute"]->setText(tr("&Mute"));
-
Actions["Global.VolumeMute"]->setIcon(QIcon::fromTheme("audio-volume-muted"));
- Actions["Global.VolumeDecrease10%"]->setText(tr("&Decrease Volume"));
- Actions["Global.VolumeIncrease10%"]->setText(tr("&Increase Volume"));
-
- Actions["Global.FullScreen"]->setText(tr("&Fullscreen"));
-
Actions["Global.FullScreen"]->setIcon(QIcon::fromTheme("view-fullscreen"));
-
- Actions["Global.FullScreenExit"]->setText(tr("&Exit Fullscreen"));
+ Actions["Common.NewMediaObject"]->setText(tr("New Media Window"));
+ Actions["Common.NewMediaObject"]->setIcon(QIcon::fromTheme("tab-new"));
+
+ Actions["Common.Equalizer"]->setText(tr("&Equalizer..."));
+
Actions["Common.Equalizer"]->setIcon(QIcon::fromTheme("view-media-equalizer"));
+
+ Actions["Common.Configure"]->setText(tr("&Configure..."));
+
Actions["Common.Configure"]->setIcon(QIcon::fromTheme("preferences-system"));
+
+ Actions["Common.EmptyMenu"]->setText(tr("<empty>"));
+ Actions["Common.EmptyMenu"]->setEnabled(false);
+
+ Actions["Common.PreviousTrack"]->setText(tr("P&revious Track"));
+
Actions["Common.PreviousTrack"]->setIcon(QIcon::fromTheme("media-skip-backward"));
+
+ Actions["Common.PlayPause"]->setText(tr("&Play/Pause"));
+
Actions["Common.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-start"));
+
+ Actions["Common.Stop"]->setText(tr("&Stop"));
+ Actions["Common.Stop"]->setIcon(QIcon::fromTheme("media-playback-stop"));
+
+ Actions["Common.NextTrack"]->setText(tr("&Next Track"));
+
Actions["Common.NextTrack"]->setIcon(QIcon::fromTheme("media-skip-forward"));
+
+ Actions["Common.JumpBackward10s"]->setText(tr("Jump &Backward 10s"));
+ Actions["Common.JumpBackward1min"]->setText(tr("Jump &Backward 1min"));
+
Actions["Common.JumpBackward1min"]->setIcon(QIcon::fromTheme("media-seek-backward"));
+ Actions["Common.JumpBackward10min"]->setText(tr("Jump &Backward 10min"));
+ Actions["Common.JumpForward10s"]->setText(tr("Jump &Forward 10s"));
+ Actions["Common.JumpForward1min"]->setText(tr("Jump &Forward 1min"));
+
Actions["Common.JumpForward1min"]->setIcon(QIcon::fromTheme("media-seek-forward"));
+ Actions["Common.JumpForward10min"]->setText(tr("Jump &Forward 10min"));
+ Actions["Common.SpeedDecrease10%"]->setText(tr("Decrease Speed"));
+ Actions["Common.SpeedIncrease10%"]->setText(tr("Increase Speed"));
+
+ Actions["Common.VolumeMute"]->setText(tr("&Mute"));
+
Actions["Common.VolumeMute"]->setIcon(QIcon::fromTheme("audio-volume-muted"));
+ Actions["Common.VolumeDecrease10%"]->setText(tr("&Decrease Volume"));
+ Actions["Common.VolumeIncrease10%"]->setText(tr("&Increase Volume"));
+
+ Actions["Common.FullScreen"]->setText(tr("&Fullscreen"));
+
Actions["Common.FullScreen"]->setIcon(QIcon::fromTheme("view-fullscreen"));
+
+ Actions["Common.FullScreenExit"]->setText(tr("&Exit Fullscreen"));
}
void CommonActions::stateChanged(Phonon::State newState) {
//Enabled/disabled fullscreen button depending if media is a video or
audio
if (_quarkPlayer.currentMediaObject()->hasVideo()) {
- Actions["Global.FullScreen"]->setEnabled(true);
+ Actions["Common.FullScreen"]->setEnabled(true);
} else {
- Actions["Global.FullScreen"]->setEnabled(false);
+ Actions["Common.FullScreen"]->setEnabled(false);
}
switch (newState) {
@@ -232,33 +232,33 @@
break;
case Phonon::PlayingState:
- Actions["Global.PlayPause"]->setText(tr("&Pause"));
-
Actions["Global.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-pause"));
- disconnect(Actions["Global.PlayPause"], 0, 0, 0);
- connect(Actions["Global.PlayPause"], SIGNAL(triggered()),
+ Actions["Common.PlayPause"]->setText(tr("&Pause"));
+
Actions["Common.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-pause"));
+ disconnect(Actions["Common.PlayPause"], 0, 0, 0);
+ connect(Actions["Common.PlayPause"], SIGNAL(triggered()),
_quarkPlayer.currentMediaObject(), SLOT(pause()));
- Actions["Global.Stop"]->setEnabled(true);
+ Actions["Common.Stop"]->setEnabled(true);
break;
case Phonon::StoppedState:
- Actions["Global.PlayPause"]->setText(tr("P&lay"));
-
Actions["Global.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-start"));
- disconnect(Actions["Global.PlayPause"], 0, 0, 0);
- connect(Actions["Global.PlayPause"], SIGNAL(triggered()),
+ Actions["Common.PlayPause"]->setText(tr("P&lay"));
+
Actions["Common.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-start"));
+ disconnect(Actions["Common.PlayPause"], 0, 0, 0);
+ connect(Actions["Common.PlayPause"], SIGNAL(triggered()),
_quarkPlayer.currentMediaObject(), SLOT(play()));
- Actions["Global.Stop"]->setEnabled(false);
+ Actions["Common.Stop"]->setEnabled(false);
break;
case Phonon::PausedState:
- Actions["Global.PlayPause"]->setText(tr("P&lay"));
-
Actions["Global.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-start"));
- disconnect(Actions["Global.PlayPause"], 0, 0, 0);
- connect(Actions["Global.PlayPause"], SIGNAL(triggered()),
+ Actions["Common.PlayPause"]->setText(tr("P&lay"));
+
Actions["Common.PlayPause"]->setIcon(QIcon::fromTheme("media-playback-start"));
+ disconnect(Actions["Common.PlayPause"], 0, 0, 0);
+ connect(Actions["Common.PlayPause"], SIGNAL(triggered()),
_quarkPlayer.currentMediaObject(), SLOT(play()));
- Actions["Global.Stop"]->setEnabled(true);
+ Actions["Common.Stop"]->setEnabled(true);
break;
case Phonon::LoadingState:
@@ -284,7 +284,7 @@
stateChanged(mediaObject->state());
//Actions connect
- disconnect(Actions["Global.Stop"], 0, 0, 0);
- connect(Actions["Global.Stop"], SIGNAL(triggered()),
+ disconnect(Actions["Common.Stop"], 0, 0, 0);
+ connect(Actions["Common.Stop"], SIGNAL(triggered()),
mediaObject, SLOT(stop()));
}
=======================================
--- /trunk/quarkplayer-plugins/MainWindow/MainWindow.cpp Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/MainWindow/MainWindow.cpp Wed Feb 23
18:38:25 2011
@@ -32,7 +32,7 @@
#include <Logger/LogWindow.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/TkFileDialog.h>
#include <TkUtil/TkToolBar.h>
#include <TkUtil/LanguageChangeEventFilter.h>
@@ -90,18 +90,18 @@
_playToolBar = NULL;
_statusBar = NULL;
- connect(Actions["Global.OpenFile"], SIGNAL(triggered()),
SLOT(playFile()));
- connect(Actions["Global.OpenDVD"], SIGNAL(triggered()), SLOT(playDVD()));
- connect(Actions["Global.OpenURL"], SIGNAL(triggered()), SLOT(playURL()));
- connect(Actions["Global.OpenVCD"], SIGNAL(triggered()), SLOT(playVCD()));
- connect(Actions["Global.NewMediaObject"], SIGNAL(triggered()),
&quarkPlayer, SLOT(createNewMediaObject()));
- connect(Actions["Global.Quit"], SIGNAL(triggered()), SLOT(close()));
- connect(Actions["Global.ReportBug"], SIGNAL(triggered()),
SLOT(reportBug()));
- connect(Actions["Global.ShowMailingList"], SIGNAL(triggered()),
SLOT(showMailingList()));
- connect(Actions["Global.ShowLog"], SIGNAL(triggered()), SLOT(showLog()));
- connect(Actions["Global.About"], SIGNAL(triggered()), SLOT(about()));
- connect(Actions["Global.AboutQt"], SIGNAL(triggered()), qApp,
SLOT(aboutQt()));
- connect(Actions["Global.VolumeMute"], SIGNAL(toggled(bool)),
SLOT(mutedToggled(bool)));
+ connect(Actions["Common.OpenFile"], SIGNAL(triggered()),
SLOT(playFile()));
+ connect(Actions["Common.OpenDVD"], SIGNAL(triggered()), SLOT(playDVD()));
+ connect(Actions["Common.OpenURL"], SIGNAL(triggered()), SLOT(playURL()));
+ connect(Actions["Common.OpenVCD"], SIGNAL(triggered()), SLOT(playVCD()));
+ connect(Actions["Common.NewMediaObject"], SIGNAL(triggered()),
&quarkPlayer, SLOT(createNewMediaObject()));
+ connect(Actions["Common.Quit"], SIGNAL(triggered()), SLOT(close()));
+ connect(Actions["Common.ReportBug"], SIGNAL(triggered()),
SLOT(reportBug()));
+ connect(Actions["Common.ShowMailingList"], SIGNAL(triggered()),
SLOT(showMailingList()));
+ connect(Actions["Common.ShowLog"], SIGNAL(triggered()), SLOT(showLog()));
+ connect(Actions["Common.About"], SIGNAL(triggered()), SLOT(about()));
+ connect(Actions["Common.AboutQt"], SIGNAL(triggered()), qApp,
SLOT(aboutQt()));
+ connect(Actions["Common.VolumeMute"], SIGNAL(toggled(bool)),
SLOT(mutedToggled(bool)));
connect(&quarkPlayer,
SIGNAL(currentMediaObjectChanged(Phonon::MediaObject *)),
SLOT(currentMediaObjectChanged(Phonon::MediaObject *)));
@@ -272,64 +272,64 @@
_menuFile = new QMenu();
menuBar()->addMenu(_menuFile);
- _menuFile->addAction(Actions["Global.OpenFile"]);
- _menuFile->addAction(Actions["Global.OpenURL"]);
- _menuFile->addAction(Actions["Global.OpenDVD"]);
- _menuFile->addAction(Actions["Global.OpenVCD"]);
+ _menuFile->addAction(Actions["Common.OpenFile"]);
+ _menuFile->addAction(Actions["Common.OpenURL"]);
+ _menuFile->addAction(Actions["Common.OpenDVD"]);
+ _menuFile->addAction(Actions["Common.OpenVCD"]);
_menuFile->addSeparator();
- _menuFile->addAction(Actions["Global.Quit"]);
+ _menuFile->addAction(Actions["Common.Quit"]);
_menuPlay = new QMenu();
menuBar()->addMenu(_menuPlay);
- _menuPlay->addAction(Actions["Global.PreviousTrack"]);
- _menuPlay->addAction(Actions["Global.PlayPause"]);
- _menuPlay->addAction(Actions["Global.Stop"]);
- _menuPlay->addAction(Actions["Global.NextTrack"]);
+ _menuPlay->addAction(Actions["Common.PreviousTrack"]);
+ _menuPlay->addAction(Actions["Common.PlayPause"]);
+ _menuPlay->addAction(Actions["Common.Stop"]);
+ _menuPlay->addAction(Actions["Common.NextTrack"]);
_menuPlay->addSeparator();
- _menuPlay->addAction(Actions["Global.JumpBackward10s"]);
- _menuPlay->addAction(Actions["Global.JumpBackward1min"]);
- _menuPlay->addAction(Actions["Global.JumpBackward10min"]);
+ _menuPlay->addAction(Actions["Common.JumpBackward10s"]);
+ _menuPlay->addAction(Actions["Common.JumpBackward1min"]);
+ _menuPlay->addAction(Actions["Common.JumpBackward10min"]);
_menuPlay->addSeparator();
- _menuPlay->addAction(Actions["Global.JumpForward10s"]);
- _menuPlay->addAction(Actions["Global.JumpForward1min"]);
- _menuPlay->addAction(Actions["Global.JumpForward10min"]);
+ _menuPlay->addAction(Actions["Common.JumpForward10s"]);
+ _menuPlay->addAction(Actions["Common.JumpForward1min"]);
+ _menuPlay->addAction(Actions["Common.JumpForward10min"]);
_menuPlay->addSeparator();
- _menuPlay->addAction(Actions["Global.SpeedDecrease10%"]);
- _menuPlay->addAction(Actions["Global.SpeedIncrease10%"]);
+ _menuPlay->addAction(Actions["Common.SpeedDecrease10%"]);
+ _menuPlay->addAction(Actions["Common.SpeedIncrease10%"]);
_menuPlay->addSeparator();
- _menuPlay->addAction(Actions["Global.FullScreen"]);
+ _menuPlay->addAction(Actions["Common.FullScreen"]);
_menuPlay->addSeparator();
- _menuPlay->addAction(Actions["Global.NewMediaObject"]);
+ _menuPlay->addAction(Actions["Common.NewMediaObject"]);
_menuAudio = new QMenu();
menuBar()->addMenu(_menuAudio);
- _menuAudio->addAction(Actions["Global.VolumeMute"]);
- _menuAudio->addAction(Actions["Global.VolumeIncrease10%"]);
- _menuAudio->addAction(Actions["Global.VolumeDecrease10%"]);
+ _menuAudio->addAction(Actions["Common.VolumeMute"]);
+ _menuAudio->addAction(Actions["Common.VolumeIncrease10%"]);
+ _menuAudio->addAction(Actions["Common.VolumeDecrease10%"]);
_menuSettings = new QMenu();
menuBar()->addMenu(_menuSettings);
- _menuSettings->addAction(Actions["Global.Equalizer"]);
- _menuSettings->addAction(Actions["Global.Configure"]);
+ _menuSettings->addAction(Actions["Common.Equalizer"]);
+ _menuSettings->addAction(Actions["Common.Configure"]);
_menuHelp = new QMenu();
menuBar()->addMenu(_menuHelp);
- _menuHelp->addAction(Actions["Global.ShowMailingList"]);
- _menuHelp->addAction(Actions["Global.ReportBug"]);
- _menuHelp->addAction(Actions["Global.ShowLog"]);
+ _menuHelp->addAction(Actions["Common.ShowMailingList"]);
+ _menuHelp->addAction(Actions["Common.ReportBug"]);
+ _menuHelp->addAction(Actions["Common.ShowLog"]);
_menuHelp->addSeparator();
- _menuHelp->addAction(Actions["Global.About"]);
- _menuHelp->addAction(Actions["Global.AboutQt"]);
+ _menuHelp->addAction(Actions["Common.About"]);
+ _menuHelp->addAction(Actions["Common.AboutQt"]);
//Main ToolBar
_mainToolBar = new TkToolBar(this);
TkToolBar::setToolButtonStyle(_mainToolBar);
- _mainToolBar->addAction(Actions["Global.OpenFile"]);
- _mainToolBar->addAction(Actions["Global.OpenDVD"]);
- //_mainToolBar->addAction(Actions["Global.OpenURL"]);
+ _mainToolBar->addAction(Actions["Common.OpenFile"]);
+ _mainToolBar->addAction(Actions["Common.OpenDVD"]);
+ //_mainToolBar->addAction(Actions["Common.OpenURL"]);
//_mainToolBar->addSeparator();
- //_mainToolBar->addAction(Actions["Global.Equalizer"]);
- //_mainToolBar->addAction(Actions["Global.Configure"]);
+ //_mainToolBar->addAction(Actions["Common.Equalizer"]);
+ //_mainToolBar->addAction(Actions["Common.Configure"]);
addToolBar(_mainToolBar);
//Main toolbar accessible but disabled by default
@@ -498,20 +498,20 @@
//Resets the window title when needed
connect(mediaObject, SIGNAL(metaDataChanged()),
SLOT(updateWindowTitle()));
- disconnect(Actions["Global.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
- connect(Actions["Global.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
+ disconnect(Actions["Common.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
+ connect(Actions["Common.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
Phonon::AudioOutput * audioOutput = quarkPlayer().currentAudioOutput();
if (audioOutput) {
//Avoid a crash inside Phonon if the backend couldn't be loaded
- Actions["Global.VolumeMute"]->setChecked(audioOutput->isMuted());
+ Actions["Common.VolumeMute"]->setChecked(audioOutput->isMuted());
disconnect(audioOutput, SIGNAL(mutedChanged(bool)), this,
SLOT(mutedChanged(bool)));
connect(audioOutput, SIGNAL(mutedChanged(bool)),
SLOT(mutedChanged(bool)));
}
}
void MainWindow::mutedChanged(bool muted) {
- Actions["Global.VolumeMute"]->setChecked(muted);
+ Actions["Common.VolumeMute"]->setChecked(muted);
}
void MainWindow::mutedToggled(bool muted) {
=======================================
--- /trunk/quarkplayer-plugins/MainWindow/MockMainWindow.cpp Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/MainWindow/MockMainWindow.cpp Wed Feb 23
18:38:25 2011
@@ -29,7 +29,7 @@
#include <Logger/LogWindow.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/TkFileDialog.h>
#include <FileTypes/FileTypes.h>
@@ -54,10 +54,10 @@
_playToolBar = NULL;
- connect(Actions["Global.OpenFile"], SIGNAL(triggered()),
SLOT(playFile()));
- connect(Actions["Global.Quit"], SIGNAL(triggered()), SLOT(close()));
- connect(Actions["Global.ShowLog"], SIGNAL(triggered()), SLOT(showLog()));
- connect(Actions["Global.About"], SIGNAL(triggered()), SLOT(about()));
+ connect(Actions["Common.OpenFile"], SIGNAL(triggered()),
SLOT(playFile()));
+ connect(Actions["Common.Quit"], SIGNAL(triggered()), SLOT(close()));
+ connect(Actions["Common.ShowLog"], SIGNAL(triggered()), SLOT(showLog()));
+ connect(Actions["Common.About"], SIGNAL(triggered()), SLOT(about()));
connect(&quarkPlayer,
SIGNAL(currentMediaObjectChanged(Phonon::MediaObject *)),
SLOT(currentMediaObjectChanged(Phonon::MediaObject *)));
@@ -130,29 +130,29 @@
_menuFile = new QMenu();
_menuFile->setTitle("&File");
menuBar()->addMenu(_menuFile);
- _menuFile->addAction(Actions["Global.OpenFile"]);
+ _menuFile->addAction(Actions["Common.OpenFile"]);
_menuFile->addSeparator();
- _menuFile->addAction(Actions["Global.Quit"]);
+ _menuFile->addAction(Actions["Common.Quit"]);
_menuPlay = new QMenu();
_menuPlay->setTitle("&Play");
menuBar()->addMenu(_menuPlay);
- _menuPlay->addAction(Actions["Global.PlayPause"]);
+ _menuPlay->addAction(Actions["Common.PlayPause"]);
_menuPlay->addSeparator();
- _menuPlay->addAction(Actions["Global.FullScreen"]);
+ _menuPlay->addAction(Actions["Common.FullScreen"]);
//No menu entry for FullScreenExit, see MyVideoWidget.cpp
_menuSettings = new QMenu();
_menuSettings->setTitle("&Settings");
menuBar()->addMenu(_menuSettings);
- _menuSettings->addAction(Actions["Global.Equalizer"]);
- _menuSettings->addAction(Actions["Global.Configure"]);
+ _menuSettings->addAction(Actions["Common.Equalizer"]);
+ _menuSettings->addAction(Actions["Common.Configure"]);
_menuHelp = new QMenu();
_menuHelp->setTitle("&Help");
menuBar()->addMenu(_menuHelp);
- _menuHelp->addAction(Actions["Global.ShowLog"]);
- _menuHelp->addAction(Actions["Global.About"]);
+ _menuHelp->addAction(Actions["Common.ShowLog"]);
+ _menuHelp->addAction(Actions["Common.About"]);
}
void MockMainWindow::closeEvent(QCloseEvent * event) {
@@ -218,6 +218,6 @@
tmp->disconnect(this);
}
- disconnect(Actions["Global.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
- connect(Actions["Global.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
-}
+ disconnect(Actions["Common.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
+ connect(Actions["Common.Quit"], SIGNAL(triggered()), mediaObject,
SLOT(stop()));
+}
=======================================
--- /trunk/quarkplayer-plugins/MediaController/MediaController.cpp Wed Feb
23 17:15:29 2011
+++ /trunk/quarkplayer-plugins/MediaController/MediaController.cpp Wed Feb
23 18:38:25 2011
@@ -31,7 +31,7 @@
#include <FileTypes/FileTypes.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/TkFileDialog.h>
#include <TkUtil/LanguageChangeEventFilter.h>
@@ -122,26 +122,26 @@
QAction * insertBeforeMenuSettings =
_mainWindow->menuSettings()->menuAction();
_menuAudioChannels = new QMenu();
- _menuAudioChannels->addAction(Actions["Global.EmptyMenu"]);
+ _menuAudioChannels->addAction(Actions["Common.EmptyMenu"]);
_mainWindow->menuAudio()->addMenu(_menuAudioChannels);
_menuSubtitle = new QMenu();
menuBar->insertMenu(insertBeforeMenuSettings, _menuSubtitle);
_menuSubtitle->addAction(Actions["MediaController.OpenSubtitleFile"]);
_menuSubtitles = new QMenu();
- _menuSubtitles->addAction(Actions["Global.EmptyMenu"]);
+ _menuSubtitles->addAction(Actions["Common.EmptyMenu"]);
_menuSubtitle->addMenu(_menuSubtitles);
_menuBrowse = new QMenu();
menuBar->insertMenu(insertBeforeMenuSettings, _menuBrowse);
_menuTitles = new QMenu();
- _menuTitles->addAction(Actions["Global.EmptyMenu"]);
+ _menuTitles->addAction(Actions["Common.EmptyMenu"]);
_menuBrowse->addAction(_menuTitles->menuAction());
_menuChapters = new QMenu();
- _menuChapters->addAction(Actions["Global.EmptyMenu"]);
+ _menuChapters->addAction(Actions["Common.EmptyMenu"]);
_menuBrowse->addAction(_menuChapters->menuAction());
_menuAngles = new QMenu();
- _menuAngles->addAction(Actions["Global.EmptyMenu"]);
+ _menuAngles->addAction(Actions["Common.EmptyMenu"]);
_menuBrowse->addAction(_menuAngles->menuAction());
}
@@ -260,8 +260,8 @@
removeAllAction(_menuAudioChannels);
removeAllAction(_toolBar->menuAudioChannels());
if (audios.isEmpty()) {
- _menuAudioChannels->addAction(Actions["Global.EmptyMenu"]);
- _toolBar->menuAudioChannels()->addAction(Actions["Global.EmptyMenu"]);
+ _menuAudioChannels->addAction(Actions["Common.EmptyMenu"]);
+ _toolBar->menuAudioChannels()->addAction(Actions["Common.EmptyMenu"]);
}
for (int i = 0; i < audios.size(); i++) {
@@ -311,8 +311,8 @@
removeAllAction(_menuSubtitles);
removeAllAction(_toolBar->menuSubtitles());
if (subtitles.isEmpty()) {
- _menuSubtitles->addAction(Actions["Global.EmptyMenu"]);
- _toolBar->menuSubtitles()->addAction(Actions["Global.EmptyMenu"]);
+ _menuSubtitles->addAction(Actions["Common.EmptyMenu"]);
+ _toolBar->menuSubtitles()->addAction(Actions["Common.EmptyMenu"]);
}
for (int i = 0; i < subtitles.size(); i++) {
@@ -370,7 +370,7 @@
int nbTitles = titles.size();
removeAllAction(_menuTitles);
if (titles.isEmpty()) {
- _menuTitles->addAction(Actions["Global.EmptyMenu"]);
+ _menuTitles->addAction(Actions["Common.EmptyMenu"]);
}
for (int i = 0; i < nbTitles; i++) {
@@ -385,7 +385,7 @@
int nbTitles = titles;
removeAllAction(_menuTitles);
if (titles == 0) {
- _menuTitles->addAction(Actions["Global.EmptyMenu"]);
+ _menuTitles->addAction(Actions["Common.EmptyMenu"]);
}
for (int i = 0; i < nbTitles; i++) {
@@ -455,7 +455,7 @@
QList<Phonon::ChapterDescription> chapters =
_currentMediaController->availableChapters2();
removeAllAction(_menuChapters);
if (chapters.isEmpty()) {
- _menuChapters->addAction(Actions["Global.EmptyMenu"]);
+ _menuChapters->addAction(Actions["Common.EmptyMenu"]);
}
for (int i = 0; i < chapters.size(); i++) {
@@ -469,7 +469,7 @@
int chapters = _currentMediaController->availableChapters();
removeAllAction(_menuChapters);
if (chapters == 0) {
- _menuChapters->addAction(Actions["Global.EmptyMenu"]);
+ _menuChapters->addAction(Actions["Common.EmptyMenu"]);
}
for (int i = 0; i < chapters; i++) {
@@ -518,7 +518,7 @@
int angles = _currentMediaController->availableAngles();
removeAllAction(_menuAngles);
if (angles == 0) {
- _menuAngles->addAction(Actions["Global.EmptyMenu"]);
+ _menuAngles->addAction(Actions["Common.EmptyMenu"]);
}
for (int i = 0; i < angles; i++) {
=======================================
--- /trunk/quarkplayer-plugins/MediaController/MediaControllerToolBar.cpp
Wed Feb 23 17:15:29 2011
+++ /trunk/quarkplayer-plugins/MediaController/MediaControllerToolBar.cpp
Wed Feb 23 18:38:25 2011
@@ -20,7 +20,7 @@
#include "MediaControllerLogger.h"
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/LanguageChangeEventFilter.h>
#include <QtGui/QtGui>
@@ -32,13 +32,13 @@
_audioChannelsButton = new QPushButton();
_menuAudioChannels = new QMenu();
- _menuAudioChannels->addAction(Actions["Global.EmptyMenu"]);
+ _menuAudioChannels->addAction(Actions["Common.EmptyMenu"]);
_audioChannelsButton->setMenu(_menuAudioChannels);
addWidget(_audioChannelsButton);
_subtitlesButton = new QPushButton();
_menuSubtitles = new QMenu();
- _menuSubtitles->addAction(Actions["Global.EmptyMenu"]);
+ _menuSubtitles->addAction(Actions["Common.EmptyMenu"]);
_subtitlesButton->setMenu(_menuSubtitles);
addWidget(_subtitlesButton);
=======================================
--- /trunk/quarkplayer-plugins/PlayToolBar/PlayToolBar.cpp Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/PlayToolBar/PlayToolBar.cpp Wed Feb 23
18:38:25 2011
@@ -26,7 +26,7 @@
#include <quarkplayer-plugins/MainWindow/MainWindow.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/LanguageChangeEventFilter.h>
#include <phonon/mediaobject.h>
@@ -120,28 +120,28 @@
//_seekSlider->setIconVisible(true);
//_seekSlider->setTracking(false);
- //_seekToolBar->addAction(Actions["Global.SpeedDecrease10%"));
- connect(Actions["Global.SpeedDecrease10%"], SIGNAL(triggered()),
SLOT(decreaseSpeed10()));
- //_seekToolBar->addAction(Actions["Global.JumpBackward10min"));
- connect(Actions["Global.JumpBackward10min"], SIGNAL(triggered()),
SLOT(jumpBackward10min()));
- _seekToolBar->addAction(Actions["Global.JumpBackward1min"]);
- connect(Actions["Global.JumpBackward1min"], SIGNAL(triggered()),
SLOT(jumpBackward1min()));
- //_seekToolBar->addAction(Actions["Global.JumpBackward10s"));
- connect(Actions["Global.JumpBackward10s"], SIGNAL(triggered()),
SLOT(jumpBackward10s()));
+ //_seekToolBar->addAction(Actions["Common.SpeedDecrease10%"));
+ connect(Actions["Common.SpeedDecrease10%"], SIGNAL(triggered()),
SLOT(decreaseSpeed10()));
+ //_seekToolBar->addAction(Actions["Common.JumpBackward10min"));
+ connect(Actions["Common.JumpBackward10min"], SIGNAL(triggered()),
SLOT(jumpBackward10min()));
+ _seekToolBar->addAction(Actions["Common.JumpBackward1min"]);
+ connect(Actions["Common.JumpBackward1min"], SIGNAL(triggered()),
SLOT(jumpBackward1min()));
+ //_seekToolBar->addAction(Actions["Common.JumpBackward10s"));
+ connect(Actions["Common.JumpBackward10s"], SIGNAL(triggered()),
SLOT(jumpBackward10s()));
_seekToolBar->addWidget(_seekSlider);
- //_seekToolBar->addAction(Actions["Global.JumpForward10s"));
- connect(Actions["Global.JumpForward10s"], SIGNAL(triggered()),
SLOT(jumpForward10s()));
- _seekToolBar->addAction(Actions["Global.JumpForward1min"]);
- connect(Actions["Global.JumpForward1min"], SIGNAL(triggered()),
SLOT(jumpForward1min()));
- //_seekToolBar->addAction(Actions["Global.JumpForward10min"));
- connect(Actions["Global.JumpForward10min"], SIGNAL(triggered()),
SLOT(jumpForward10min()));
- //_seekToolBar->addAction(Actions["Global.SpeedIncrease10%"));
- connect(Actions["Global.SpeedIncrease10%"], SIGNAL(triggered()),
SLOT(increaseSpeed10()));
-
- connect(Actions["Global.VolumeDecrease10%"], SIGNAL(triggered()),
SLOT(volumeDecrease10()));
- connect(Actions["Global.VolumeIncrease10%"], SIGNAL(triggered()),
SLOT(volumeIncrease10()));
+ //_seekToolBar->addAction(Actions["Common.JumpForward10s"));
+ connect(Actions["Common.JumpForward10s"], SIGNAL(triggered()),
SLOT(jumpForward10s()));
+ _seekToolBar->addAction(Actions["Common.JumpForward1min"]);
+ connect(Actions["Common.JumpForward1min"], SIGNAL(triggered()),
SLOT(jumpForward1min()));
+ //_seekToolBar->addAction(Actions["Common.JumpForward10min"));
+ connect(Actions["Common.JumpForward10min"], SIGNAL(triggered()),
SLOT(jumpForward10min()));
+ //_seekToolBar->addAction(Actions["Common.SpeedIncrease10%"));
+ connect(Actions["Common.SpeedIncrease10%"], SIGNAL(triggered()),
SLOT(increaseSpeed10()));
+
+ connect(Actions["Common.VolumeDecrease10%"], SIGNAL(triggered()),
SLOT(volumeDecrease10()));
+ connect(Actions["Common.VolumeIncrease10%"], SIGNAL(triggered()),
SLOT(volumeIncrease10()));
}
void PlayToolBar::decreaseSpeed10() {
@@ -242,16 +242,16 @@
_controlToolBar = new QToolBar(NULL);
_controlToolBar->setIconSize(QSize(24, 18));
- _controlToolBar->addAction(Actions["Global.PreviousTrack"]);
- _controlToolBar->addAction(Actions["Global.PlayPause"]);
- _controlToolBar->addAction(Actions["Global.Stop"]);
- _controlToolBar->addAction(Actions["Global.NextTrack"]);
+ _controlToolBar->addAction(Actions["Common.PreviousTrack"]);
+ _controlToolBar->addAction(Actions["Common.PlayPause"]);
+ _controlToolBar->addAction(Actions["Common.Stop"]);
+ _controlToolBar->addAction(Actions["Common.NextTrack"]);
_controlToolBar->addSeparator();
- _controlToolBar->addAction(Actions["Global.FullScreen"]);
+ _controlToolBar->addAction(Actions["Common.FullScreen"]);
_controlToolBar->addSeparator();
- _controlToolBar->addAction(Actions["Global.NewMediaObject"]);
+ _controlToolBar->addAction(Actions["Common.NewMediaObject"]);
//volumeSlider
_controlToolBar->addSeparator();
@@ -280,11 +280,11 @@
//FIXME don't know why, seekToolBar does not get enabled afterwards
//_seekToolBar->setEnabled(enabled);
- Actions["Global.PreviousTrack"]->setEnabled(enabled);
- Actions["Global.PlayPause"]->setEnabled(enabled);
- Actions["Global.Stop"]->setEnabled(enabled);
- Actions["Global.NextTrack"]->setEnabled(enabled);
- Actions["Global.FullScreen"]->setEnabled(enabled);
+ Actions["Common.PreviousTrack"]->setEnabled(enabled);
+ Actions["Common.PlayPause"]->setEnabled(enabled);
+ Actions["Common.Stop"]->setEnabled(enabled);
+ Actions["Common.NextTrack"]->setEnabled(enabled);
+ Actions["Common.FullScreen"]->setEnabled(enabled);
}
void PlayToolBar::currentMediaObjectChanged(Phonon::MediaObject *
mediaObject) {
=======================================
--- /trunk/quarkplayer-plugins/Playlist/DragAndDropTreeView.h Wed Feb 23
10:23:21 2011
+++ /trunk/quarkplayer-plugins/Playlist/DragAndDropTreeView.h Wed Feb 23
18:38:25 2011
@@ -21,7 +21,7 @@
#include <QtGui/QTreeView>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
class PlaylistWidget;
class PlaylistModel;
=======================================
--- /trunk/quarkplayer-plugins/Playlist/PlaylistWidget.cpp Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/Playlist/PlaylistWidget.cpp Wed Feb 23
18:38:25 2011
@@ -399,11 +399,11 @@
}
//Next track
- connect(Actions["Global.NextTrack"], SIGNAL(triggered()),
+ connect(Actions["Common.NextTrack"], SIGNAL(triggered()),
_playlistFilter, SLOT(playNextTrack()));
//Previous track
- connect(Actions["Global.PreviousTrack"], SIGNAL(triggered()),
+ connect(Actions["Common.PreviousTrack"], SIGNAL(triggered()),
_playlistFilter, SLOT(playPreviousTrack()));
}
@@ -414,10 +414,10 @@
}
//Next track
- Actions["Global.NextTrack"]->disconnect(_playlistFilter);
+ Actions["Common.NextTrack"]->disconnect(_playlistFilter);
//Previous track
- Actions["Global.PreviousTrack"]->disconnect(_playlistFilter);
+ Actions["Common.PreviousTrack"]->disconnect(_playlistFilter);
}
void PlaylistWidget::createNewPlaylistWidget() {
=======================================
--- /trunk/quarkplayer-plugins/Playlist/PlaylistWidget.h Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/Playlist/PlaylistWidget.h Wed Feb 23
18:38:25 2011
@@ -25,7 +25,7 @@
#include <PlaylistParser/PlaylistParser.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <QtGui/QWidget>
=======================================
--- /trunk/quarkplayer-plugins/QuickSettings/QuickSettingsWindow.cpp Wed
Feb 23 17:15:29 2011
+++ /trunk/quarkplayer-plugins/QuickSettings/QuickSettingsWindow.cpp Wed
Feb 23 18:38:25 2011
@@ -28,7 +28,7 @@
#include <quarkplayer-plugins/MainWindow/MainWindow.h>
#include <TkUtil/LanguageChangeEventFilter.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <phonon/mediaobject.h>
#include <phonon/audiooutput.h>
@@ -67,7 +67,7 @@
_nextEffect = NULL;
_ui = NULL;
- connect(Actions["Global.Equalizer"], SIGNAL(triggered()), SLOT(show()));
+ connect(Actions["Common.Equalizer"], SIGNAL(triggered()), SLOT(show()));
}
QuickSettingsWindow::~QuickSettingsWindow() {
=======================================
--- /trunk/quarkplayer-plugins/VideoWidget/MyVideoWidget.cpp Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/VideoWidget/MyVideoWidget.cpp Wed Feb 23
18:38:25 2011
@@ -22,7 +22,7 @@
#include <quarkplayer-plugins/MainWindow/MainWindow.h>
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <TkUtil/ScreenSaver.h>
#include <TkUtil/TkAction.h>
#include <TkUtil/LanguageChangeEventFilter.h>
@@ -50,7 +50,7 @@
//Lazy initialization
_widgetOverFullScreen = NULL;
- connect(Actions["Global.FullScreen"], SIGNAL(toggled(bool)),
+ connect(Actions["Common.FullScreen"], SIGNAL(toggled(bool)),
SLOT(setFullScreenInternal(bool)));
//We have to add the QAction to the widget otherwise it won't work
@@ -58,9 +58,9 @@
//Note that an action must be added to a widget before it can be used;
//this is also true when the shortcut should be global
//(i.e., Qt::ApplicationShortcut as Qt::ShortcutContext).
- addAction(Actions["Global.FullScreenExit"]);
-
- connect(Actions["Global.FullScreenExit"], SIGNAL(triggered()),
+ addAction(Actions["Common.FullScreenExit"]);
+
+ connect(Actions["Common.FullScreenExit"], SIGNAL(triggered()),
SLOT(triggerFullScreenExitAction()));
if (_playToolBar) {
@@ -105,17 +105,17 @@
void MyVideoWidget::createContextMenu() {
_contextMenu = new QMenu(this);
- _contextMenu->addAction(Actions["Global.PreviousTrack"]);
- _contextMenu->addAction(Actions["Global.PlayPause"]);
- _contextMenu->addAction(Actions["Global.Stop"]);
- _contextMenu->addAction(Actions["Global.NextTrack"]);
- _contextMenu->addAction(Actions["Global.FullScreen"]);
+ _contextMenu->addAction(Actions["Common.PreviousTrack"]);
+ _contextMenu->addAction(Actions["Common.PlayPause"]);
+ _contextMenu->addAction(Actions["Common.Stop"]);
+ _contextMenu->addAction(Actions["Common.NextTrack"]);
+ _contextMenu->addAction(Actions["Common.FullScreen"]);
_contextMenu->addSeparator();
- _contextMenu->addAction(Actions["Global.OpenFile"]);
- _contextMenu->addAction(Actions["Global.OpenURL"]);
- _contextMenu->addAction(Actions["Global.OpenDVD"]);
+ _contextMenu->addAction(Actions["Common.OpenFile"]);
+ _contextMenu->addAction(Actions["Common.OpenURL"]);
+ _contextMenu->addAction(Actions["Common.OpenDVD"]);
_contextMenu->addSeparator();
@@ -163,7 +163,7 @@
_contextMenu->addSeparator();
- _contextMenu->addAction(Actions["Global.Quit"]);
+ _contextMenu->addAction(Actions["Common.Quit"]);
}
void MyVideoWidget::showContextMenu(const QPoint & pos) {
@@ -195,7 +195,7 @@
}
void MyVideoWidget::triggerFullScreenExitAction() {
- Actions["Global.FullScreen"]->setChecked(false);
+ Actions["Common.FullScreen"]->setChecked(false);
}
void MyVideoWidget::enterFullScreenInternal() {
@@ -266,7 +266,7 @@
void MyVideoWidget::mouseDoubleClickEvent(QMouseEvent * event) {
if (event->button() == Qt::LeftButton) {
event->accept();
- Actions["Global.FullScreen"]->toggle();
+ Actions["Common.FullScreen"]->toggle();
} else {
event->ignore();
}
=======================================
--- /trunk/quarkplayer-plugins/VideoWidget/MyVideoWidget.h Wed Feb 23
17:15:29 2011
+++ /trunk/quarkplayer-plugins/VideoWidget/MyVideoWidget.h Wed Feb 23
18:38:25 2011
@@ -19,7 +19,7 @@
#ifndef MYVIDEOWIDGET_H
#define MYVIDEOWIDGET_H
-#include <TkUtil/Actions.h>
+#include <TkUtil/ActionCollection.h>
#include <phonon/videowidget.h>
#include <phonon/phononnamespace.h>