diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 15:24:15 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 15:24:15 -0500 |
commit | bd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch) | |
tree | 7a520322212d48ebcb9fbe1087e7fca28b76185c /plugins/src/styles/compact | |
download | qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip |
Add Qt3 development HEAD version
Diffstat (limited to 'plugins/src/styles/compact')
-rw-r--r-- | plugins/src/styles/compact/compact.pro | 21 | ||||
-rw-r--r-- | plugins/src/styles/compact/main.cpp | 35 |
2 files changed, 56 insertions, 0 deletions
diff --git a/plugins/src/styles/compact/compact.pro b/plugins/src/styles/compact/compact.pro new file mode 100644 index 0000000..c746f23 --- /dev/null +++ b/plugins/src/styles/compact/compact.pro @@ -0,0 +1,21 @@ +TEMPLATE = lib +TARGET = qcompactstyle + +CONFIG += qt warn_off release plugin +DESTDIR = ../../../styles + +HEADERS = ../../../../include/qcompactstyle.h + +SOURCES = main.cpp \ + ../../../../src/styles/qcompactstyle.cpp + +!contains(styles, windows) { + HEADERS += ../../../../include/qwindowsstyle.h + SOURCES += ../../../../src/styles/qwindowsstyle.cpp +} + +unix:OBJECTS_DIR = .obj +win32:OBJECTS_DIR = obj + +target.path += $$plugins.path/styles +INSTALLS += target diff --git a/plugins/src/styles/compact/main.cpp b/plugins/src/styles/compact/main.cpp new file mode 100644 index 0000000..dda67c2 --- /dev/null +++ b/plugins/src/styles/compact/main.cpp @@ -0,0 +1,35 @@ +#include <qstyleplugin.h> +#include <qcompactstyle.h> + +class CompactStyle : public QStylePlugin +{ +public: + CompactStyle(); + + QStringList keys() const; + QStyle *create( const QString& ); +}; + +CompactStyle::CompactStyle() +: QStylePlugin() +{ +} + +QStringList CompactStyle::keys() const +{ + QStringList list; + list << "Compact"; + return list; +} + +QStyle* CompactStyle::create( const QString& s ) +{ + if ( s.lower() == "compact" ) + return new QCompactStyle(); + + return 0; +} + + +Q_EXPORT_PLUGIN( CompactStyle ) + |