--- qsampler/trunk/src/qsampler.h 2019/03/10 07:38:26 3495 +++ qsampler/trunk/src/qsampler.h 2019/03/10 11:06:53 3496 @@ -41,19 +41,19 @@ class QWidget; class QTranslator; -#ifdef CONFIG_X11 +#if QT_VERSION < 0x050000 #ifdef CONFIG_XUNIQUE - +#ifdef CONFIG_X11 #include - typedef unsigned long Window; typedef unsigned long Atom; - -#if QT_VERSION >= 0x050100 -class qsamplerXcbEventFilter; -#endif - -#endif +#endif // CONFIG_X11 +#endif // CONFIG_XUNIQUE +#else +#ifdef CONFIG_XUNIQUE +class QSharedMemory; +class QLocalServer; +#endif // CONFIG_XUNIQUE #endif @@ -63,6 +63,8 @@ class qsamplerApplication : public QApplication { + Q_OBJECT + public: // Constructor. @@ -80,11 +82,21 @@ // and raise its proper main widget... bool setup(); -#ifdef CONFIG_X11 +#if QT_VERSION < 0x050000 #ifdef CONFIG_XUNIQUE +#ifdef CONFIG_X11 void x11PropertyNotify(Window w); -#endif // CONFIG_XUNIQUE + bool x11EventFilter(XEvent *pEv) #endif // CONFIG_X11 +#endif // CONFIG_XUNIQUE +#else +#ifdef CONFIG_XUNIQUE +protected slots: + // Local server slots. + void newConnectionSlot(); + void readyReadSlot(); +#endif // CONFIG_XUNIQUE +#endif private: @@ -95,16 +107,21 @@ // Instance variables. QWidget *m_pWidget; -#ifdef CONFIG_X11 +#if QT_VERSION < 0x050000 #ifdef CONFIG_XUNIQUE +#ifdef CONFIG_X11 Display *m_pDisplay; Atom m_aUnique; Window m_wOwner; -#if QT_VERSION >= 0x050100 - qsamplerXcbEventFilter *m_pXcbEventFilter; -#endif -#endif // CONFIG_XUNIQUE #endif // CONFIG_X11 +#endif // CONFIG_XUNIQUE +#else +#ifdef CONFIG_XUNIQUE + QString m_sUnique; + QSharedMemory *m_pMemory; + QLocalServer *m_pServer; +#endif // CONFIG_XUNIQUE +#endif };