64 lines
1.1 KiB
C++
64 lines
1.1 KiB
C++
|
#include "qw_widgetdialogue.h"
|
||
|
|
||
|
QWWidgetDialogue::QWWidgetDialogue(const QString &path) :
|
||
|
qml_path(path)
|
||
|
{
|
||
|
Q_ASSERT(!qml_path.isNull());
|
||
|
// Filepath fixes
|
||
|
if (!qml_path.endsWith(".qml"))
|
||
|
qml_path += ".qml";
|
||
|
if (!qml_path.startsWith("qml/"))
|
||
|
qml_path = "qml/" + qml_path;
|
||
|
}
|
||
|
|
||
|
void QWWidgetDialogue::onExit(int code)
|
||
|
{
|
||
|
Q_UNUSED(code)
|
||
|
}
|
||
|
|
||
|
////////////////////////
|
||
|
|
||
|
QString QWWidgetDialogue::qmlPath() const
|
||
|
{
|
||
|
return qml_path;
|
||
|
}
|
||
|
|
||
|
QString QWWidgetDialogue::customString() const
|
||
|
{
|
||
|
return custom_string;
|
||
|
}
|
||
|
|
||
|
void QWWidgetDialogue::setCustomString(const QString &str)
|
||
|
{
|
||
|
custom_string = str;
|
||
|
}
|
||
|
|
||
|
int QWWidgetDialogue::exitCode() const
|
||
|
{
|
||
|
return exit_code;
|
||
|
}
|
||
|
|
||
|
void QWWidgetDialogue::setExitCode(int code)
|
||
|
{
|
||
|
if (code != exit_code)
|
||
|
exit_code = code;
|
||
|
}
|
||
|
|
||
|
bool QWWidgetDialogue::isCustomStringToSave() const
|
||
|
{
|
||
|
return to_save_string;
|
||
|
}
|
||
|
|
||
|
void QWWidgetDialogue::setCustomStringToSave(bool to_save)
|
||
|
{
|
||
|
to_save_string = to_save;
|
||
|
}
|
||
|
|
||
|
|
||
|
////////////////////////
|
||
|
|
||
|
void QWWidgetDialogue::writeToJson(QJsonObject &savejson)
|
||
|
{
|
||
|
Q_UNUSED(savejson)
|
||
|
}
|