summaryrefslogtreecommitdiffstats
path: root/examples/corelib/bindableproperties/shared
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib/bindableproperties/shared')
-rw-r--r--examples/corelib/bindableproperties/shared/CMakeLists.txt23
-rw-r--r--examples/corelib/bindableproperties/shared/countries.qrc7
-rw-r--r--examples/corelib/bindableproperties/shared/finland.pngbin0 -> 1062 bytes
-rw-r--r--examples/corelib/bindableproperties/shared/germany.pngbin0 -> 483 bytes
-rw-r--r--examples/corelib/bindableproperties/shared/norway.pngbin0 -> 5190 bytes
-rw-r--r--examples/corelib/bindableproperties/shared/subscriptionwindow.cpp16
-rw-r--r--examples/corelib/bindableproperties/shared/subscriptionwindow.h29
-rw-r--r--examples/corelib/bindableproperties/shared/subscriptionwindow.ui280
8 files changed, 355 insertions, 0 deletions
diff --git a/examples/corelib/bindableproperties/shared/CMakeLists.txt b/examples/corelib/bindableproperties/shared/CMakeLists.txt
new file mode 100644
index 0000000000..efc85e5d4d
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+add_library(bindableproperties_shared STATIC
+ subscriptionwindow.cpp
+ subscriptionwindow.h
+ subscriptionwindow.ui
+)
+
+target_link_libraries(bindableproperties_shared PUBLIC
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Widgets
+)
+
+qt_add_resources(bindableproperties_shared "countries"
+ PREFIX
+ "/"
+ FILES
+ "finland.png"
+ "germany.png"
+ "norway.png"
+)
diff --git a/examples/corelib/bindableproperties/shared/countries.qrc b/examples/corelib/bindableproperties/shared/countries.qrc
new file mode 100644
index 0000000000..cdf6312ebb
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/countries.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>germany.png</file>
+ <file>norway.png</file>
+ <file>finland.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/corelib/bindableproperties/shared/finland.png b/examples/corelib/bindableproperties/shared/finland.png
new file mode 100644
index 0000000000..92653289c1
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/finland.png
Binary files differ
diff --git a/examples/corelib/bindableproperties/shared/germany.png b/examples/corelib/bindableproperties/shared/germany.png
new file mode 100644
index 0000000000..efc389f52a
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/germany.png
Binary files differ
diff --git a/examples/corelib/bindableproperties/shared/norway.png b/examples/corelib/bindableproperties/shared/norway.png
new file mode 100644
index 0000000000..daee6c3c15
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/norway.png
Binary files differ
diff --git a/examples/corelib/bindableproperties/shared/subscriptionwindow.cpp b/examples/corelib/bindableproperties/shared/subscriptionwindow.cpp
new file mode 100644
index 0000000000..0e17283d40
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/subscriptionwindow.cpp
@@ -0,0 +1,16 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "subscriptionwindow.h"
+#include "ui_subscriptionwindow.h"
+
+SubscriptionWindow::SubscriptionWindow(QWidget *parent)
+ : QWidget(parent), ui(new Ui::SubscriptionWindow)
+{
+ ui->setupUi(this);
+}
+
+SubscriptionWindow::~SubscriptionWindow()
+{
+ delete ui;
+}
diff --git a/examples/corelib/bindableproperties/shared/subscriptionwindow.h b/examples/corelib/bindableproperties/shared/subscriptionwindow.h
new file mode 100644
index 0000000000..75f6a1eb83
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/subscriptionwindow.h
@@ -0,0 +1,29 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef SUBSCRIPTIONWINDOW_H
+#define SUBSCRIPTIONWINDOW_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+namespace Ui {
+class SubscriptionWindow;
+}
+QT_END_NAMESPACE
+
+class User;
+
+class SubscriptionWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit SubscriptionWindow(QWidget *parent = nullptr);
+ ~SubscriptionWindow();
+
+private:
+ Ui::SubscriptionWindow *ui;
+};
+
+#endif // SUBSCRIPTIONWINDOW_H
diff --git a/examples/corelib/bindableproperties/shared/subscriptionwindow.ui b/examples/corelib/bindableproperties/shared/subscriptionwindow.ui
new file mode 100644
index 0000000000..7bc2931373
--- /dev/null
+++ b/examples/corelib/bindableproperties/shared/subscriptionwindow.ui
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SubscriptionWindow</class>
+ <widget class="QWidget" name="SubscriptionWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>639</width>
+ <height>269</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Subscription</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,0,0,0">
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnGermany">
+ <property name="toolTip">
+ <string>Germany</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>:/germany.png</normaloff>:/germany.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnNorway">
+ <property name="toolTip">
+ <string>Norway</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>:/norway.png</normaloff>:/norway.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnFinland">
+ <property name="toolTip">
+ <string>Finland</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>:/finland.png</normaloff>:/finland.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="ageLabel">
+ <property name="font">
+ <font>
+ <pointsize>14</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Age</string>
+ </property>
+ <property name="margin">
+ <number>3</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="ageSpinBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="intervalLabel">
+ <property name="font">
+ <font>
+ <pointsize>14</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Interval</string>
+ </property>
+ <property name="margin">
+ <number>3</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="btnMonthly">
+ <property name="text">
+ <string>Monthly</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="btnQuarterly">
+ <property name="text">
+ <string>Quarterly</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="btnYearly">
+ <property name="text">
+ <string>Yearly</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="priceLabel">
+ <property name="font">
+ <font>
+ <pointsize>14</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Price/month</string>
+ </property>
+ <property name="margin">
+ <number>3</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="priceDisplay">
+ <property name="text">
+ <string>0.0</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>