[screenshot] added creating turnout dialog screenshots
Dieser Commit ist enthalten in:
Ursprung
d8fd82390b
Commit
d72d574eaf
@ -42,6 +42,7 @@
|
||||
#include "../network/error.hpp"
|
||||
#include "../network/method.hpp"
|
||||
#include "../network/object.hpp"
|
||||
#include "../network/objectproperty.hpp"
|
||||
#include "../settings/boardsettings.hpp"
|
||||
#include "../settings/generalsettings.hpp"
|
||||
#include "../subwindow/subwindow.hpp"
|
||||
@ -50,6 +51,7 @@
|
||||
#include "../widget/objectlist/objectlistwidget.hpp"
|
||||
#include "../widget/objectlist/interfacelistwidget.hpp"
|
||||
#include "../widget/objectlist/throttleobjectlistwidget.hpp"
|
||||
#include "../widget/outputmapwidget.hpp"
|
||||
#include "../widget/throttle/throttlebutton.hpp"
|
||||
#include "../widget/throttle/throttlewidget.hpp"
|
||||
#include "../wizard/newboardwizard.hpp"
|
||||
@ -556,6 +558,39 @@ void ScreenShotDialog::start()
|
||||
return false;
|
||||
});
|
||||
|
||||
// Turnout dialog:
|
||||
m_steps.push(
|
||||
[this]()
|
||||
{
|
||||
m_mainWindow.showObject("turnout_1");
|
||||
return true;
|
||||
});
|
||||
m_steps.push(
|
||||
[this]()
|
||||
{
|
||||
if(auto* w = getSubWindow(QStringLiteral("turnout_1")))
|
||||
{
|
||||
w->resize(400, 300);
|
||||
auto* map = static_cast<OutputMapWidget*>(static_cast<QTabWidget*>(w->widget()->layout()->itemAt(0)->widget())->widget(1)->layout()->itemAt(0)->widget());
|
||||
map->m_object->getObjectProperty("interface")->setByObjectId("loconet_1");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
m_steps.push(
|
||||
[this]()
|
||||
{
|
||||
if(auto* w = getSubWindow(QStringLiteral("turnout_1")))
|
||||
{
|
||||
saveWidgetImage(w, QStringLiteral("getting-started/turnout-general.png"));
|
||||
static_cast<QTabWidget*>(w->widget()->layout()->itemAt(0)->widget())->setCurrentIndex(1);
|
||||
saveWidgetImage(w, QStringLiteral("getting-started/turnout-output-mapping.png"));
|
||||
w->close();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// Board tiles:
|
||||
m_steps.push(
|
||||
[this]()
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* This file is part of the traintastic source code.
|
||||
*
|
||||
* Copyright (C) 2021,2024 Reinder Feenstra
|
||||
* Copyright (C) 2021-2025 Reinder Feenstra
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -39,6 +39,8 @@ class OutputMapWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class ScreenShotDialog;
|
||||
|
||||
protected:
|
||||
ObjectPtr m_object;
|
||||
ObjectPtr m_parentObject;
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren