Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Alias QPushButton::default to QPushButton::isDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
Znurre committed Feb 18, 2018
1 parent 9ed50f3 commit 791dd7b
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 11 deletions.
3 changes: 2 additions & 1 deletion extensionplugin/extensionplugin_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include "scrollareawidgetcontainer_p.h"
#include "stackedwidgetwidgetcontainer_p.h"
#include "toolbarwidgetcontainer_p.h"
#include "declarativepushbutton_p.h"

#include <QButtonGroup>
#include <QCalendarWidget>
Expand Down Expand Up @@ -168,7 +169,7 @@ void ExtensionpluginPlugin::registerTypes(const char *uri)
qmlRegisterExtendedType<DeclarativeMessageBox, DeclarativeWidgetExtension>(uri, 1, 0, "MessageBox");
qmlRegisterExtendedType<QPlainTextEdit, DeclarativeWidgetExtension>(uri, 1, 0, "PlainTextEdit");
qmlRegisterExtendedType<QProgressBar, DeclarativeWidgetExtension>(uri, 1, 0, "ProgressBar");
qmlRegisterExtendedType<QPushButton, DeclarativeWidgetExtension>(uri, 1, 0, "PushButton");
qmlRegisterExtendedType<DeclarativePushButton, DeclarativeWidgetExtension>(uri, 1, 0, "PushButton");
qmlRegisterExtendedType<QRadioButton, DeclarativeWidgetExtension>(uri, 1, 0, "RadioButton");
qmlRegisterExtendedType<QScrollArea, DeclarativeContainerWidgetExtension<ScrollAreaWidgetContainer> >(uri, 1, 0, "ScrollArea");
qmlRegisterExtendedType<QScrollBar, DeclarativeWidgetExtension>(uri, 1, 0, "ScrollBar");
Expand Down
32 changes: 32 additions & 0 deletions lib/declarativepushbutton.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
declarativeloaderwidget_p.h
This file is part of DeclarativeWidgets, library and tools for creating QtWidget UIs with QML.
Copyright (C) 2013-2017 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected]
Author: Lova Widmark <[email protected]>
Licensees holding valid commercial KDAB DeclarativeWidgets licenses may use this file in
accordance with DeclarativeWidgets Commercial License Agreement provided with the Software.
Contact [email protected] if any conditions of this licensing are not clear to you.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "declarativepushbutton_p.h"

DeclarativePushButton::DeclarativePushButton(QWidget *parent) : QPushButton(parent)
{
}
42 changes: 42 additions & 0 deletions lib/declarativepushbutton_p.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
declarativeloaderwidget_p.h
This file is part of DeclarativeWidgets, library and tools for creating QtWidget UIs with QML.
Copyright (C) 2013-2017 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected]
Author: Lova Widmark <[email protected]>
Licensees holding valid commercial KDAB DeclarativeWidgets licenses may use this file in
accordance with DeclarativeWidgets Commercial License Agreement provided with the Software.
Contact [email protected] if any conditions of this licensing are not clear to you.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef DECLARATIVEPUSHBUTTON_P_H
#define DECLARATIVEPUSHBUTTON_P_H

#include <QPushButton>

class DeclarativePushButton : public QPushButton
{
Q_OBJECT
Q_PROPERTY(bool isDefault READ isDefault WRITE setDefault)

public:
explicit DeclarativePushButton(QWidget *parent = 0);
};

#endif // DECLARATIVEPUSHBUTTON_P_H
22 changes: 12 additions & 10 deletions lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ HEADERS = \
staticdialogmethodattached_p.h \
toolbarwidgetcontainer_p.h \
widgetcontainerinterface_p.h \
declarativeloaderwidget_p.h \
declarativespaceritem_p.h \
declarativeline_p.h \
declarativelabelextension_p.h \
declarativetabstops_p.h
declarativeloaderwidget_p.h \
declarativespaceritem_p.h \
declarativeline_p.h \
declarativelabelextension_p.h \
declarativetabstops_p.h \
declarativepushbutton_p.h

SOURCES = \
abstractdeclarativeobject.cpp \
Expand Down Expand Up @@ -116,8 +117,9 @@ SOURCES = \
stackedwidgetwidgetcontainer.cpp \
staticdialogmethodattached.cpp \
toolbarwidgetcontainer.cpp \
declarativeloaderwidget.cpp \
declarativespaceritem.cpp \
declarativeline.cpp \
declarativelabelextension.cpp \
declarativetabstops.cpp
declarativeloaderwidget.cpp \
declarativespaceritem.cpp \
declarativeline.cpp \
declarativelabelextension.cpp \
declarativetabstops.cpp \
declarativepushbutton.cpp

0 comments on commit 791dd7b

Please sign in to comment.