Diffstat (limited to 'noncore/styles/metal/plugin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/styles/metal/plugin.cpp | 52 |
1 files changed, 40 insertions, 12 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 | int major_version ( ); | ||
8 | const char *description ( ); | ||
9 | } | 7 | } |
10 | 8 | ||
11 | QStyle* allocate ( ) | 9 | MetalInterface::~MetalInterface ( ) |
10 | { | ||
11 | } | ||
12 | |||
13 | QStyle *MetalInterface::create ( ) | ||
12 | { | 14 | { |
13 | return new MetalStyle ( ); | 15 | return new MetalStyle ( ); |
14 | } | 16 | } |
15 | 17 | ||
16 | int minor_version ( ) | 18 | QString MetalInterface::name ( ) |
17 | { | 19 | { |
18 | return 0; | 20 | return QObject::tr( "Metal", "name" ); |
19 | } | 21 | } |
20 | 22 | ||
21 | int major_version ( ) | 23 | QString MetalInterface::description ( ) |
22 | { | 24 | { |
23 | return 1; | 25 | return QObject::tr( "Metal style", "description" ); |
24 | } | 26 | } |
25 | 27 | ||
26 | const char *description ( ) | 28 | QCString MetalInterface::key ( ) |
27 | { | 29 | { |
28 | return "Metal style plugin"; | 30 | return QCString ( "metal" ); |
29 | } | 31 | } |
32 | |||
33 | unsigned int MetalInterface::version ( ) | ||
34 | { | ||
35 | return 100; // 1.0.0 (\d+.\d.\d) | ||
36 | } | ||
37 | |||
38 | QRESULT MetalInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | ||
39 | { | ||
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; | ||
51 | } | ||
52 | |||
53 | Q_EXPORT_INTERFACE() | ||
54 | { | ||
55 | Q_CREATE_INSTANCE( MetalInterface ) | ||
56 | } | ||
57 | |||