Initial commit
This commit is contained in:
commit
f38ff5fbc2
18 changed files with 1016 additions and 0 deletions
22
QtWidgets/QtApplication.h
Normal file
22
QtWidgets/QtApplication.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#import "QtGuiApplication.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
@interface QtApplication: QtGuiApplication
|
||||
@property (readonly) QApplication *qApplication;
|
||||
@property bool autoSipEnabled;
|
||||
@property int cursorFlashTime;
|
||||
@property int doubleClickInterval;
|
||||
@property QSize globalStrut;
|
||||
@property int keyboardInputInterval;
|
||||
@property int startDragDistance;
|
||||
@property int startDragTime;
|
||||
@property (copy) OFString *styleSheet;
|
||||
@property int wheelScrollLines;
|
||||
|
||||
- initWithQApplication: (QApplication*)qApplication;
|
||||
- (void)aboutQt;
|
||||
- (bool)autoSipEnabled;
|
||||
- (void)closeAllWindows;
|
||||
- (void)setAutoSipEnabled: (bool)enabled;
|
||||
@end
|
120
QtWidgets/QtApplication.mm
Normal file
120
QtWidgets/QtApplication.mm
Normal file
|
@ -0,0 +1,120 @@
|
|||
#import "QtApplication.h"
|
||||
|
||||
#import "helpers.h"
|
||||
|
||||
@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
|
||||
{
|
||||
return [self qApplication]->autoSipEnabled();
|
||||
}
|
||||
|
||||
- (void)setAutoSipEnabled: (bool)autoSipEnabled
|
||||
{
|
||||
[self qApplication]->setAutoSipEnabled(autoSipEnabled);
|
||||
}
|
||||
|
||||
- (int)cursorFlashTime
|
||||
{
|
||||
return [self qApplication]->cursorFlashTime();
|
||||
}
|
||||
|
||||
- (void)setCursorFlashTime: (int)cursorFlashTime
|
||||
{
|
||||
[self qApplication]->setCursorFlashTime(cursorFlashTime);
|
||||
}
|
||||
|
||||
- (int)doubleClickInterval
|
||||
{
|
||||
return [self qApplication]->doubleClickInterval();
|
||||
}
|
||||
|
||||
- (void)setDoubleClickInterval: (int)doubleClickInterval
|
||||
{
|
||||
[self qApplication]->setDoubleClickInterval(doubleClickInterval);
|
||||
}
|
||||
|
||||
- (QSize)globalStrut
|
||||
{
|
||||
return [self qApplication]->globalStrut();
|
||||
}
|
||||
|
||||
- (void)setGlobalStrut: (QSize)globalStrut
|
||||
{
|
||||
[self qApplication]->setGlobalStrut(globalStrut);
|
||||
}
|
||||
|
||||
- (int)keyboardInputInterval
|
||||
{
|
||||
return [self qApplication]->keyboardInputInterval();
|
||||
}
|
||||
|
||||
- (void)setKeyboardInputInterval: (int)keyboardInputInterval
|
||||
{
|
||||
[self qApplication]->setKeyboardInputInterval(keyboardInputInterval);
|
||||
}
|
||||
|
||||
- (int)startDragDistance
|
||||
{
|
||||
return [self qApplication]->startDragDistance();
|
||||
}
|
||||
|
||||
- (void)setStartDragDistance: (int)startDragDistance
|
||||
{
|
||||
[self qApplication]->setStartDragDistance(startDragDistance);
|
||||
}
|
||||
|
||||
- (int)startDragTime
|
||||
{
|
||||
return [self qApplication]->startDragTime();
|
||||
}
|
||||
|
||||
- (void)setStartDragTime: (int)startDragTime
|
||||
{
|
||||
[self qApplication]->setStartDragTime(startDragTime);
|
||||
}
|
||||
|
||||
- (OFString*)styleSheet
|
||||
{
|
||||
return QToOFString([self qApplication]->styleSheet());
|
||||
}
|
||||
|
||||
- (void)setStyleSheet: (OFString*)styleSheet
|
||||
{
|
||||
[self qApplication]->setStyleSheet(OFToQString(styleSheet));
|
||||
}
|
||||
|
||||
- (int)wheelScrollLines
|
||||
{
|
||||
return [self qApplication]->wheelScrollLines();
|
||||
}
|
||||
|
||||
- (void)setWheelScrollLines: (int)wheelScrollLines
|
||||
{
|
||||
[self qApplication]->setWheelScrollLines(wheelScrollLines);
|
||||
}
|
||||
|
||||
- (void)aboutQt
|
||||
{
|
||||
[self qApplication]->aboutQt();
|
||||
}
|
||||
|
||||
- (void)closeAllWindows
|
||||
{
|
||||
[self qApplication]->closeAllWindows();
|
||||
}
|
||||
@end
|
Loading…
Add table
Add a link
Reference in a new issue