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