summaryrefslogtreecommitdiff
path: root/src/dialogs/dialogs.pro
blob: 9daaa6e6ba212301a842001da4370d169e9be807 (plain)
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
requires(contains(QT_CONFIG, accessibility))

CXX_MODULE = qml
TARGET  = dialogplugin
TARGETPATH = QtQuick/Dialogs
IMPORT_VERSION = 1.2

QMAKE_DOCS = $$PWD/doc/qtquickdialogs.qdocconf

qtquickcompiler: DEFINES += ALWAYS_LOAD_FROM_RESOURCES

SOURCES += \
    qquickabstractmessagedialog.cpp \
    qquickplatformmessagedialog.cpp \
    qquickmessagedialog.cpp \
    qquickabstractfiledialog.cpp \
    qquickplatformfiledialog.cpp \
    qquickfiledialog.cpp \
    qquickabstractcolordialog.cpp \
    qquickplatformcolordialog.cpp \
    qquickcolordialog.cpp \
    qquickabstractfontdialog.cpp \
    qquickplatformfontdialog.cpp \
    qquickfontdialog.cpp \
    qquickabstractdialog.cpp \
    qquickdialog.cpp \
    plugin.cpp

HEADERS += \
    qquickabstractmessagedialog_p.h \
    qquickplatformmessagedialog_p.h \
    qquickmessagedialog_p.h \
    qquickdialogassets_p.h \
    qquickabstractfiledialog_p.h \
    qquickplatformfiledialog_p.h \
    qquickfiledialog_p.h \
    qquickabstractcolordialog_p.h \
    qquickplatformcolordialog_p.h \
    qquickcolordialog_p.h \
    qquickabstractfontdialog_p.h \
    qquickplatformfontdialog_p.h \
    qquickfontdialog_p.h \
    qquickabstractdialog_p.h \
    qquickdialog_p.h

WIDGET_DIALOGS_QML_FILES = \
    WidgetMessageDialog.qml \
    WidgetFileDialog.qml \
    WidgetColorDialog.qml \
    WidgetFontDialog.qml

DIALOGS_QML_FILES += \
    DefaultMessageDialog.qml \
    DefaultFileDialog.qml \
    DefaultColorDialog.qml \
    DefaultFontDialog.qml \
    DefaultDialogWrapper.qml \
    qml/ColorSlider.qml \
    qml/DefaultWindowDecoration.qml \
    qml/IconButtonStyle.qml \
    qml/IconGlyph.qml \
    qml/qmldir \
    qml/icons.ttf \
    images/critical.png \
    images/information.png \
    images/question.png \
    images/warning.png \
    images/checkers.png \
    images/checkmark.png \
    images/copy.png \
    images/crosshairs.png \
    images/slider_handle.png \
    images/sunken_frame.png \
    images/window_border.png \
    $$WIDGET_DIALOGS_QML_FILES

ios|android|blackberry|winrt {
    DIALOGS_QML_FILES -= $$WIDGET_DIALOGS_QML_FILES
}

QT += quick-private gui gui-private core core-private qml qml-private

# Create the resource file
GENERATED_RESOURCE_FILE = $$OUT_PWD/dialogs.qrc

RESOURCE_CONTENT = \
    "<RCC>" \
    "<qresource prefix=\"/QtQuick/Dialogs\">"

for(resourcefile, DIALOGS_QML_FILES) {
    resourcefileabsolutepath = $$absolute_path($$resourcefile)
    relativepath_in = $$relative_path($$resourcefileabsolutepath, $$_PRO_FILE_PWD_)
    relativepath_out = $$relative_path($$resourcefileabsolutepath, $$OUT_PWD)
    RESOURCE_CONTENT += "<file alias=\"$$relativepath_in\">$$relativepath_out</file>"
}

RESOURCE_CONTENT += \
    "</qresource>" \
    "</RCC>"

write_file($$GENERATED_RESOURCE_FILE, RESOURCE_CONTENT)|error("Aborting.")

RESOURCES += $$GENERATED_RESOURCE_FILE

# In case of a debug build, deploy the QML files too
!qtquickcompiler:CONFIG(debug, debug|release): QML_FILES += $$DIALOGS_QML_FILES

load(qml_plugin)