Overview
Comment: | Add QtAbstractButton |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
462c91f6d69c420c00f10b9b293b19a3 |
User & Date: | js 2017-04-18 02:27:37 |
Context
2017-04-18
| ||
19:21 | Add QtPushButton check-in: 14dfe934b0 user: max-schander@freenet.de tags: trunk | |
02:27 | Add QtAbstractButton check-in: 462c91f6d6 user: js tags: trunk | |
00:09 | Check whether Qt requires PIC check-in: 7a43c3a524 user: js tags: trunk | |
Changes
Changes to src/QtWidgets/Makefile.
1 2 3 4 5 | include ../../extra.mk STATIC_PIC_LIB_NOINST = ${QTWIDGETS_LIB_A} STATIC_LIB_NOINST = ${QTWIDGETS_A} | > | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | include ../../extra.mk STATIC_PIC_LIB_NOINST = ${QTWIDGETS_LIB_A} STATIC_LIB_NOINST = ${QTWIDGETS_A} SRCS = QtAbstractButton.mm \ QtAction.mm \ QtApplication.mm \ QtWidget.mm include ../../buildsys.mk CPPFLAGS += -I. -I../QtCore -I../QtGui -I../common |
Added src/QtWidgets/QtAbstractButton.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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 | /* * Copyright (c) 2017, Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/objqt.git * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * 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 "QtWidget.h" #include <QAbstractButton> @interface QtAbstractButton: QtWidget @property (readonly) QAbstractButton *qAbstractButton; @property bool autoExclusive; @property bool autoRepeat; @property int autoRepeatDelay; @property int autoRepeatInterval; @property (getter=isCheckable) bool checkable; @property (getter=isChecked) bool checked; @property (getter=isDown) bool down; @property QIcon icon; @property of_dimension_t iconSize; @property QKeySequence shortcut; @property (copy) OFString *text; - initWithQAbstractButton: (QAbstractButton*)qAbstractButton; - (QButtonGroup*)group; @end namespace ObjQt { static OF_INLINE QtAbstractButton* toOF(QAbstractButton *qAbstractButton) { return [[[QtAbstractButton alloc] initWithQAbstractButton: qAbstractButton] autorelease]; } static OF_INLINE QAbstractButton* toQt(QtAbstractButton *abstractButton) { return [abstractButton qAbstractButton]; } } |
Added src/QtWidgets/QtAbstractButton.mm.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | /* * Copyright (c) 2017, Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/objqt.git * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * 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 "QtAbstractButton.h" #import "OFString+QString.h" #import "helpers.h" using ObjQt::toOF; using ObjQt::toQt; @implementation QtAbstractButton - initWithQWidget: (QWidget*)qWidget { OF_INVALID_INIT_METHOD } - initWithQAbstractButton: (QAbstractButton*)qAbstractButton { return [super initWithQWidget: qAbstractButton]; } - (QAbstractButton*)qAbstractButton { return qobject_cast<QAbstractButton*>(_qObject); } - (bool)autoExclusive { return toQt(self)->autoExclusive(); } - (void)setAutoExclusive: (bool)autoExclusive { toQt(self)->setAutoExclusive(autoExclusive); } - (bool)autoRepeat { return toQt(self)->autoRepeat(); } - (void)setAutoRepeat: (bool)autoRepeat { toQt(self)->setAutoRepeat(autoRepeat); } - (int)autoRepeatDelay { return toQt(self)->autoRepeatDelay(); } - (void)setAutoRepeatDelay: (int)autoRepeatDelay { toQt(self)->setAutoRepeatDelay(autoRepeatDelay); } - (int)autoRepeatInterval { return toQt(self)->autoRepeatInterval(); } - (void)setAutoRepeatInterval: (int)autoRepeatInterval { toQt(self)->setAutoRepeatInterval(autoRepeatInterval); } - (bool)isCheckable { return toQt(self)->isCheckable(); } - (void)setCheckable: (bool)checkable { toQt(self)->setCheckable(checkable); } - (bool)isChecked { return toQt(self)->isChecked(); } - (void)setChecked: (bool)checked { toQt(self)->setChecked(checked); } - (bool)isDown { return toQt(self)->isDown(); } - (void)setDown: (bool)down { toQt(self)->setDown(down); } - (QIcon)icon { return toQt(self)->icon(); } - (void)setIcon: (QIcon)icon { toQt(self)->setIcon(icon); } - (of_dimension_t)iconSize { return toOF(toQt(self)->iconSize()); } - (void)setIconSize: (of_dimension_t)iconSize { toQt(self)->setIconSize(toQt(iconSize)); } - (QKeySequence)shortcut { return toQt(self)->shortcut(); } - (void)setShortcut: (QKeySequence)shortcut { toQt(self)->setShortcut(shortcut); } - (OFString*)text { return toOF(toQt(self)->text()); } - (void)setText: (OFString*)text { toQt(self)->setText(toQt(text)); } - (QButtonGroup*)group { return toQt(self)->group(); } @end |