From 2f1ea4569a70464a94289c6fe2c463ce8b649e67 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 3 Nov 2012 20:34:34 -0500 Subject: Automated update from Qt3 --- src/styles/qcommonstyle.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/styles') diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index 402354c62..19b5aa444 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -66,6 +66,7 @@ #include "ntqradiobutton.h" #include "ntqbitmap.h" #include "ntqprogressbar.h" +#include "ntqlistbox.h" #include "private/qdialogbuttons_p.h" #include #include @@ -265,6 +266,7 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w if (populateReliantFields) { ceData.fgColor = widget->foregroundColor(); ceData.colorGroup = widget->colorGroup(); + ceData.paletteBgColor = widget->paletteBackgroundColor(); } ceData.geometry = widget->geometry(); ceData.rect = widget->rect(); @@ -504,6 +506,7 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w if (populateReliantFields) { ceData.viewportData.fgColor = viewport->foregroundColor(); ceData.viewportData.colorGroup = viewport->colorGroup(); + ceData.viewportData.paletteBgColor = viewport->paletteBackgroundColor(); } ceData.viewportData.geometry = viewport->geometry(); ceData.viewportData.rect = viewport->rect(); @@ -524,6 +527,10 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w if (lineEdit) { ceData.comboBoxLineEditFlags = getControlElementFlagsForObject(lineEdit, ceData.widgetObjectTypes, TQStyleOption::Default); } + const TQListBox* listBox = cb->listBox(); + if (listBox) { + ceData.comboBoxListBoxFlags = getControlElementFlagsForObject(listBox, ceData.widgetObjectTypes, TQStyleOption::Default); + } } } if (ceData.widgetObjectTypes.contains("TQFrame")) { @@ -554,6 +561,7 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w if (populateReliantFields) { ceData.parentWidgetData.fgColor = parentWidget->foregroundColor(); ceData.parentWidgetData.colorGroup = parentWidget->colorGroup(); + ceData.parentWidgetData.paletteBgColor = parentWidget->paletteBackgroundColor(); } ceData.parentWidgetData.geometry = parentWidget->geometry(); ceData.parentWidgetData.rect = parentWidget->rect(); @@ -580,6 +588,7 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w if (toolbar) { ceData.toolBarData.orientation = toolbar->orientation(); } + ceData.parentWidgetFlags = getControlElementFlagsForObject(parentWidget, ceData.parentWidgetData.widgetObjectTypes, TQStyleOption::Default, populateReliantFields); } TQCheckListItem *item = opt.checkListItem(); -- cgit v1.2.1 From 79dfe5ba7afa55306b325ddcc6cfbe6dd67cf839 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 4 Nov 2012 16:16:59 -0600 Subject: Automated update from Qt3 --- src/styles/qcommonstyle.cpp | 65 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'src/styles') diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index 19b5aa444..4406346e1 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -196,6 +196,12 @@ TQStyle::ControlElementFlags getControlElementFlagsForObject(const TQObject* obj if (t->identifier() == tb->currentTab()) cef = cef | TQStyle::CEF_IsActive; } } + if (objectTypeList.contains("TQTitleBar")) { + const TQTitleBar *tb = dynamic_cast(object); + if (tb) { + if (tb->isActive()) cef = cef | TQStyle::CEF_IsActive; + } + } if (objectTypeList.contains("TQToolBox")) { const TQToolBox *tb = dynamic_cast(object); if (tb) { @@ -233,6 +239,7 @@ TQStyle::ControlElementFlags getControlElementFlagsForObject(const TQObject* obj if (widget->isActiveWindow()) cef = cef | TQStyle::CEF_IsActiveWindow; if (widget->isTopLevel()) cef = cef | TQStyle::CEF_IsTopLevel; if (widget->isVisible()) cef = cef | TQStyle::CEF_IsVisible; + if (widget->isShown()) cef = cef | TQStyle::CEF_IsShown; } } } @@ -277,6 +284,8 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w } ceData.palette = widget->palette(); ceData.font = widget->font(); + ceData.name = widget->name(); + ceData.caption = widget->caption(); if (ceData.widgetObjectTypes.contains("TQPushButton")) { const TQPushButton *button = dynamic_cast(widget); if (button) { @@ -517,6 +526,8 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w } ceData.viewportData.palette = viewport->palette(); ceData.viewportData.font = viewport->font(); + ceData.viewportData.name = viewport->name(); + ceData.viewportData.caption = viewport->caption(); } } } @@ -572,6 +583,8 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w } ceData.parentWidgetData.palette = parentWidget->palette(); ceData.parentWidgetData.font = parentWidget->font(); + ceData.parentWidgetData.name = parentWidget->name(); + ceData.parentWidgetData.caption = parentWidget->caption(); const TQDockWindow * dw = dynamic_cast(parentWidget); if (dw) { @@ -590,6 +603,58 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w } ceData.parentWidgetFlags = getControlElementFlagsForObject(parentWidget, ceData.parentWidgetData.widgetObjectTypes, TQStyleOption::Default, populateReliantFields); } + const TQWidget* topLevelWidget = widget->topLevelWidget(); + if (topLevelWidget) { + ceData.topLevelWidgetData.widgetObjectTypes = getObjectTypeListForObject(topLevelWidget); + ceData.topLevelWidgetData.allDataPopulated = populateReliantFields; + const TQPixmap* erasePixmap = topLevelWidget->backgroundPixmap(); + if (erasePixmap) { + ceData.topLevelWidgetData.bgPixmap = *erasePixmap; + } + if (populateReliantFields) { + ceData.topLevelWidgetData.bgBrush = topLevelWidget->backgroundBrush(); + } + ceData.topLevelWidgetData.wflags = topLevelWidget->getWFlags(); + if (populateReliantFields) { + ceData.topLevelWidgetData.windowState = (TQt::WindowState)(widget->windowState()); + } + ceData.topLevelWidgetData.bgColor = topLevelWidget->eraseColor(); + ceData.topLevelWidgetData.bgOffset = topLevelWidget->backgroundOffset(); + ceData.topLevelWidgetData.backgroundMode = topLevelWidget->backgroundMode(); + if (populateReliantFields) { + ceData.topLevelWidgetData.fgColor = topLevelWidget->foregroundColor(); + ceData.topLevelWidgetData.colorGroup = topLevelWidget->colorGroup(); + ceData.topLevelWidgetData.paletteBgColor = topLevelWidget->paletteBackgroundColor(); + } + ceData.topLevelWidgetData.geometry = topLevelWidget->geometry(); + ceData.topLevelWidgetData.rect = topLevelWidget->rect(); + ceData.topLevelWidgetData.pos = topLevelWidget->pos(); + const TQPixmap* icon = topLevelWidget->icon(); + if (icon) { + ceData.topLevelWidgetData.icon = *icon; + } + ceData.topLevelWidgetData.palette = topLevelWidget->palette(); + ceData.topLevelWidgetData.font = topLevelWidget->font(); + ceData.topLevelWidgetData.name = topLevelWidget->name(); + ceData.topLevelWidgetData.caption = topLevelWidget->caption(); + + const TQDockWindow * dw = dynamic_cast(topLevelWidget); + if (dw) { + if (dw->area()) { + ceData.dwData.hasDockArea = true; + ceData.dwData.areaOrientation = dw->area()->orientation(); + } + else { + ceData.dwData.hasDockArea = false; + } + ceData.dwData.closeEnabled = dw->isCloseEnabled(); + } + const TQToolBar * toolbar = dynamic_cast(topLevelWidget); + if (toolbar) { + ceData.toolBarData.orientation = toolbar->orientation(); + } + ceData.topLevelWidgetFlags = getControlElementFlagsForObject(topLevelWidget, ceData.topLevelWidgetData.widgetObjectTypes, TQStyleOption::Default, populateReliantFields); + } TQCheckListItem *item = opt.checkListItem(); if (item) { -- cgit v1.2.1 From deb6f7b222e52035e99fa757e775c01e987a4eb5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 6 Nov 2012 22:38:16 -0600 Subject: Automated update from Qt3 --- src/styles/qcommonstyle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/styles') diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index 4406346e1..a303a805d 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -159,7 +159,7 @@ TQStringList getObjectTypeListForObject(const TQObject* object) { } TQStyle::ControlElementFlags getControlElementFlagsForObject(const TQObject* object, TQStringList objectTypeList, const TQStyleOption& opt, bool populateReliantFields) { - TQStyle::ControlElementFlags cef = (TQStyle::ControlElementFlags)0; + TQStyle::ControlElementFlags cef = TQStyle::CEF_None; if (object) { if (objectTypeList.contains("TQPushButton")) { @@ -405,6 +405,7 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w ceData.totalSteps = pb->totalSteps(); ceData.progressText = pb->progressString(); ceData.percentageVisible = pb->percentageVisible(); + ceData.orientation = pb->orientation(); } } if (ceData.widgetObjectTypes.contains("TQHeader")) { -- cgit v1.2.1