FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
qml_utils.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** FougTools
3 ** Copyright Fougue (30 Mar. 2015)
4 ** contact@fougue.pro
5 **
6 ** This software is a computer program whose purpose is to provide utility
7 ** tools for the C++ language and the Qt toolkit.
8 **
9 ** This software is governed by the CeCILL-C license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-C
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info".
14 ****************************************************************************/
15 
16 #pragma once
17 
18 #include "qml.h"
19 #include <QtCore/QObject>
20 #if QT_VERSION >= 0x050000
21 class QQmlContext;
22 #else
23 class QDeclarativeContext;
24 #endif // QT_VERSION
25 
26 namespace qtqml {
27 
28 class QTTOOLS_QML_EXPORT QmlUtils : public QObject
29 {
30  Q_OBJECT
31 
32 public:
33  QmlUtils(QObject* parent = NULL);
34 
35  Q_INVOKABLE void setOverrideCursor(int shape);
36  Q_INVOKABLE void restoreOverrideCursor();
37 
38 #if QT_VERSION >= 0x050000
39  static void declareObject(QQmlContext* context, QmlUtils* obj);
40 #else
41  static void declareObject(QDeclarativeContext* context, QmlUtils* obj);
42 #endif // QT_VERSION
43 };
44 
45 } // namespace qtqml
#define QTTOOLS_QML_EXPORT
Definition: qml.h:27
Definition: qml_utils.h:28
Definition: qml_utils.cpp:28