Add support for a number of new complex controls

r14.0.x
Timothy Pearson 13 years ago
parent 7506cadc8d
commit de9aa98284

@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: styleplugin
# Generated by qmake (2.01a) (Qt 4.7.0) on: Sat Mar 10 16:06:16 2012
# Generated by qmake (2.01a) (Qt 4.7.4) on: Tue Mar 6 12:52:20 2012
# Project: styleplugin.pro
# Template: subdirs
# Command: /usr/bin/qmake-qt4 -o Makefile styleplugin.pro
@ -31,10 +31,10 @@ SUBTARGETS = \
stylewindow//$(MAKEFILE):
@$(CHK_DIR_EXISTS) stylewindow/ || $(MKDIR) stylewindow/
cd stylewindow/ && $(QMAKE) /home/eldarion/experimental/qt4-tqt-theme-engine/stylewindow/stylewindow.pro -o $(MAKEFILE)
cd stylewindow/ && $(QMAKE) /root/tdeqt4styleplugin/stylewindow/stylewindow.pro -o $(MAKEFILE)
sub-stylewindow-qmake_all: FORCE
@$(CHK_DIR_EXISTS) stylewindow/ || $(MKDIR) stylewindow/
cd stylewindow/ && $(QMAKE) /home/eldarion/experimental/qt4-tqt-theme-engine/stylewindow/stylewindow.pro -o $(MAKEFILE)
cd stylewindow/ && $(QMAKE) /root/tdeqt4styleplugin/stylewindow/stylewindow.pro -o $(MAKEFILE)
sub-stylewindow: stylewindow//$(MAKEFILE) FORCE
cd stylewindow/ && $(MAKE) -f $(MAKEFILE)
sub-stylewindow-make_default: stylewindow//$(MAKEFILE) FORCE
@ -53,10 +53,10 @@ sub-stylewindow-uninstall_subtargets: stylewindow//$(MAKEFILE) FORCE
cd stylewindow/ && $(MAKE) -f $(MAKEFILE) uninstall
plugin//$(MAKEFILE):
@$(CHK_DIR_EXISTS) plugin/ || $(MKDIR) plugin/
cd plugin/ && $(QMAKE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/plugin.pro -o $(MAKEFILE)
cd plugin/ && $(QMAKE) /root/tdeqt4styleplugin/plugin/plugin.pro -o $(MAKEFILE)
sub-plugin-qmake_all: FORCE
@$(CHK_DIR_EXISTS) plugin/ || $(MKDIR) plugin/
cd plugin/ && $(QMAKE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/plugin.pro -o $(MAKEFILE)
cd plugin/ && $(QMAKE) /root/tdeqt4styleplugin/plugin/plugin.pro -o $(MAKEFILE)
sub-plugin: plugin//$(MAKEFILE) FORCE
cd plugin/ && $(MAKE) -f $(MAKEFILE)
sub-plugin-make_default: plugin//$(MAKEFILE) FORCE
@ -75,10 +75,10 @@ sub-plugin-uninstall_subtargets: plugin//$(MAKEFILE) FORCE
cd plugin/ && $(MAKE) -f $(MAKEFILE) uninstall
unstyledwindow//$(MAKEFILE):
@$(CHK_DIR_EXISTS) unstyledwindow/ || $(MKDIR) unstyledwindow/
cd unstyledwindow/ && $(QMAKE) /home/eldarion/experimental/qt4-tqt-theme-engine/unstyledwindow/unstyledwindow.pro -o $(MAKEFILE)
cd unstyledwindow/ && $(QMAKE) /root/tdeqt4styleplugin/unstyledwindow/unstyledwindow.pro -o $(MAKEFILE)
sub-unstyledwindow-qmake_all: FORCE
@$(CHK_DIR_EXISTS) unstyledwindow/ || $(MKDIR) unstyledwindow/
cd unstyledwindow/ && $(QMAKE) /home/eldarion/experimental/qt4-tqt-theme-engine/unstyledwindow/unstyledwindow.pro -o $(MAKEFILE)
cd unstyledwindow/ && $(QMAKE) /root/tdeqt4styleplugin/unstyledwindow/unstyledwindow.pro -o $(MAKEFILE)
sub-unstyledwindow: unstyledwindow//$(MAKEFILE) FORCE
cd unstyledwindow/ && $(MAKE) -f $(MAKEFILE)
sub-unstyledwindow-make_default: unstyledwindow//$(MAKEFILE) FORCE
@ -100,6 +100,7 @@ Makefile: styleplugin.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/shar
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
@ -120,6 +121,7 @@ Makefile: styleplugin.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/shar
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
@ -162,7 +164,7 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
install_sources: FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/styleplugin.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/styleplugin.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/
uninstall_sources: FORCE

@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: libsimplestyleplugin.so
# Generated by qmake (2.01a) (Qt 4.7.0) on: Sat Mar 10 16:06:19 2012
# Generated by qmake (2.01a) (Qt 4.7.4) on: Tue Mar 13 13:25:48 2012
# Project: plugin.pro
# Template: lib
# Command: /usr/bin/qmake-qt4 -o Makefile plugin.pro
@ -10,13 +10,13 @@
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/tqt3 -I/usr/include/tqt -I/opt/trinity/include -I.
LINK = g++
LFLAGS = -Wl,-O1 -shared
LIBS = $(SUBLIBS) -L/usr/lib -L/usr/lib -ltqt -ltqt-mt -L /opt/trinity/lib -lDCOP -ltdecore -lQtGui -lQtCore -lpthread
LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -L/usr/lib -ltqt -ltqt-mt -L /opt/trinity/lib -lDCOP -ltdecore -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake-qt4
@ -56,6 +56,7 @@ DIST = /usr/share/qt4/mkspecs/common/g++.conf \
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
@ -113,6 +114,7 @@ Makefile: plugin.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
@ -128,13 +130,15 @@ Makefile: plugin.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
/usr/lib/libQtGui.prl \
/usr/lib/libQtCore.prl
/usr/lib/libtqt-mt.prl \
/usr/lib/i386-linux-gnu/libQtGui.prl \
/usr/lib/i386-linux-gnu/libQtCore.prl
$(QMAKE) -o Makefile plugin.pro
/usr/share/qt4/mkspecs/common/g++.conf:
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
@ -150,8 +154,9 @@ Makefile: plugin.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/libQtGui.prl:
/usr/lib/libQtCore.prl:
/usr/lib/libtqt-mt.prl:
/usr/lib/i386-linux-gnu/libQtGui.prl:
/usr/lib/i386-linux-gnu/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -o Makefile plugin.pro
@ -232,24 +237,24 @@ moc_simplestyleplugin.o: moc_simplestyleplugin.cpp
####### Install
install_target: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/styles/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/styles/
-$(INSTALL_PROGRAM) "../styles/$(TARGET)" "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/styles/$(TARGET)"
-$(STRIP) --strip-unneeded "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/styles/$(TARGET)"
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/i386-linux-gnu/qt4/plugins/styles/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/i386-linux-gnu/qt4/plugins/styles/
-$(INSTALL_PROGRAM) "../styles/$(TARGET)" "$(INSTALL_ROOT)/usr/lib/i386-linux-gnu/qt4/plugins/styles/$(TARGET)"
-$(STRIP) --strip-unneeded "$(INSTALL_ROOT)/usr/lib/i386-linux-gnu/qt4/plugins/styles/$(TARGET)"
uninstall_target: FORCE
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/styles/$(TARGET)"
-$(DEL_DIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/styles/
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/lib/i386-linux-gnu/qt4/plugins/styles/$(TARGET)"
-$(DEL_DIR) $(INSTALL_ROOT)/usr/lib/i386-linux-gnu/qt4/plugins/styles/
install_sources: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/simplestyle.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/simplestyleplugin.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/tdeqt4painter.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/simplestyle.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/simplestyleplugin.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/tdeqt4painter.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/plugin/plugin.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/plugin/simplestyle.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/plugin/simplestyleplugin.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/plugin/tdeqt4painter.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/plugin/simplestyle.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/plugin/simplestyleplugin.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/plugin/tdeqt4painter.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/plugin/plugin.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/plugin/
uninstall_sources: FORCE

@ -18,7 +18,8 @@ LIBS += -L/usr/lib -ltqt -ltqt-mt -L /opt/trinity/lib -lDCOP -ltdecore
DESTDIR = ../styles/
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/styles
# target.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/styles
target.path = $$[QT_INSTALL_PLUGINS]/styles
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/tools/styleplugin/plugin
INSTALLS += target sources

@ -27,7 +27,12 @@
#include <tqpopupmenu.h>
#include <tqmenudata.h>
#include <tqcombobox.h>
#include <tqslider.h>
#include <tqscrollbar.h>
#include <tqspinbox.h>
#include <tqiconset.h>
#include <tqmenubar.h>
#include <qtitlebar_p.h>
#undef Qt
#include <QtGui/QtGui>
@ -50,6 +55,50 @@
#define DEBUG_WARNINGS 1
// #define DEBUG_SPEW 1
inline TQt::Orientation convertQt4ToTQt3Orientation(Qt::Orientation qt4orient)
{
TQt::Orientation tqt3orient;
switch ( qt4orient ) {
case Qt::Horizontal:
tqt3orient = TQt::Horizontal;
break;
case Qt::Vertical:
tqt3orient = TQt::Vertical;
break;
}
return tqt3orient;
}
inline TQSlider::TickSetting convertQt4ToTQt3TickSetting(QSlider::TickPosition qt4ts)
{
TQSlider::TickSetting tqt3ts;
switch ( qt4ts ) {
case QSlider::NoTicks:
tqt3ts = TQSlider::NoMarks;
break;
case QSlider::TicksBothSides:
tqt3ts = TQSlider::Both;
break;
case QSlider::TicksAbove:
tqt3ts = TQSlider::Above;
break;
case QSlider::TicksBelow:
tqt3ts = TQSlider::Below;
break;
// case QSlider::TicksLeft:
// tqt3ts = TQSlider::Left;
// break;
// case QSlider::TicksRight:
// tqt3ts = TQSlider::Right;
// break;
}
return tqt3ts;
}
inline QColor convertTQt3ToQt4Color(TQColor tqt3color)
{
return QColor(tqt3color.red(), tqt3color.green(), tqt3color.blue());
@ -422,7 +471,7 @@ inline TQStyle::SFlags convertQt4ToTQt3SFlags(QStyle::State qt4stateflags, TQt3W
TQStyle::SFlags sflags = 0;
if (qt4stateflags & QStyle::State_Active) {
if (wt != TQT3WT_TQPopupMenu) {
if ((wt != TQT3WT_TQPopupMenu) && (wt != TQT3WT_TQMenuBar)) {
sflags = sflags | TQStyle::Style_Active;
}
}
@ -472,7 +521,7 @@ inline TQStyle::SFlags convertQt4ToTQt3SFlags(QStyle::State qt4stateflags, TQt3W
// sflags = sflags | TQStyle::;
// }
if (qt4stateflags & QStyle::State_Selected) {
if (wt == TQT3WT_TQPopupMenu) {
if ((wt == TQT3WT_TQPopupMenu) || (wt == TQT3WT_TQMenuBar)) {
sflags = sflags | TQStyle::Style_Active;
}
sflags = sflags | TQStyle::Style_Selected;
@ -487,6 +536,9 @@ inline TQStyle::SFlags convertQt4ToTQt3SFlags(QStyle::State qt4stateflags, TQt3W
// sflags = sflags | TQStyle::;
// }
if (qt4stateflags & QStyle::State_Sunken) {
if ((wt == TQT3WT_TQPopupMenu) || (wt == TQT3WT_TQMenuBar)) {
sflags = sflags | TQStyle::Style_Down;
}
sflags = sflags | TQStyle::Style_Sunken;
}
if (qt4stateflags & QStyle::State_UpArrow) {
@ -502,6 +554,9 @@ inline TQStyle::SFlags convertQt4ToTQt3SFlags(QStyle::State qt4stateflags, TQt3W
return sflags;
}
#define NO_QT3_EQUIVALENT can_override = false;
#define DO_NOT_DRAW can_override = false; do_not_draw = true;
SimpleStyle::SimpleStyle()
{
#ifdef INTEGRATE_WITH_TDE
@ -541,11 +596,18 @@ SimpleStyle::SimpleStyle()
// Create interface widgets
m_tqt3parent_widget = new TQWidget();
m_tqt3generic_widget = new TQWidget(m_tqt3parent_widget);
m_tqt3progressbar_widget = new TQProgressBar(m_tqt3parent_widget);
m_tqt3tabbar_widget = new TQTabBar(m_tqt3parent_widget);
m_tqt3radiobutton_widget = new TQRadioButton(m_tqt3parent_widget);
m_tqt3popupmenu_widget = new TQPopupMenu(m_tqt3parent_widget);
m_tqt3combobox_widget = new TQComboBox(m_tqt3parent_widget);
m_tqt3slider_widget = new TQSlider(m_tqt3parent_widget);
m_tqt3scrollbar_widget = new TQScrollBar(m_tqt3parent_widget);
m_tqt3spinbox_widget = new TQSpinBox(m_tqt3parent_widget);
m_tqt3window_widget = new TQWidget(m_tqt3parent_widget);
m_tqt3titlebar_widget = new TQTitleBar(m_tqt3window_widget, m_tqt3parent_widget);
m_tqt3menubar_widget = new TQMenuBar(m_tqt3parent_widget);
}
SimpleStyle::~SimpleStyle()
@ -554,11 +616,18 @@ SimpleStyle::~SimpleStyle()
// Delete interface widgets
// Widgets are deleted when their parent is deleted...these lines will cause a crash on exit
// delete m_tqt3generic_widget;
// delete m_tqt3progressbar_widget;
// delete m_tqt3tabbar_widget;
// delete m_tqt3radiobutton_widget;
// delete m_tqt3popupmenu_widget;
// delete m_tqt3combobox_widget;
// delete m_tqt3slider_widget;
// delete m_tqt3scrollbar_widget;
// delete m_tqt3spinbox_widget;
// delete m_tqt3window_widget;
// delete m_tqt3titlebar_widget;
// delete m_tqt3menubar_widget;
// FIXME
// Verify I'm not leaking memory like a sieve when this is commented out!!!
@ -599,7 +668,7 @@ bool SimpleStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
QWidget* widget = static_cast<QWidget*>(obj);
QWidget* widget = dynamic_cast<QWidget*>(obj);
if ((ev->type() == QEvent::FocusIn) || (ev->type() == QEvent::FocusOut)
|| (ev->type() == QEvent::Enter) || (ev->type() == QEvent::Leave) || (ev->type() == QEvent::Wheel)) {
@ -681,14 +750,10 @@ int SimpleStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const
// tqt3pixelmetric = TQStyle::PM_ComboBoxFrameWidth;
// retswitch = 1;
// break;
case QStyle::PM_MDIFrameWidth:
case QStyle::PM_MdiSubWindowFrameWidth:
tqt3pixelmetric = TQStyle::PM_MDIFrameWidth;
retswitch = 1;
break;
// case QStyle::PM_MdiSubWindowFrameWidth:
// tqt3pixelmetric = TQStyle::PM_MdiSubWindowFrameWidth;
// retswitch = 1;
// break;
case QStyle::PM_MDIMinimizedWidth:
tqt3pixelmetric = TQStyle::PM_MDIMinimizedWidth;
retswitch = 1;
@ -697,30 +762,30 @@ int SimpleStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const
// tqt3pixelmetric = TQStyle::PM_MdiSubWindowMinimizedWidth;
// retswitch = 1;
// break;
case QStyle::PM_LayoutLeftMargin:
retval = 0;
retswitch = 2;
break;
case QStyle::PM_LayoutTopMargin:
retval = 0;
retswitch = 2;
break;
case QStyle::PM_LayoutRightMargin:
retval = 0;
retswitch = 2;
break;
case QStyle::PM_LayoutBottomMargin:
retval = 0;
retswitch = 2;
break;
case QStyle::PM_LayoutHorizontalSpacing:
retval = 0;
retswitch = 2;
break;
case QStyle::PM_LayoutVerticalSpacing:
retval = 0;
retswitch = 2;
break;
// case QStyle::PM_LayoutLeftMargin:
// retval = 0;
// retswitch = 2;
// break;
// case QStyle::PM_LayoutTopMargin:
// retval = 0;
// retswitch = 2;
// break;
// case QStyle::PM_LayoutRightMargin:
// retval = 0;
// retswitch = 2;
// break;
// case QStyle::PM_LayoutBottomMargin:
// retval = 0;
// retswitch = 2;
// break;
// case QStyle::PM_LayoutHorizontalSpacing:
// retval = 0;
// retswitch = 2;
// break;
// case QStyle::PM_LayoutVerticalSpacing:
// retval = 0;
// retswitch = 2;
// break;
case QStyle::PM_MaximumDragDistance:
tqt3pixelmetric = TQStyle::PM_MaximumDragDistance;
retswitch = 1;
@ -859,6 +924,10 @@ int SimpleStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const
break;
case QStyle::PM_TitleBarHeight:
tqt3pixelmetric = TQStyle::PM_TitleBarHeight;
if (opt) {
m_tqt3generic_widget->setGeometry(0, 0, opt->rect.width(), opt->rect.height());
interfaceWidget = m_tqt3generic_widget;
}
retswitch = 1;
break;
case QStyle::PM_IndicatorWidth:
@ -881,14 +950,14 @@ int SimpleStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const
// retval = 0;
// retswitch = 2;
// break;
case QStyle::PM_MenuHMargin:
retval = 0;
retswitch = 2;
break;
case QStyle::PM_MenuVMargin:
retval = 0;
retswitch = 2;
break;
// case QStyle::PM_MenuHMargin:
// retval = 0;
// retswitch = 2;
// break;
// case QStyle::PM_MenuVMargin:
// retval = 0;
// retswitch = 2;
// break;
// case QStyle::PM_MenuScrollerHeight:
// tqt3pixelmetric = TQStyle::PM_MenuScrollerHeight;
// retswitch = 1;
@ -1006,21 +1075,28 @@ int SimpleStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const
if (retswitch == 1) {
retval = tqApp->style().pixelMetric(tqt3pixelmetric, interfaceWidget);
// HACK
// For some reason Qt4 tacks on a pixel to this by default
// FIXME
// Figure out why!
if (tqt3pixelmetric == TQStyle::PM_TabBarTabVSpace) {
retval = retval - 1;
}
}
else {
if (retswitch == 2) {
// retval was already set
}
else {
// if (retswitch == 2) {
// // retval was already set
// }
// else {
// Tell Qt4 to get the information
retval = QCommonStyle::pixelMetric(metric, opt, w);
// }
}
}
return retval;
}
TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidget* w) const
TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidget* w, const QStyleOption* qt4styleoptions) const
{
int i;
TQWidget* interfaceWidget = 0;
@ -1031,14 +1107,23 @@ TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
const QMenu* qt4menu_widget = 0;
const QProgressBar* qt4progressbar_widget = 0;
const QComboBox* qt4combobox_widget = 0;
const QSlider* qt4slider_widget = 0;
const QScrollBar* qt4scrollbar_widget = 0;
const QSpinBox* qt4spinbox_widget = 0;
const QMenuBar* qt4menubar_widget = 0;
const QStyleOptionTitleBar* qt4titlebar_options = 0;
TQTabBar::Shape tqt3tbshape = TQTabBar::RoundedAbove;
QList<QAction*> qt4menuactions;
QAction* currentAction;
switch (wt) {
case TQT3WT_TQProgressBar:
interfaceWidget = m_tqt3progressbar_widget;
// Copy over all widget attributes
qt4progressbar_widget = static_cast<const QProgressBar*>(w);
qt4progressbar_widget = dynamic_cast<const QProgressBar*>(w);
m_tqt3progressbar_widget->setGeometry(0, 0, qt4progressbar_widget->width(), qt4progressbar_widget->height());
m_tqt3progressbar_widget->setProgress(qt4progressbar_widget->value()-qt4progressbar_widget->minimum(),qt4progressbar_widget->maximum()-qt4progressbar_widget->minimum());
if (qt4progressbar_widget->orientation() != Qt::Horizontal) {
@ -1052,7 +1137,8 @@ TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
case TQT3WT_TQTabBar:
interfaceWidget = m_tqt3tabbar_widget;
// Copy over all widget attributes
qt4tabbar_widget = static_cast<const QTabBar*>(w);
qt4tabbar_widget = dynamic_cast<const QTabBar*>(w);
if (qt4tabbar_widget) {
m_tqt3tabbar_widget->setGeometry(0, 0, qt4tabbar_widget->width(), qt4tabbar_widget->height());
// Clear out tabbar
for (i=0;i<m_tqt3tabbar_widget->count();i++) {
@ -1093,11 +1179,18 @@ TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
#endif
}
m_tqt3tabbar_widget->setShape(tqt3tbshape);
}
else {
#ifdef DEBUG_WARNINGS
printf("Unable to draw Qt4 tabbar with no Qt4 object available\n\r"); fflush(stdout);
interfaceWidget = 0;
#endif
}
break;
case TQT3WT_TQRadioButton:
interfaceWidget = m_tqt3radiobutton_widget;
// Copy over all widget attributes
qt4radiobutton_widget = static_cast<const QRadioButton*>(w);
qt4radiobutton_widget = dynamic_cast<const QRadioButton*>(w);
m_tqt3radiobutton_widget->setGeometry(0, 0, qt4radiobutton_widget->width(), qt4radiobutton_widget->height());
m_tqt3radiobutton_widget->setText(convertQt4ToTQt3String(qt4radiobutton_widget->text()));
m_tqt3radiobutton_widget->setDown(qt4radiobutton_widget->isDown());
@ -1105,7 +1198,7 @@ TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
case TQT3WT_TQComboBox:
interfaceWidget = m_tqt3combobox_widget;
// Copy over all widget attributes
qt4combobox_widget = static_cast<const QComboBox*>(w);
qt4combobox_widget = dynamic_cast<const QComboBox*>(w);
m_tqt3combobox_widget->setGeometry(0, 0, qt4combobox_widget->width(), qt4combobox_widget->height());
// Clear out all combobox items
m_tqt3combobox_widget->clear();
@ -1123,14 +1216,14 @@ TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
case TQT3WT_TQPopupMenu:
interfaceWidget = m_tqt3popupmenu_widget;
// Copy over all widget attributes
qt4menu_widget = static_cast<const QMenu*>(w);
qt4menu_widget = dynamic_cast<const QMenu*>(w);
m_tqt3popupmenu_widget->setGeometry(0, 0, qt4menu_widget->width(), qt4menu_widget->height());
// Clear out menu
m_tqt3popupmenu_widget->clear();
m_tqt3popupmenu_widget->setCheckable(false);
// Copy over all menu items
QList<QAction*> qt4menuactions = qt4menu_widget->actions();
QAction* currentAction = 0;
qt4menuactions = qt4menu_widget->actions();
currentAction = 0;
for (i=0; i<qt4menuactions.size();++i) {
currentAction = qt4menuactions.at(i);
if (currentAction) {
@ -1156,6 +1249,109 @@ TQWidget* SimpleStyle::initializeInterfaceWidget(TQt3WidgetType wt, const QWidge
}
}
break;
case TQT3WT_TQMenuBar:
interfaceWidget = m_tqt3menubar_widget;
// Copy over all widget attributes
qt4menubar_widget = dynamic_cast<const QMenuBar*>(w);
m_tqt3menubar_widget->setGeometry(0, 0, qt4menubar_widget->width(), qt4menubar_widget->height());
// Clear out menu
m_tqt3menubar_widget->clear();
// Copy over all menu items
qt4menuactions = qt4menubar_widget->actions();
currentAction = 0;
for (i=0; i<qt4menuactions.size();++i) {
currentAction = qt4menuactions.at(i);
if (currentAction) {
if (currentAction->isSeparator()) {
m_tqt3menubar_widget->insertSeparator(i);
}
else {
if (currentAction->icon().isNull()) {
m_tqt3menubar_widget->insertItem(convertQt4ToTQt3String(currentAction->text()), i, i);
}
else {
m_tqt3menubar_widget->insertItem(convertQt4ToTQt3IconSet(currentAction->icon()), convertQt4ToTQt3String(currentAction->text()), i, i);
}
// FIXME
// Handle pixmaps, etc.
}
m_tqt3menubar_widget->setItemEnabled(i, currentAction->isEnabled());
m_tqt3menubar_widget->setItemChecked(i, currentAction->isChecked());
m_tqt3menubar_widget->setItemVisible(i, currentAction->isVisible());
}
}
break;
case TQT3WT_TQSlider:
interfaceWidget = m_tqt3slider_widget;
// Copy over all widget attributes
qt4slider_widget = dynamic_cast<const QSlider*>(w);
if (qt4slider_widget) {
m_tqt3slider_widget->setGeometry(0, 0, qt4slider_widget->width(), qt4slider_widget->height());
m_tqt3slider_widget->setOrientation(convertQt4ToTQt3Orientation(qt4slider_widget->orientation()));
m_tqt3slider_widget->setTracking(qt4slider_widget->hasTracking());
// m_tqt3slider_widget->setPalette(); // FIXME
m_tqt3slider_widget->setTickmarks(convertQt4ToTQt3TickSetting(qt4slider_widget->tickPosition()));
m_tqt3slider_widget->setTickInterval(qt4slider_widget->tickInterval());
m_tqt3slider_widget->setMinValue(qt4slider_widget->minimum());
m_tqt3slider_widget->setMaxValue(qt4slider_widget->maximum());
m_tqt3slider_widget->setLineStep(qt4slider_widget->singleStep());
m_tqt3slider_widget->setPageStep(qt4slider_widget->pageStep());
m_tqt3slider_widget->setValue(qt4slider_widget->value());
}
else {
#ifdef DEBUG_WARNINGS
printf("Unable to draw Qt4 slider with no Qt4 object available\n\r"); fflush(stdout);
interfaceWidget = 0;
#endif
}
break;
case TQT3WT_TQScrollBar:
interfaceWidget = m_tqt3scrollbar_widget;
// Copy over all widget attributes
qt4scrollbar_widget = dynamic_cast<const QScrollBar*>(w);
if (qt4scrollbar_widget) {
m_tqt3scrollbar_widget->setGeometry(0, 0, qt4scrollbar_widget->width(), qt4scrollbar_widget->height());
m_tqt3scrollbar_widget->setOrientation(convertQt4ToTQt3Orientation(qt4scrollbar_widget->orientation()));
m_tqt3scrollbar_widget->setTracking(qt4scrollbar_widget->hasTracking());
m_tqt3scrollbar_widget->setMinValue(qt4scrollbar_widget->minimum());
m_tqt3scrollbar_widget->setMaxValue(qt4scrollbar_widget->maximum());
m_tqt3scrollbar_widget->setLineStep(qt4scrollbar_widget->singleStep());
m_tqt3scrollbar_widget->setPageStep(qt4scrollbar_widget->pageStep());
m_tqt3scrollbar_widget->setValue(qt4scrollbar_widget->value());
}
else {
#ifdef DEBUG_WARNINGS
printf("Unable to draw Qt4 scrollbar with no Qt4 object available\n\r"); fflush(stdout);
interfaceWidget = 0;
#endif
}
break;
case TQT3WT_TQSpinBox:
interfaceWidget = m_tqt3spinbox_widget;
// Copy over all widget attributes
qt4spinbox_widget = dynamic_cast<const QSpinBox*>(w);
if (qt4spinbox_widget) {
m_tqt3spinbox_widget->setGeometry(0, 0, qt4spinbox_widget->width(), qt4spinbox_widget->height());
m_tqt3spinbox_widget->setMinValue(qt4spinbox_widget->minimum());
m_tqt3spinbox_widget->setMaxValue(qt4spinbox_widget->maximum());
m_tqt3spinbox_widget->setLineStep(qt4spinbox_widget->singleStep());
m_tqt3spinbox_widget->setValue(qt4spinbox_widget->value());
}
else {
#ifdef DEBUG_WARNINGS
printf("Unable to draw Qt4 spinbox with no Qt4 object available\n\r"); fflush(stdout);
interfaceWidget = 0;
#endif
}
break;
case TQT3WT_TQTitleBar:
interfaceWidget = m_tqt3titlebar_widget;
qt4titlebar_options = static_cast<const QStyleOptionTitleBar*>(qt4styleoptions);
// Construct an internal TQTitleBar widget from the options and widget provided by Qt4
m_tqt3titlebar_widget->setGeometry(qt4styleoptions->rect.x(), qt4styleoptions->rect.y(), qt4styleoptions->rect.width(), qt4styleoptions->rect.height());
m_tqt3titlebar_widget->setCaption(convertQt4ToTQt3String(qt4titlebar_options->text));
m_tqt3titlebar_widget->setIcon(convertQt4ToTQt3Pixmap(qt4titlebar_options->icon));
m_tqt3titlebar_widget->setActive(qt4titlebar_options->titleBarState & Qt::WindowActive);
}
return interfaceWidget;
@ -1216,6 +1412,8 @@ void SimpleStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
TQWidget* interfaceWidget = 0;
TQStyleOption tqt3opt(TQStyleOption::Default);
TQRect tqt3rect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height());
// Determine the correct color group
sflags = convertQt4ToTQt3SFlags(opt->state, TQT3WT_NONE);
TQPalette tqt3palette = convertQt4ToTQt3Palette(opt->palette);
@ -1232,6 +1430,15 @@ void SimpleStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
tqt3colorgroup = tqt3palette.disabled();
}
const QStyleOptionTitleBar* tbopt;
bool drawCloseButton;
bool drawMaxButton;
bool drawMinButton;
bool drawNormalButton;
bool drawShadeButton;
bool drawUnshadeButton;
bool drawSysMenuButton;
switch (control) {
case CC_ComboBox:
tqtCC = TQStyle::CC_ComboBox;
@ -1240,6 +1447,120 @@ void SimpleStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
can_override = false;
}
break;
case CC_Slider:
tqtCC = TQStyle::CC_Slider;
interfaceWidget = initializeInterfaceWidget(TQT3WT_TQSlider, w);
if (interfaceWidget == 0) {
can_override = false;
}
break;
case CC_ScrollBar:
tqtCC = TQStyle::CC_ScrollBar;
interfaceWidget = initializeInterfaceWidget(TQT3WT_TQScrollBar, w);
if (interfaceWidget == 0) {
can_override = false;
}
break;
// case CC_SpinBox:
// // FIXME FIXME FIXME
// // This is more complex to interface with
// // Under TQt3 there is an internal SpinWidget, and the SpinBox draws the editor through another call
// // Under Qt4 there is only the SpinBox, and we would need to draw both the SpinWidget and the editor
// tqtCC = TQStyle::CC_SpinWidget;
// interfaceWidget = initializeInterfaceWidget(TQT3WT_TQSpinBox, w);
// if (interfaceWidget == 0) {
// can_override = false;
// }
// break;
case CC_TitleBar:
tqtCC = TQStyle::CC_TitleBar;
interfaceWidget = initializeInterfaceWidget(TQT3WT_TQTitleBar, w, opt);
if (interfaceWidget == 0) {
can_override = false;
}
else {
// Select subcontrol(s) to be drawn
// Qt4 made this hard again (surprise surprise)
tbopt = static_cast<const QStyleOptionTitleBar*>(opt);
// This logic is taken from Qt4 (qcommonstyle.cpp)
// It will need to be kept in sync with whatever Nokia does
drawCloseButton = (tbopt->subControls & SC_TitleBarCloseButton && tbopt->titleBarFlags & Qt::WindowSystemMenuHint);
drawMaxButton = (tbopt->subControls & SC_TitleBarMaxButton && tbopt->titleBarFlags & Qt::WindowMaximizeButtonHint && !(tbopt->titleBarState & Qt::WindowMaximized));
drawMinButton = (tbopt->subControls & SC_TitleBarMinButton && tbopt->titleBarFlags & Qt::WindowMinimizeButtonHint && !(tbopt->titleBarState & Qt::WindowMinimized));
drawNormalButton = (tbopt->subControls & SC_TitleBarNormalButton) && (((tbopt->titleBarFlags & Qt::WindowMinimizeButtonHint) && (tbopt->titleBarState & Qt::WindowMinimized)) || ((tbopt->titleBarFlags & Qt::WindowMaximizeButtonHint) && (tbopt->titleBarState & Qt::WindowMaximized)));
drawShadeButton = (tbopt->subControls & SC_TitleBarShadeButton && tbopt->titleBarFlags & Qt::WindowShadeButtonHint && !(tbopt->titleBarState & Qt::WindowMinimized));
drawUnshadeButton = (tbopt->subControls & SC_TitleBarUnshadeButton && tbopt->titleBarFlags & Qt::WindowShadeButtonHint && tbopt->titleBarState & Qt::WindowMinimized);
drawSysMenuButton = (tbopt->subControls & SC_TitleBarSysMenu && tbopt->titleBarFlags & Qt::WindowSystemMenuHint);
// End logic taken from Qt4
// FIXME
// TQt3 has no idea how to draw the restore button on a maximized window!!!
// This needs to be fixed in qcommonstyle.cpp drawComplexControl, case CC_TitleBar
// Once this is fixed in TQt3, the logic below needs to be updated
subControl = 0;
if (drawSysMenuButton) {
subControl = subControl | TQStyle::SC_TitleBarSysMenu;
}
if (drawMinButton) {
subControl = subControl | TQStyle::SC_TitleBarMinButton;
}
if (drawMaxButton) {
subControl = subControl | TQStyle::SC_TitleBarMaxButton;
}
if (drawCloseButton) {
subControl = subControl | TQStyle::SC_TitleBarCloseButton;
}
if (tbopt->subControls & SC_TitleBarLabel) {
subControl = subControl | TQStyle::SC_TitleBarLabel;
}
if (drawNormalButton && !(tbopt->titleBarState & Qt::WindowMaximized)) {
subControl = subControl | TQStyle::SC_TitleBarNormalButton;
}
if (drawShadeButton) {
subControl = subControl | TQStyle::SC_TitleBarShadeButton;
}
if (drawUnshadeButton) {
subControl = subControl | TQStyle::SC_TitleBarUnshadeButton;
}
// if (tbopt->subControls & SC_TitleBarContextHelpButton) {
// subControl = subControl | TQStyle::SC_TitleBarContextHelpButton;
// }
subControlActive = 0;
if (tbopt->activeSubControls & SC_TitleBarSysMenu) {
subControlActive = subControlActive | TQStyle::SC_TitleBarSysMenu;
}
if (tbopt->activeSubControls & SC_TitleBarMinButton) {
subControlActive = subControlActive | TQStyle::SC_TitleBarMinButton;
}
if (tbopt->activeSubControls & SC_TitleBarMaxButton) {
subControlActive = subControlActive | TQStyle::SC_TitleBarMaxButton;
}
if (tbopt->activeSubControls & SC_TitleBarCloseButton) {
subControlActive = subControlActive | TQStyle::SC_TitleBarCloseButton;
}
if (tbopt->activeSubControls & SC_TitleBarLabel) {
subControlActive = subControlActive | TQStyle::SC_TitleBarLabel;
}
if (tbopt->activeSubControls & SC_TitleBarNormalButton) {
subControlActive = subControlActive | TQStyle::SC_TitleBarNormalButton;
}
if (tbopt->activeSubControls & SC_TitleBarShadeButton) {
subControlActive = subControlActive | TQStyle::SC_TitleBarShadeButton;
}
if (tbopt->activeSubControls & SC_TitleBarUnshadeButton) {
subControlActive = subControlActive | TQStyle::SC_TitleBarUnshadeButton;
}
// if (tbopt->activeSubControls & SC_TitleBarContextHelpButton) {
// subControlActive = subControlActive | TQStyle::SC_TitleBarContextHelpButton;
// }
}
break;
case CC_GroupBox:
NO_QT3_EQUIVALENT
break;
default:
#ifdef DEBUG_WARNINGS
printf("No rules to draw Qt4 complex control %d\n\r", control); fflush(stdout);
@ -1253,8 +1574,20 @@ void SimpleStyle::drawComplexControl(ComplexControl control, const QStyleOptionC
TQPainter tqtPainter(&qt4pd);
if (tqtCC == TQStyle::CC_TitleBar) {
// TQt3 is expecting to see a rect() from the titlebar that excludes the window frame,
// while Qt4 provides the entire rectangle (including the frame) via the widget/QStyleOptionTitleBar
// This is due to the fact that under TQt3 the titlebar is a correctly position widget,
// whereas under Qt4 the titlebar is part of the base widget itself.
// Compensate...
if (interfaceWidget) {
TQRect tbg = interfaceWidget->geometry();
tqtPainter.translate(tbg.x(), tbg.y());
}
}
// Instruct TQt3 to draw the complex control
tqApp->style().drawComplexControl(tqtCC, &tqtPainter, interfaceWidget, TQRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height()), tqt3colorgroup, sflags, subControl, subControlActive, tqt3opt);
tqApp->style().drawComplexControl(tqtCC, &tqtPainter, interfaceWidget, tqt3rect, tqt3colorgroup, sflags, subControl, subControlActive, tqt3opt);
tqtPainter.end();
@ -1356,7 +1689,7 @@ void SimpleStyle::drawControl(ControlElement element, const QStyleOption *opt, Q
// Qt4 makes this really, really hard...
// I have to guess based on the Qt4 position of the tab in the tab bar, which may or may not work 100% in all cases
drawingTab = 0;
estimated_tab_index = static_cast<const QTabBar*>(w)->tabAt(QPoint(opt->rect.x(), opt->rect.y()));
estimated_tab_index = dynamic_cast<const QTabBar*>(w)->tabAt(QPoint(opt->rect.x(), opt->rect.y()));
drawingTab = m_tqt3tabbar_widget->tabAt(estimated_tab_index);
if (drawingTab) {
@ -1375,6 +1708,13 @@ void SimpleStyle::drawControl(ControlElement element, const QStyleOption *opt, Q
if (tqt3tabwidth > 0) {
tqt3elementrect = TQRect(tqt3elementrect.x()-tqt3tabwidth, tqt3elementrect.y(), tqt3elementrect.width()+(tqt3tabwidth*1), tqt3elementrect.height());
}
if (drawingTab) {
if (drawingTab->identifier() == 0) {
// This is the first tab in the tab bar
// We will end up clipping on the left edge if the rectangle is not adjusted
tqt3elementrect = TQRect(tqt3elementrect.x()+tqt3tabwidth, tqt3elementrect.y(), tqt3elementrect.width()-(tqt3tabwidth*1), tqt3elementrect.height());
}
}
}
break;
#if 0
@ -1403,8 +1743,8 @@ void SimpleStyle::drawControl(ControlElement element, const QStyleOption *opt, Q
// Qt4 makes this really, really hard...
// I have to guess based on the Qt4 position of the item in the menu, which may or may not work 100% in all cases
drawingItem = 0;
drawingAction = static_cast<const QMenu*>(w)->actionAt(QPoint(opt->rect.x(), opt->rect.y()));
qt4menuactions = static_cast<const QMenu*>(w)->actions();
drawingAction = dynamic_cast<const QMenu*>(w)->actionAt(QPoint(opt->rect.x(), opt->rect.y()));
qt4menuactions = dynamic_cast<const QMenu*>(w)->actions();
for (i=0; i<qt4menuactions.size();++i) {
if (qt4menuactions.at(i) == drawingAction) {
drawingItem = m_tqt3popupmenu_widget->findItem(m_tqt3popupmenu_widget->idAt(i));
@ -1418,10 +1758,74 @@ void SimpleStyle::drawControl(ControlElement element, const QStyleOption *opt, Q
}
}
break;
case QStyle::CE_MenuBarItem:
tqtCE = TQStyle::CE_MenuBarItem;
sflags = convertQt4ToTQt3SFlags(opt->state, TQT3WT_TQMenuBar);
interfaceWidget = initializeInterfaceWidget(TQT3WT_TQMenuBar, w);
if (interfaceWidget == 0) {
can_override = false;
}
else {
// Convert the QStyleOption to the proper TQStyleOption
// In other words, figure out which TQt3 menu item is currently being drawn
// Qt4 makes this really, really hard...
// I have to guess based on the Qt4 position of the item in the menu, which may or may not work 100% in all cases
drawingItem = 0;
drawingAction = dynamic_cast<const QMenuBar*>(w)->actionAt(QPoint(opt->rect.x(), opt->rect.y()));
qt4menuactions = dynamic_cast<const QMenuBar*>(w)->actions();
for (i=0; i<qt4menuactions.size();++i) {
if (qt4menuactions.at(i) == drawingAction) {
drawingItem = m_tqt3menubar_widget->findItem(m_tqt3menubar_widget->idAt(i));
}
}
if (drawingItem) {
tqt3opt = TQStyleOption(drawingItem);
}
}
break;
case QStyle::CE_MenuBarEmptyArea:
tqtCE = TQStyle::CE_MenuBarEmptyArea;
break;
case QStyle::CE_MenuEmptyArea:
tqtCE = TQStyle::CE_MenuBarEmptyArea;
break;
case QStyle::CE_ShapedFrame:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_TabBarTabShape:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_ScrollBarAddLine:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_ScrollBarSubLine:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_ScrollBarAddPage:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_ScrollBarSubPage:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_ScrollBarSlider:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_ScrollBarFirst:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
case QStyle::CE_ScrollBarLast:
// Ignore request as Qt3 has no equivalent
can_override = false;
break;
default:
#ifdef DEBUG_WARNINGS
printf("No rules to draw Qt4 control %d\n\r", element); fflush(stdout);
@ -1435,6 +1839,12 @@ void SimpleStyle::drawControl(ControlElement element, const QStyleOption *opt, Q
TQPainter tqtPainter(&qt4pd);
if (element == QStyle::CE_TabBarTab) {
// CE_TabBarTab doesn't draw the base panel of the tab
tqt3tabwidth = tqApp->style().pixelMetric(TQStyle::PM_TabBarTabOverlap, interfaceWidget);
tqtPainter.fillRect(TQRect(tqt3elementrect.x()+tqt3tabwidth, tqt3elementrect.y(), tqt3elementrect.width()-(tqt3tabwidth*2), tqt3elementrect.height()), tqt3colorgroup.background());
}
// Instruct TQt3 to draw the control
// FIXME
// Implement sflags and QStyleOption
@ -1460,8 +1870,6 @@ void SimpleStyle::drawControl(ControlElement element, const QStyleOption *opt, Q
}
}
#define NO_QT3_EQUIVALENT can_override = false;
void SimpleStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const
{
// Construct a Qt3 paint device translator on the Qt4 painter
@ -1470,7 +1878,10 @@ void SimpleStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP
// Open a painter on the paint device translator
TQPainter tqtPainter(&qt4pd);
TQRect tqt3paintrect = TQRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height());
bool can_override = true;
bool do_not_draw = false;
TQStyle::PrimitiveElement tqtPE;
TQStyleOption tqt3opt(TQStyleOption::Default);
@ -1485,9 +1896,26 @@ void SimpleStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP
tqtPE = TQStyle::PE_PanelPopup;
tqt3opt = TQStyleOption(static_cast<const QStyleOptionFrame*>(opt)->lineWidth, static_cast<const QStyleOptionFrame*>(opt)->midLineWidth);
break;
case QStyle::PE_PanelMenuBar:
tqtPE = TQStyle::PE_PanelMenuBar;
tqt3opt = TQStyleOption(static_cast<const QStyleOptionFrame*>(opt)->lineWidth, static_cast<const QStyleOptionFrame*>(opt)->midLineWidth);
break;
case QStyle::PE_PanelMenu:
tqtPE = TQStyle::PE_PanelPopup;
tqt3opt = TQStyleOption(static_cast<const QStyleOptionFrame*>(opt)->lineWidth, static_cast<const QStyleOptionFrame*>(opt)->midLineWidth);
break;
case QStyle::PE_PanelButtonBevel:
tqtPE = TQStyle::PE_ButtonBevel;
break;
case QStyle::PE_FrameLineEdit:
tqtPE = TQStyle::PE_PanelLineEdit;
break;
case QStyle::PE_PanelStatusBar:
tqtPE = TQStyle::PE_Panel;
break;
case QStyle::PE_PanelButtonTool:
tqtPE = TQStyle::PE_ButtonTool;
break;
case QStyle::PE_FrameGroupBox:
tqtPE = TQStyle::PE_GroupBoxFrame;
tqt3opt = TQStyleOption(static_cast<const QStyleOptionFrame*>(opt)->lineWidth, static_cast<const QStyleOptionFrame*>(opt)->midLineWidth);
@ -1503,6 +1931,15 @@ void SimpleStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP
break;
case QStyle::PE_FrameTabWidget:
tqtPE = TQStyle::PE_PanelTabWidget;
// HACK
// For an unknown reason Qt4 paints the tab border 2 pixels lower and shorter than it should
// FIXME
// Figure out why that happens!
tqt3paintrect = TQRect(tqt3paintrect.x(), tqt3paintrect.y()-2, tqt3paintrect.width(), tqt3paintrect.height()+2);
p->setClipRect(QRect(tqt3paintrect.x(), tqt3paintrect.y(), tqt3paintrect.width(), tqt3paintrect.height()));
break;
case QStyle::PE_FrameDefaultButton:
tqtPE = TQStyle::PE_ButtonDefault;
break;
case QStyle::PE_PanelButtonCommand:
tqtPE = TQStyle::PE_ButtonCommand;
@ -1528,15 +1965,34 @@ void SimpleStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP
case QStyle::PE_IndicatorRadioButton:
tqtPE = TQStyle::PE_ExclusiveIndicator;
break;
case QStyle::PE_PanelMenu:
tqtPE = TQStyle::PE_PanelPopup;
case QStyle::PE_IndicatorSpinDown:
tqtPE = TQStyle::PE_SpinWidgetDown;
break;
case QStyle::PE_PanelButtonTool:
tqtPE = TQStyle::PE_ButtonTool;
case QStyle::PE_IndicatorSpinUp:
tqtPE = TQStyle::PE_SpinWidgetUp;
break;
case QStyle::PE_IndicatorSpinPlus:
tqtPE = TQStyle::PE_SpinWidgetPlus;
break;
case QStyle::PE_IndicatorSpinMinus:
tqtPE = TQStyle::PE_SpinWidgetMinus;
break;
case QStyle::PE_FrameWindow:
tqtPE = TQStyle::PE_WindowFrame;
break;
case QStyle::PE_IndicatorTabTear:
NO_QT3_EQUIVALENT
break;
case QStyle::PE_FrameStatusBarItem:
NO_QT3_EQUIVALENT
break;
case QStyle::PE_PanelLineEdit:
NO_QT3_EQUIVALENT
break;
// Qt3 support elements
case QStyle::PE_Q3Separator:
tqtPE = TQStyle::PE_Separator;
break;
default:
#ifdef DEBUG_WARNINGS
printf("No rules to draw Qt4 element %d\n\r", pe); fflush(stdout);
@ -1570,7 +2026,7 @@ void SimpleStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP
TQPainter tqtPainter(&qt4pd);
// Instruct TQt3 to draw the primitive
tqApp->style().drawPrimitive(tqtPE, &tqtPainter, TQRect(opt->rect.x(), opt->rect.y(), opt->rect.width(), opt->rect.height()), tqt3colorgroup, sflags, tqt3opt);
tqApp->style().drawPrimitive(tqtPE, &tqtPainter, tqt3paintrect, tqt3colorgroup, sflags, tqt3opt);
tqtPainter.end();
#ifdef DEBUG_WARNINGS
@ -1580,7 +2036,9 @@ void SimpleStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP
#endif
}
else {
if (do_not_draw == false) {
// Tell Qt4 to draw it
QCommonStyle::drawPrimitive(pe, opt, p, w);
}
}
}

@ -31,6 +31,11 @@ class TQRadioButton;
class TQProgressBar;
class TQPopupMenu;
class TQComboBox;
class TQSlider;
class TQScrollBar;
class TQSpinBox;
class TQTitleBar;
class TQMenuBar;
enum TQt3WidgetType {
TQT3WT_NONE,
@ -38,7 +43,12 @@ enum TQt3WidgetType {
TQT3WT_TQTabBar,
TQT3WT_TQRadioButton,
TQT3WT_TQPopupMenu,
TQT3WT_TQComboBox
TQT3WT_TQComboBox,
TQT3WT_TQSlider,
TQT3WT_TQScrollBar,
TQT3WT_TQSpinBox,
TQT3WT_TQTitleBar,
TQT3WT_TQMenuBar
};
class SimpleStyle : public QWindowsStyle
@ -62,14 +72,21 @@ public:
int pixelMetric(PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0) const;
private:
TQWidget* initializeInterfaceWidget(TQt3WidgetType wt, const QWidget * widget) const;
TQWidget* initializeInterfaceWidget(TQt3WidgetType wt, const QWidget * widget, const QStyleOption* qt4styleoptions = 0) const;
TQWidget* m_tqt3parent_widget;
TQWidget* m_tqt3generic_widget;
TQTabBar* m_tqt3tabbar_widget;
TQRadioButton* m_tqt3radiobutton_widget;
TQProgressBar* m_tqt3progressbar_widget;
TQPopupMenu* m_tqt3popupmenu_widget;
TQComboBox* m_tqt3combobox_widget;
TQSlider* m_tqt3slider_widget;
TQScrollBar* m_tqt3scrollbar_widget;
TQSpinBox* m_tqt3spinbox_widget;
TQWidget* m_tqt3window_widget;
TQTitleBar* m_tqt3titlebar_widget;
TQMenuBar* m_tqt3menubar_widget;
};
#endif

Binary file not shown.

@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: ../styleplugin
# Generated by qmake (2.01a) (Qt 4.7.0) on: Sat Mar 10 16:06:19 2012
# Generated by qmake (2.01a) (Qt 4.7.4) on: Mon Jan 2 01:57:07 2012
# Project: stylewindow.pro
# Template: app
# Command: /usr/bin/qmake-qt4 -o Makefile stylewindow.pro
@ -10,13 +10,13 @@
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake-qt4
@ -52,6 +52,7 @@ DIST = /usr/share/qt4/mkspecs/common/g++.conf \
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
@ -104,6 +105,7 @@ Makefile: stylewindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/shar
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
@ -119,13 +121,14 @@ Makefile: stylewindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/shar
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
/usr/lib/libQtGui.prl \
/usr/lib/libQtCore.prl
/usr/lib/i386-linux-gnu/libQtGui.prl \
/usr/lib/i386-linux-gnu/libQtCore.prl
$(QMAKE) -o Makefile stylewindow.pro
/usr/share/qt4/mkspecs/common/g++.conf:
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
@ -141,8 +144,8 @@ Makefile: stylewindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/shar
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/libQtGui.prl:
/usr/lib/libQtCore.prl:
/usr/lib/i386-linux-gnu/libQtGui.prl:
/usr/lib/i386-linux-gnu/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -o Makefile stylewindow.pro
@ -217,10 +220,10 @@ uninstall_target: FORCE
install_sources: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/stylewindow/stylewindow.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/stylewindow/main.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/stylewindow/stylewindow.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/stylewindow/stylewindow.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/stylewindow.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/main.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/stylewindow.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/stylewindow/stylewindow.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/styleplugin/stylewindow/
uninstall_sources: FORCE

@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: ../unstyledplugin
# Generated by qmake (2.01a) (Qt 4.7.0) on: Sat Mar 10 16:06:19 2012
# Generated by qmake (2.01a) (Qt 4.7.4) on: Mon Mar 5 10:54:20 2012
# Project: unstyledwindow.pro
# Template: app
# Command: /usr/bin/qmake-qt4 -o Makefile unstyledwindow.pro
@ -10,13 +10,13 @@
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I.
LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lQtGui -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake-qt4
@ -52,6 +52,7 @@ DIST = /usr/share/qt4/mkspecs/common/g++.conf \
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
@ -104,6 +105,7 @@ Makefile: unstyledwindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/s
/usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/linux.conf \
/usr/share/qt4/mkspecs/qconfig.pri \
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
/usr/share/qt4/mkspecs/features/qt_functions.prf \
/usr/share/qt4/mkspecs/features/qt_config.prf \
/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
@ -119,13 +121,14 @@ Makefile: unstyledwindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/s
/usr/share/qt4/mkspecs/features/yacc.prf \
/usr/share/qt4/mkspecs/features/lex.prf \
/usr/share/qt4/mkspecs/features/include_source_dir.prf \
/usr/lib/libQtGui.prl \
/usr/lib/libQtCore.prl
/usr/lib/i386-linux-gnu/libQtGui.prl \
/usr/lib/i386-linux-gnu/libQtCore.prl
$(QMAKE) -o Makefile unstyledwindow.pro
/usr/share/qt4/mkspecs/common/g++.conf:
/usr/share/qt4/mkspecs/common/unix.conf:
/usr/share/qt4/mkspecs/common/linux.conf:
/usr/share/qt4/mkspecs/qconfig.pri:
/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
/usr/share/qt4/mkspecs/features/qt_functions.prf:
/usr/share/qt4/mkspecs/features/qt_config.prf:
/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
@ -141,8 +144,8 @@ Makefile: unstyledwindow.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/s
/usr/share/qt4/mkspecs/features/yacc.prf:
/usr/share/qt4/mkspecs/features/lex.prf:
/usr/share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/libQtGui.prl:
/usr/lib/libQtCore.prl:
/usr/lib/i386-linux-gnu/libQtGui.prl:
/usr/lib/i386-linux-gnu/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -o Makefile unstyledwindow.pro
@ -217,10 +220,10 @@ uninstall_target: FORCE
install_sources: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/ || $(MKDIR) $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/unstyledwindow/stylewindow.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/unstyledwindow/main.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/unstyledwindow/stylewindow.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /home/eldarion/experimental/qt4-tqt-theme-engine/unstyledwindow/unstyledwindow.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/stylewindow.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/main.cpp $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/stylewindow.h $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
-$(INSTALL_FILE) /root/tdeqt4styleplugin/unstyledwindow/unstyledwindow.pro $(INSTALL_ROOT)/usr/lib/qt4/examples/tools/unstyledplugin/unstyledwindow/
uninstall_sources: FORCE

Loading…
Cancel
Save