summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-17 15:04:05 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-17 15:04:05 -0500
commit691129fbcb6c0f377abac61c6051700b4148efc4 (patch)
treefed4e27b1229c4c33d1a0fff399879bae1375b8e
parent0e044c1a92745f8508f5813efc9709a280583d11 (diff)
downloadtqt3-691129fb.tar.gz
tqt3-691129fb.zip
Automated update from Qt3
-rw-r--r--src/kernel/ntqstyle.h25
-rw-r--r--src/styles/qcommonstyle.cpp34
2 files changed, 52 insertions, 7 deletions
diff --git a/src/kernel/ntqstyle.h b/src/kernel/ntqstyle.h
index d4f73552..a045e21e 100644
--- a/src/kernel/ntqstyle.h
+++ b/src/kernel/ntqstyle.h
@@ -133,6 +133,8 @@ class TQStyleHintReturn; // not defined yet
typedef TQMap<TQ_UINT32, TQSize> DialogButtonSizeMap;
typedef TQMap<TQ_INT32, TQ_INT32> TabIdentifierIndexMap;
+class TQStyleControlElementGenericWidgetData;
+
class TQStyleControlElementPopupMenuData {
public:
//
@@ -146,13 +148,6 @@ class TQStyleControlElementCheckListItemData {
int height;
};
-class TQStyleControlElementTabBarData {
- public:
- int tabCount;
- TQTabBar::Shape shape;
- TabIdentifierIndexMap identIndexMap;
-};
-
class TQStyleControlElementListViewData {
public:
bool rootDecorated;
@@ -204,6 +199,22 @@ class TQStyleControlElementGenericWidgetData {
TQFont font;
};
+class TQStyleControlElementTabBarData {
+ public:
+ int tabCount;
+ int currentTabIndex;
+ TQTabBar::Shape shape;
+ TabIdentifierIndexMap identIndexMap;
+ TQStyleControlElementGenericWidgetData cornerWidgets[4];
+
+ enum CornerWidgetLocation {
+ CWL_TopLeft = 0,
+ CWL_TopRight = 1,
+ CWL_BottomLeft = 2,
+ CWL_BottomRight = 3
+ };
+};
+
class Q_EXPORT TQStyleControlElementData {
public:
TQStringList widgetObjectTypes;
diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp
index e1f13199..0caac2c6 100644
--- a/src/styles/qcommonstyle.cpp
+++ b/src/styles/qcommonstyle.cpp
@@ -49,6 +49,7 @@
#include "ntqpixmap.h"
#include "ntqpushbutton.h"
#include "ntqtabbar.h"
+#include "ntqtabwidget.h"
#include "ntqlineedit.h"
#include "ntqscrollbar.h"
#include "ntqtoolbutton.h"
@@ -333,6 +334,7 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
const TQTabBar *tb = dynamic_cast<const TQTabBar*>(widget);
if (tb) {
ceData.tabBarData.tabCount = tb->count();
+ ceData.tabBarData.currentTabIndex = tb->currentTab();
ceData.tabBarData.shape = tb->shape();
ceData.tabBarData.identIndexMap.clear();
const TQTab* currentTab;
@@ -342,6 +344,38 @@ TQStyleControlElementData populateControlElementDataFromWidget(const TQWidget* w
ceData.tabBarData.identIndexMap[currentTab->identifier()] = tb->indexOf(currentTab->identifier());
}
}
+ const TQTabWidget *tw = dynamic_cast<const TQTabWidget*>(tb->parent());
+ if (tw) {
+ TQWidget *cw;
+ cw = tw->cornerWidget(TQt::TopLeft);
+ if(cw) {
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].widgetObjectTypes = getObjectTypeListForObject(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].pos = cw->pos();
+ }
+ cw = tw->cornerWidget(TQt::TopRight);
+ if(cw) {
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].widgetObjectTypes = getObjectTypeListForObject(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopRight].pos = cw->pos();
+ }
+ cw = tw->cornerWidget(TQt::BottomLeft);
+ if(cw) {
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].widgetObjectTypes = getObjectTypeListForObject(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomLeft].pos = cw->pos();
+ }
+ cw = tw->cornerWidget(TQt::BottomRight);
+ if(cw) {
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].widgetObjectTypes = getObjectTypeListForObject(cw);
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].geometry = cw->geometry();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].rect = cw->rect();
+ ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_BottomRight].pos = cw->pos();
+ }
+ }
}
}
if (ceData.widgetObjectTypes.contains("TQToolBox")) {