1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-19 04:11:46 +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" )
SET( touchmahawkHeaders
active/tomahawkwindowdeclarative.h
active/tomahawktouchwindow.h
)
SET( touchmahawkSources
${touchmahawkSources}
active/tomahawkwindowdeclarative.cpp
active/tomahawktouchwindow.cpp
# active/main.cpp
)

View File

@@ -16,7 +16,7 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "active/tomahawkwindowdeclarative.h"
#include "active/tomahawktouchwindow.h"
#include "utils/logger.h"
#include "audio/audioengine.h"
@@ -27,7 +27,7 @@
#define QMLGUI "/home/domme/dev/sources/tomahawk-qml"
TomahawkWindowDeclarative::TomahawkWindowDeclarative()
TomahawkTouchWindow::TomahawkTouchWindow()
: m_view(0)
{
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
TomahawkWindowDeclarative::loadQml()
TomahawkTouchWindow::loadQml()
{
tLog() << Q_FUNC_INFO;
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/>.
*/
#ifndef TOMAHAWKWINDOWDECLARATIVE_H
#define TOMAHAWKWINDOWDECLARATIVE_H
#ifndef TOMAHAWKTOUCHWINDOW_H
#define TOMAHAWKTOUCHWINDOW_H
#include "tomahawkwindow.h"
#include <QtDeclarative>
#include <QMainWindow>
class TomahawkWindowDeclarative;
class TomahawkTouchWindow;
class QFileSystemWatcher;
class TomahawkWindowDeclarative : public QMainWindow
class TomahawkTouchWindow : public TomahawkWindow
{
Q_OBJECT
public:
TomahawkWindowDeclarative();
~TomahawkWindowDeclarative();
TomahawkTouchWindow();
~TomahawkTouchWindow();
public slots:
void play( const QModelIndex& index );
// protected:
// void changeEvent( QEvent* e );
// void closeEvent( QCloseEvent* e );
// void showEvent( QShowEvent* e );
// void hideEvent( QHideEvent* e );
private slots:
void loadQml();
@@ -52,5 +46,5 @@ private:
};
#endif // TOMAHAWKWINDOWDECLARATIVE_H
#endif // TOMAHAWKTOUCHWINDOW_H

View File

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

View File

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