1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Add event settings ui

This commit is contained in:
nordsoft 2023-09-07 23:57:56 +02:00
parent 9e14d8d170
commit e8b9034149
4 changed files with 160 additions and 0 deletions

View File

@ -19,6 +19,7 @@ set(editor_SRCS
mapsettings/timedevent.cpp
mapsettings/victoryconditions.cpp
mapsettings/loseconditions.cpp
mapsettings/eventsettings.cpp
playersettings.cpp
playerparams.cpp
scenelayer.cpp
@ -53,6 +54,7 @@ set(editor_HEADERS
mapsettings/timedevent.h
mapsettings/victoryconditions.h
mapsettings/loseconditions.h
mapsettings/eventsettings.h
playersettings.h
playerparams.h
scenelayer.h
@ -77,6 +79,7 @@ set(editor_FORMS
mapsettings/timedevent.ui
mapsettings/victoryconditions.ui
mapsettings/loseconditions.ui
mapsettings/eventsettings.ui
playersettings.ui
playerparams.ui
validator.ui

View File

@ -0,0 +1,42 @@
/*
* eventsettings.cpp, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#include "StdInc.h"
#include "eventsettings.h"
#include "ui_eventsettings.h"
EventSettings::EventSettings(QWidget *parent) :
QWidget(parent),
ui(new Ui::EventSettings)
{
ui->setupUi(this);
}
EventSettings::~EventSettings()
{
delete ui;
}
void EventSettings::on_timedEventAdd_clicked()
{
}
void EventSettings::on_timedEventRemove_clicked()
{
}
void EventSettings::on_eventsList_itemActivated(QListWidgetItem *item)
{
}

View File

@ -0,0 +1,41 @@
/*
* eventsettings.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#ifndef EVENTSETTINGS_H
#define EVENTSETTINGS_H
#include "abstractsettings.h"
namespace Ui {
class EventSettings;
}
class EventSettings : public AbstractSettings
{
Q_OBJECT
public:
explicit EventSettings(QWidget *parent = nullptr);
~EventSettings();
void initialize(const CMap & map) override;
void update(CMap & map) override;
private slots:
void on_timedEventAdd_clicked();
void on_timedEventRemove_clicked();
void on_eventsList_itemActivated(QListWidgetItem *item);
private:
Ui::EventSettings *ui;
};
#endif // EVENTSETTINGS_H

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EventSettings</class>
<widget class="QWidget" name="EventSettings">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>672</width>
<height>456</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Timed events</string>
</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>
<item>
<widget class="QPushButton" name="timedEventAdd">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="timedEventRemove">
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="eventsList"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>