summaryrefslogtreecommitdiffstats
path: root/src/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-10-31 18:47:11 -0500
committerDarrell Anderson <humanreadable@yahoo.com>2012-10-31 18:47:11 -0500
commit308537cb0eb307820f385f38c55dc1ccc47b343b (patch)
tree4df558ba58f2b0bdee64d7a6dc97fe69cd80d927 /src/kernel/qapplication.cpp
parent68fd119104cf123043eb7ee573de638cc159f743 (diff)
parentb0bd2889fa1058eec74c303b10cf8724a4c5efe2 (diff)
downloadtqt3-308537cb0eb307820f385f38c55dc1ccc47b343b.tar.gz
tqt3-308537cb0eb307820f385f38c55dc1ccc47b343b.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r--src/kernel/qapplication.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index 71b87ffe0..a552c236c 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -1847,6 +1847,37 @@ TQPalette TQApplication::palette(const TQWidget* w)
return *app_pal;
}
+TQPalette TQApplication::palette(TQStringList objectTypeList)
+{
+#if defined(QT_CHECK_STATE)
+ if ( !tqApp )
+ tqWarning( "TQApplication::palette: This function can only be "
+ "called after the TQApplication object has been created" );
+#endif
+ if ( !app_pal ) {
+ if ( !tqt_std_pal )
+ tqt_create_std_palette();
+ app_pal = new TQPalette( *tqt_std_pal );
+ tqt_fix_tooltips();
+ }
+
+ if ( (objectTypeList.count() > 0) && app_palettes ) {
+ TQPalette* wp = app_palettes->find( objectTypeList[objectTypeList.count()-1] );
+ if ( wp ) {
+ return *wp;
+ }
+ TQAsciiDictIterator<TQPalette> it( *app_palettes );
+ const char* name;
+ while ( (name=it.currentKey()) != 0 ) {
+ if ( objectTypeList.contains(name) ) {
+ return *it.current();
+ }
+ ++it;
+ }
+ }
+ return *app_pal;
+}
+
/*!
Changes the default application palette to \a palette. If \a
informWidgets is TRUE, then existing widgets are informed about the