17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "QtApplication.h"
#import "OFString+QString.h"
#import "helpers.h"
using ObjQt::toOF;
using ObjQt::toQt;
@implementation QtApplication
- initWithQGuiApplication: (QGuiApplication*)qGuiApplication
{
OF_INVALID_INIT_METHOD
}
- initWithQApplication: (QApplication*)qApplication
{
return [super initWithQGuiApplication: qApplication];
}
- (QApplication*)qApplication
{
return qobject_cast<QApplication*>(_qObject);
}
- (bool)autoSipEnabled
- (bool)autoSIPEnabled
{
return [self qApplication]->autoSipEnabled();
return toQt(self)->autoSipEnabled();
}
- (void)setAutoSipEnabled: (bool)autoSipEnabled
- (void)setAutoSIPEnabled: (bool)autoSIPEnabled
{
[self qApplication]->setAutoSipEnabled(autoSipEnabled);
toQt(self)->setAutoSipEnabled(autoSIPEnabled);
}
- (int)cursorFlashTime
{
return [self qApplication]->cursorFlashTime();
return toQt(self)->cursorFlashTime();
}
- (void)setCursorFlashTime: (int)cursorFlashTime
{
[self qApplication]->setCursorFlashTime(cursorFlashTime);
toQt(self)->setCursorFlashTime(cursorFlashTime);
}
- (int)doubleClickInterval
{
return [self qApplication]->doubleClickInterval();
return toQt(self)->doubleClickInterval();
}
- (void)setDoubleClickInterval: (int)doubleClickInterval
{
[self qApplication]->setDoubleClickInterval(doubleClickInterval);
toQt(self)->setDoubleClickInterval(doubleClickInterval);
}
- (of_dimension_t)globalStrut
{
return toOF([self qApplication]->globalStrut());
return toOF(toQt(self)->globalStrut());
}
- (void)setGlobalStrut: (of_dimension_t)globalStrut
{
[self qApplication]->setGlobalStrut(toQt(globalStrut));
toQt(self)->setGlobalStrut(toQt(globalStrut));
}
- (int)keyboardInputInterval
{
return [self qApplication]->keyboardInputInterval();
return toQt(self)->keyboardInputInterval();
}
- (void)setKeyboardInputInterval: (int)keyboardInputInterval
{
[self qApplication]->setKeyboardInputInterval(keyboardInputInterval);
toQt(self)->setKeyboardInputInterval(keyboardInputInterval);
}
- (int)startDragDistance
{
return [self qApplication]->startDragDistance();
return toQt(self)->startDragDistance();
}
- (void)setStartDragDistance: (int)startDragDistance
{
[self qApplication]->setStartDragDistance(startDragDistance);
toQt(self)->setStartDragDistance(startDragDistance);
}
- (int)startDragTime
{
return [self qApplication]->startDragTime();
return toQt(self)->startDragTime();
}
- (void)setStartDragTime: (int)startDragTime
{
[self qApplication]->setStartDragTime(startDragTime);
toQt(self)->setStartDragTime(startDragTime);
}
- (OFString*)styleSheet
{
return toOF([self qApplication]->styleSheet());
return toOF(toQt(self)->styleSheet());
}
- (void)setStyleSheet: (OFString*)styleSheet
{
[self qApplication]->setStyleSheet(toQt(styleSheet));
toQt(self)->setStyleSheet(toQt(styleSheet));
}
- (int)wheelScrollLines
{
return [self qApplication]->wheelScrollLines();
return toQt(self)->wheelScrollLines();
}
- (void)setWheelScrollLines: (int)wheelScrollLines
{
[self qApplication]->setWheelScrollLines(wheelScrollLines);
toQt(self)->setWheelScrollLines(wheelScrollLines);
}
- (void)aboutQt
{
[self qApplication]->aboutQt();
toQt(self)->aboutQt();
}
- (void)closeAllWindows
{
[self qApplication]->closeAllWindows();
toQt(self)->closeAllWindows();
}
@end
|