Diffstat (limited to 'noncore/styles/metal/plugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/metal/plugin.cpp | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/noncore/styles/metal/plugin.cpp b/noncore/styles/metal/plugin.cpp index e5bee10..1db4aac 100644 --- a/noncore/styles/metal/plugin.cpp +++ b/noncore/styles/metal/plugin.cpp | |||
@@ -1,29 +1,57 @@ | |||
1 | #include "metal.h" | 1 | #include "metal.h" |
2 | #include "plugin.h" | ||
2 | 3 | ||
3 | 4 | ||
4 | extern "C" { | 5 | MetalInterface::MetalInterface ( ) : ref ( 0 ) |
5 | QStyle* allocate ( ); | 6 | { |
6 | int minor_version ( ); | 7 | } |
7 | int major_version ( ); | 8 | |
8 | const char *description ( ); | 9 | MetalInterface::~MetalInterface ( ) |
10 | { | ||
11 | } | ||
12 | |||
13 | QStyle *MetalInterface::create ( ) | ||
14 | { | ||
15 | return new MetalStyle ( ); | ||
16 | } | ||
17 | |||
18 | QString MetalInterface::name ( ) | ||
19 | { | ||
20 | return QObject::tr( "Metal", "name" ); | ||
21 | } | ||
22 | |||
23 | QString MetalInterface::description ( ) | ||
24 | { | ||
25 | return QObject::tr( "Metal style", "description" ); | ||
9 | } | 26 | } |
10 | 27 | ||
11 | QStyle* allocate ( ) | 28 | QCString MetalInterface::key ( ) |
12 | { | 29 | { |
13 | return new MetalStyle ( ); | 30 | return QCString ( "metal" ); |
14 | } | 31 | } |
15 | 32 | ||
16 | int minor_version ( ) | 33 | unsigned int MetalInterface::version ( ) |
17 | { | 34 | { |
18 | return 0; | 35 | return 100; // 1.0.0 (\d+.\d.\d) |
19 | } | 36 | } |
20 | 37 | ||
21 | int major_version ( ) | 38 | QRESULT MetalInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
22 | { | 39 | { |
23 | return 1; | 40 | *iface = 0; |
41 | |||
42 | if ( uuid == IID_QUnknown ) | ||
43 | *iface = this; | ||
44 | else if ( uuid == IID_Style ) | ||
45 | *iface = this; | ||
46 | |||
47 | if ( *iface ) | ||
48 | (*iface)-> addRef ( ); | ||
49 | |||
50 | return QS_OK; | ||
24 | } | 51 | } |
25 | 52 | ||
26 | const char *description ( ) | 53 | Q_EXPORT_INTERFACE() |
27 | { | 54 | { |
28 | return "Metal style plugin"; | 55 | Q_CREATE_INSTANCE( MetalInterface ) |
29 | } | 56 | } |
57 | |||