1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-20 04:41:36 +02:00

Rename TomahawkWindowDeclarative to TomahawkTouchWindow and make it a subclass of TomahawkWindow

This commit is contained in:
Dominik Schmidt
2011-09-07 05:38:58 +02:00
parent 769be854fa
commit 58f239b3a9
5 changed files with 22 additions and 28 deletions

View File

@@ -4,12 +4,12 @@ SET( touchmahawkSources ${final_src} )
#LIST( REMOVE_ITEM touchmahawkSources "main.cpp" ) #LIST( REMOVE_ITEM touchmahawkSources "main.cpp" )
SET( touchmahawkHeaders SET( touchmahawkHeaders
active/tomahawkwindowdeclarative.h active/tomahawktouchwindow.h
) )
SET( touchmahawkSources SET( touchmahawkSources
${touchmahawkSources} ${touchmahawkSources}
active/tomahawkwindowdeclarative.cpp active/tomahawktouchwindow.cpp
# active/main.cpp # active/main.cpp
) )

View File

@@ -16,7 +16,7 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "active/tomahawkwindowdeclarative.h" #include "active/tomahawktouchwindow.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "audio/audioengine.h" #include "audio/audioengine.h"
@@ -27,7 +27,7 @@
#define QMLGUI "/home/domme/dev/sources/tomahawk-qml" #define QMLGUI "/home/domme/dev/sources/tomahawk-qml"
TomahawkWindowDeclarative::TomahawkWindowDeclarative() TomahawkTouchWindow::TomahawkTouchWindow()
: m_view(0) : m_view(0)
{ {
QFileSystemWatcher* watcher = new QFileSystemWatcher; QFileSystemWatcher* watcher = new QFileSystemWatcher;
@@ -41,20 +41,20 @@ TomahawkWindowDeclarative::TomahawkWindowDeclarative()
} }
TomahawkWindowDeclarative::~TomahawkWindowDeclarative() TomahawkTouchWindow::~TomahawkTouchWindow()
{ {
} }
void TomahawkWindowDeclarative::play(const QModelIndex& index) void TomahawkTouchWindow::play(const QModelIndex& index)
{ {
} }
void void
TomahawkWindowDeclarative::loadQml() TomahawkTouchWindow::loadQml()
{ {
tLog() << Q_FUNC_INFO; tLog() << Q_FUNC_INFO;
qmlRegisterType<AudioEngine>("org.tomahawkplayer.qmlcomponents", 1, 0, "AudioEngine"); qmlRegisterType<AudioEngine>("org.tomahawkplayer.qmlcomponents", 1, 0, "AudioEngine");

View File

@@ -16,33 +16,27 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>. * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TOMAHAWKWINDOWDECLARATIVE_H #ifndef TOMAHAWKTOUCHWINDOW_H
#define TOMAHAWKWINDOWDECLARATIVE_H #define TOMAHAWKTOUCHWINDOW_H
#include "tomahawkwindow.h"
#include <QtDeclarative> #include <QtDeclarative>
#include <QMainWindow>
class TomahawkWindowDeclarative; class TomahawkTouchWindow;
class QFileSystemWatcher; class QFileSystemWatcher;
class TomahawkTouchWindow : public TomahawkWindow
class TomahawkWindowDeclarative : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
TomahawkWindowDeclarative(); TomahawkTouchWindow();
~TomahawkWindowDeclarative(); ~TomahawkTouchWindow();
public slots: public slots:
void play( const QModelIndex& index ); void play( const QModelIndex& index );
// protected:
// void changeEvent( QEvent* e );
// void closeEvent( QCloseEvent* e );
// void showEvent( QShowEvent* e );
// void hideEvent( QHideEvent* e );
private slots: private slots:
void loadQml(); void loadQml();
@@ -52,5 +46,5 @@ private:
}; };
#endif // TOMAHAWKWINDOWDECLARATIVE_H #endif // TOMAHAWKTOUCHWINDOW_H

View File

@@ -70,7 +70,7 @@
#endif #endif
#ifdef TOUCHMAHAWK #ifdef TOUCHMAHAWK
#include "active/tomahawkwindowdeclarative.h" #include "active/tomahawktouchwindow.h"
#endif #endif
// should go to a plugin actually // should go to a plugin actually
@@ -230,7 +230,7 @@ TomahawkApp::init()
#ifndef TOUCHMAHAWK #ifndef TOUCHMAHAWK
m_mainwindow->show(); m_mainwindow->show();
#else #else
m_declarativeWindow = new TomahawkWindowDeclarative(); m_declarativeWindow = new TomahawkTouchWindow();
m_declarativeWindow->setWindowTitle( "Touch-ma-hawk" ); m_declarativeWindow->setWindowTitle( "Touch-ma-hawk" );
m_declarativeWindow->show(); m_declarativeWindow->show();
#endif // TOUCHMAHAWK #endif // TOUCHMAHAWK

View File

@@ -70,7 +70,7 @@ class AudioControls;
#endif #endif
#ifdef TOUCHMAHAWK #ifdef TOUCHMAHAWK
class TomahawkWindowDeclarative; class TomahawkTouchWindow;
#endif #endif
@@ -97,7 +97,7 @@ public:
#endif #endif
#ifdef TOUCHMAHAWK #ifdef TOUCHMAHAWK
TomahawkWindowDeclarative* declarativeWindow() const { return m_declarativeWindow; } TomahawkTouchWindow* declarativeWindow() const { return m_declarativeWindow; }
#endif #endif
void enableScriptResolver( const QString& scriptPath ); void enableScriptResolver( const QString& scriptPath );
@@ -150,7 +150,7 @@ private:
#endif #endif
#ifdef TOUCHMAHAWK #ifdef TOUCHMAHAWK
TomahawkWindowDeclarative* m_declarativeWindow; TomahawkTouchWindow* m_declarativeWindow;
#endif #endif
bool m_headless; bool m_headless;