1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 21:27:58 +02:00

None of this works, but maybe it's a start since Qt directly isn't

working
This commit is contained in:
Jeff Mitchell
2011-08-26 18:40:19 -04:00
parent 65a50c5a85
commit fc2de7721a
4 changed files with 38 additions and 12 deletions

View File

@@ -72,6 +72,10 @@ ELSE()
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" ) LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" )
ENDIF() ENDIF()
IF( BUILD_GUI AND UNIX AND NOT APPLE )
FIND_PACKAGE( X11 )
ENDIF()
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} ) macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether \n the qtwebkit-devel package is installed as well") macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether \n the qtwebkit-devel package is installed as well")

View File

@@ -426,6 +426,10 @@ IF( UNIX AND NOT APPLE )
infosystem/infoplugins/unix/mprispluginplayeradaptor.h infosystem/infoplugins/unix/mprispluginplayeradaptor.h
infosystem/infoplugins/unix/mprisplugin.h infosystem/infoplugins/unix/mprisplugin.h
infosystem/infoplugins/unix/fdonotifyplugin.h ) infosystem/infoplugins/unix/fdonotifyplugin.h )
IF( BUILD_GUI AND X11_FOUND )
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${X11_LIBRARIES} )
ENDIF()
ENDIF( UNIX AND NOT APPLE ) ENDIF( UNIX AND NOT APPLE )
IF( WIN32 ) IF( WIN32 )

View File

@@ -42,12 +42,12 @@
#ifndef TOMAHAWK_HEADLESS #ifndef TOMAHAWK_HEADLESS
#include <QtGui/QApplication> #include <QtGui/QApplication>
#if defined(Q_WS_X11) #include <QtGui/QWidget>
#include "tomahawkapp.h"
#include "tomahawkwindow.h" #ifdef Q_WS_X11
#elif defined(Q_WS_WIN) extern "C" {
#include "tomahawkapp.h" #include <X11/Xlib.h>
#include "tomahawkwindow.h" }
#endif #endif
#endif #endif
@@ -519,12 +519,30 @@ setNam( QNetworkAccessManager* nam )
s_nam = QWeakPointer< QNetworkAccessManager >( nam ); s_nam = QWeakPointer< QNetworkAccessManager >( nam );
} }
#ifndef TOMAHAWK_HEADLESS #ifndef TOMAHAWK_HEADLESS
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
void void
bringToFront() bringToFront()
{ {
qDebug() << Q_FUNC_INFO;
QWidgetList widgetList = qApp->topLevelWidgets();
int i = 0;
while( !widgetList.at( i )->isWindow() )
i++;
QWidget *widget = widgetList.at( i );
WId winId = widget->winId();
Display *display = XOpenDisplay( NULL );
if ( !display )
{
qDebug() << Q_FUNC_INFO << "Could not find display to raise";
return;
}
XRaiseWindow( display, winId );
XSetInputFocus( display, winId, RevertToNone, CurrentTime );
//widget->activateWindow();
//widget->raise();
} }
#elif defined(Q_WS_WIN) #elif defined(Q_WS_WIN)
void void

View File

@@ -21,11 +21,11 @@
#include "dllmacro.h" #include "dllmacro.h"
#include <QObject> #include <QtCore/QObject>
#include <QThread> #include <QtCore/QThread>
#include <QNetworkProxy> #include <QtNetwork/QNetworkProxy>
#include <QStringList> #include <QtCore/QStringList>
#include <QRect> #include <QtCore/QRect>
#define RESPATH ":/data/" #define RESPATH ":/data/"