Compare commits

...

7 Commits

10 changed files with 203 additions and 109 deletions

View File

@ -40,6 +40,18 @@
"name": "index", "name": "index",
"type": "quint16" "type": "quint16"
}] }]
},
"deselect": {
"return": "void",
"mut": true
},
"select": {
"return": "void",
"mut": true,
"arguments": [{
"name": "index",
"type": "quint16"
}]
} }
}, },
"properties": { "properties": {

View File

@ -1,7 +1,7 @@
#include "tycho.h" #include "tycho.h"
MapModel::MapModel(QObject *parent) : MapModel::MapModel(Project *parent) :
AbstractMapModel(parent), AbstractMapModel(static_cast<QWidget *>(parent)),
ProjectModel() ProjectModel()
{ {
dbgPrintFunc(); dbgPrintFunc();
@ -12,11 +12,6 @@ MapModel::~MapModel()
dbgPrintFunc(); dbgPrintFunc();
} }
ProjectModelType MapModel::type() const
{
return ProjectModelType::Map;
}
bool MapModel::isDirty() const bool MapModel::isDirty() const
{ {
return AbstractMapModel::isDirty(); return AbstractMapModel::isDirty();
@ -37,6 +32,22 @@ bool MapModel::saveAs(QString const &path) const
return AbstractMapModel::saveAs(path); return AbstractMapModel::saveAs(path);
} }
void MapModel::deselect()
{
AbstractMapModel::deselect();
emit deselected();
}
void MapModel::select(QModelIndex const &index)
{
auto idx = index.internalId();
AbstractMapModel::select(idx);
emit selected(idx);
}
QVariant MapModel::data(const QModelIndex &index, int role) const QVariant MapModel::data(const QModelIndex &index, int role) const
{ {
switch(role) { switch(role) {

View File

@ -1,8 +1,8 @@
#include "tycho.h" #include "tycho.h"
MapProps::MapProps(std::weak_ptr<MapModel> _mapModel, QWidget *parent) : MapProps::MapProps(Project *parent) :
QDialog(parent), QDialog(static_cast<QWidget *>(parent)),
mapModel(_mapModel) mapModel(parent->getMapModel())
{ {
setupUi(this); setupUi(this);
@ -12,8 +12,8 @@ MapProps::MapProps(std::weak_ptr<MapModel> _mapModel, QWidget *parent) :
bbox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); bbox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
verticalLayout->addWidget(bbox); verticalLayout->addWidget(bbox);
connect(bbox, SIGNAL(accepted()), this, SLOT(accept())); connect(bbox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(bbox, SIGNAL(rejected()), this, SLOT(reject())); connect(bbox, &QDialogButtonBox::rejected, this, &QDialog::reject);
dbgPrintFunc(); dbgPrintFunc();
} }
@ -23,4 +23,9 @@ MapProps::~MapProps()
dbgPrintFunc(); dbgPrintFunc();
} }
void MapProps::accept()
{
done(QDialog::Accepted);
}
// EOF // EOF

View File

@ -1,8 +1,8 @@
#include "tycho.h" #include "tycho.h"
MapView::MapView(std::weak_ptr<MapModel> _mapModel, QWidget *parent) : MapView::MapView(Project *parent) :
QWidget(parent), QWidget(static_cast<QWidget *>(parent)),
mapModel(_mapModel) mapModel(parent->getMapModel())
{ {
setupUi(this); setupUi(this);

View File

@ -22,7 +22,7 @@ Menu::~Menu()
void Menu::mapNew() void Menu::mapNew()
{ {
QScopedPointer proj{new Project(ProjectModelType::Map)}; QScopedPointer proj{new Project(ProjectType::Map)};
addProject(proj.take()); addProject(proj.take());
} }
@ -40,7 +40,7 @@ void Menu::mapOpen()
"All files (*)")); "All files (*)"));
if(!fname.isEmpty()) { if(!fname.isEmpty()) {
QScopedPointer proj{new Project(ProjectModelType::Map)}; QScopedPointer proj{new Project(ProjectType::Map)};
if(proj->getModel()->open(fname)) { if(proj->getModel()->open(fname)) {
addProject(proj.take()); addProject(proj.take());
@ -98,19 +98,22 @@ void Menu::openMapProperties()
{ {
auto proj = activeProject(); auto proj = activeProject();
if(proj && proj->getModel()->type() == ProjectModelType::Map) { if(proj && proj->getType() == ProjectType::Map) {
MapProps props{proj->getMapModel(), proj}; MapProps props{proj};
props.exec(); props.exec();
} }
} }
void Menu::updateActions() void Menu::updateActions()
{ {
auto proj = activeProject(); std::optional<ProjectType> active;
bool active = proj != nullptr;
actionClose->setEnabled(active); if(auto proj = activeProject()) {
actionMapProps->setEnabled(active); active = proj->getType();
}
actionClose->setEnabled(!!active);
actionMapProps->setEnabled(active == ProjectType::Map);
} }
void Menu::closeEvent(QCloseEvent *event) void Menu::closeEvent(QCloseEvent *event)

View File

@ -1,9 +1,26 @@
#include "tycho.h" #include "tycho.h"
Project::Project(ProjectModelType type) : static
ProjectModel *makeModel(Project *proj)
{
switch(proj->getType()) {
case ProjectType::Map: return new MapModel(proj);
}
}
static
ProjectView *makeView(Project *proj)
{
switch(proj->getType()) {
case ProjectType::Map: return new MapView(proj);
}
}
Project::Project(ProjectType _type) :
QMdiSubWindow(), QMdiSubWindow(),
model(nullptr), type(_type),
view(nullptr) model(makeModel(this)),
view(makeView(this))
{ {
auto widget = new QWidget(this); auto widget = new QWidget(this);
@ -12,15 +29,13 @@ Project::Project(ProjectModelType type) :
setWidget(widget); setWidget(widget);
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
switch(type) { listView->setModel(dynamic_cast<QAbstractItemModel *>(model));
case ProjectModelType::Map: verticalLayout->insertWidget(0, dynamic_cast<QWidget *>(view));
model.reset(new MapModel(this));
view = new MapView(getMapModel(), this);
break;
}
listView->setModel(dynamic_cast<QAbstractItemModel *>(model.get())); connect(listView,
verticalLayout->insertWidget(0, view); SIGNAL(doubleClicked(QModelIndex const &)),
dynamic_cast<QObject *>(model),
SLOT(select(QModelIndex const &)));
dbgPrintFunc(); dbgPrintFunc();
} }
@ -30,14 +45,19 @@ Project::~Project()
dbgPrintFunc(); dbgPrintFunc();
} }
std::shared_ptr<ProjectModel> Project::getModel() ProjectType Project::getType() const
{
return type;
}
ProjectModel *Project::getModel() const
{ {
return model; return model;
} }
std::shared_ptr<MapModel> Project::getMapModel() MapModel *Project::getMapModel() const
{ {
return std::dynamic_pointer_cast<MapModel>(model); return dynamic_cast<MapModel *>(model);
} }
void Project::closeEvent(QCloseEvent *event) void Project::closeEvent(QCloseEvent *event)

View File

@ -3,7 +3,7 @@
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
#include <iostream> #include <iostream>
#include <memory> #include <optional>
#include <vector> #include <vector>
#include <QApplication> #include <QApplication>
@ -25,74 +25,92 @@
#include "../ui/ui_menu.h" #include "../ui/ui_menu.h"
#include "../ui/ui_project.h" #include "../ui/ui_project.h"
// Types ---------------------------------------------------------------------|
class MapModel; class MapModel;
class MapProps; class MapProps;
class MapView; class MapView;
class Menu; class Menu;
class Project; class Project;
enum class ProjectModelType enum class ProjectType
{ {
Map, Map,
}; };
// Interfaces ----------------------------------------------------------------|
class ProjectModel class ProjectModel
{ {
public: public:
virtual ~ProjectModel() {} virtual ~ProjectModel() {}
virtual ProjectModelType type() const = 0;
virtual bool isDirty() const = 0; virtual bool isDirty() const = 0;
virtual bool open(QString const &path) = 0; virtual bool open(QString const &path) = 0;
virtual bool save() const = 0; virtual bool save() const = 0;
virtual bool saveAs(QString const &path) const = 0; virtual bool saveAs(QString const &path) const = 0;
}; };
class ProjectView
{
public:
virtual ~ProjectView() {}
};
// Implementations -----------------------------------------------------------|
class MapModel final : public AbstractMapModel, public ProjectModel class MapModel final : public AbstractMapModel, public ProjectModel
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit MapModel(QObject *parent = nullptr); explicit MapModel(Project *parent);
~MapModel() override; ~MapModel() override;
ProjectModelType type() const override;
bool isDirty() const override; bool isDirty() const override;
bool open(QString const &path) override; bool open(QString const &path) override;
bool save() const override; bool save() const override;
bool saveAs(QString const &path) const override; bool saveAs(QString const &path) const override;
public slots:
void deselect();
void select(QModelIndex const &index);
signals:
void deselected();
void selected(std::uint16_t index);
private: private:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) QVariant data(const QModelIndex &index, int role = Qt::DisplayRole)
const override; const override;
}; };
class MapView final : public QWidget, public ProjectView, private Ui::MapView
{
Q_OBJECT
public:
explicit MapView(Project *parent);
~MapView();
private:
MapModel *const mapModel;
};
// UI ------------------------------------------------------------------------|
class MapProps final : public QDialog, private Ui::MapProps class MapProps final : public QDialog, private Ui::MapProps
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit MapProps(std::weak_ptr<MapModel> mapModel, explicit MapProps(Project *parent);
QWidget *parent = nullptr);
~MapProps(); ~MapProps();
private: void accept() override;
std::weak_ptr<MapModel> mapModel;
};
class MapView final : public QWidget, private Ui::MapView
{
Q_OBJECT
public:
explicit MapView(std::weak_ptr<MapModel> mapModel,
QWidget *parent = nullptr);
~MapView();
private: private:
std::weak_ptr<MapModel> mapModel; MapModel *const mapModel;
}; };
class Menu final : public QMainWindow, private Ui::Menu class Menu final : public QMainWindow, private Ui::Menu
@ -116,8 +134,9 @@ protected:
void openLicense(QWidget *parent); void openLicense(QWidget *parent);
private: private:
Project *activeProject() const; Project *activeProject() const;
QMdiSubWindow *activeSubWindow() const; QMdiSubWindow *activeSubWindow() const;
void addProject(Project *proj); void addProject(Project *proj);
}; };
@ -126,35 +145,44 @@ class Project final : public QMdiSubWindow, private Ui::Project
Q_OBJECT Q_OBJECT
public: public:
explicit Project(ProjectModelType type); explicit Project(ProjectType type);
~Project(); ~Project();
std::shared_ptr<ProjectModel> getModel(); ProjectType getType() const;
std::shared_ptr<MapModel> getMapModel();
ProjectModel *getModel() const;
MapModel *getMapModel() const;
protected: protected:
void closeEvent(QCloseEvent *event) override; void closeEvent(QCloseEvent *event) override;
private: private:
std::shared_ptr<ProjectModel> model; ProjectType const type;
QWidget *view;
ProjectModel *const model;
ProjectView *const view;
}; };
// Functions -----------------------------------------------------------------|
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-security"
template<typename... VA> template<typename... VA>
static inline void dbgPrint([[maybe_unused]] char const *fmt, static inline
[[maybe_unused]] VA &&...va) void dbgPrint([[maybe_unused]] char const *fmt, [[maybe_unused]] VA &&...va)
{ {
#ifdef TYCHO_DEBUG_ASSERTIONS #ifdef TYCHO_DEBUG_ASSERTIONS
qDebug(fmt, std::forward<VA>(va)...); qDebug(fmt, std::forward<VA>(va)...);
#endif #endif
} }
#pragma clang diagnostic pop
#define dbgPrintFunc() dbgPrint("%s", __func__) #define dbgPrintFunc() dbgPrint("%s", __func__)
static inline constexpr std::uint32_t fourCC(std::uint8_t a, constexpr
std::uint8_t b, std::uint32_t fourCC(std::byte a, std::byte b, std::byte c, std::byte d)
std::uint8_t c,
std::uint8_t d)
{ {
return (a << 24) | (b << 16) | (c << 8) | d; return (a << 24) | (b << 16) | (c << 8) | d;
} }

View File

@ -38,7 +38,7 @@ impl AbstractMapModelTrait for AbstractMapModel
eprintln!("new AbstractMapModel"); eprintln!("new AbstractMapModel");
} }
Self{emit, map: EntryDataMap::default()} Self{emit, map: EntryDataMap::default(), selected: None}
} }
/// Returns the emitter of `self`. /// Returns the emitter of `self`.
@ -100,6 +100,17 @@ impl AbstractMapModelTrait for AbstractMapModel
/// Returns `true` if the file has been modified from its original state. /// Returns `true` if the file has been modified from its original state.
fn is_dirty(&self) -> bool {false} fn is_dirty(&self) -> bool {false}
fn deselect(&mut self) {self.selected = None;}
fn select(&mut self, index: u16)
{
if cfg!(debug_assertions) {
eprintln!("selecting map {}", index);
}
self.selected = Some(index);
}
} }
impl Drop for AbstractMapModel impl Drop for AbstractMapModel
@ -113,8 +124,9 @@ impl Drop for AbstractMapModel
} }
pub struct AbstractMapModel { pub struct AbstractMapModel {
emit: AbstractMapModelEmitter, emit: AbstractMapModelEmitter,
map: EntryDataMap, map: EntryDataMap,
selected: Option<u16>,
} }
// EOF // EOF

View File

@ -43,7 +43,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="lineEdit"> <widget class="QLineEdit" name="mapName">
<property name="toolTip"> <property name="toolTip">
<string>The name of the map. This is used in the level selection menu.</string> <string>The name of the map. This is used in the level selection menu.</string>
</property> </property>
@ -63,7 +63,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QComboBox" name="comboBox"> <widget class="QComboBox" name="textureSet">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -111,7 +111,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QComboBox" name="comboBox_2"> <widget class="QComboBox" name="landscape">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -154,7 +154,7 @@
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="4" column="1">
<widget class="QSpinBox" name="spinBox"> <widget class="QSpinBox" name="musicNo">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -187,7 +187,7 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="2" column="0"> <item row="2" column="0">
<widget class="QCheckBox" name="checkBox_3"> <widget class="QCheckBox" name="carnage">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played in the Carnage game mode.</string> <string>The map can be played in the Carnage game mode.</string>
</property> </property>
@ -197,7 +197,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QCheckBox" name="checkBox_4"> <widget class="QCheckBox" name="ktmwtb">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played in the Kill The Man With The Ball game mode.</string> <string>The map can be played in the Kill The Man With The Ball game mode.</string>
</property> </property>
@ -207,7 +207,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QCheckBox" name="checkBox_2"> <widget class="QCheckBox" name="coOperative">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played in co-operative multi-player.</string> <string>The map can be played in co-operative multi-player.</string>
</property> </property>
@ -217,7 +217,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="checkBox"> <widget class="QCheckBox" name="solo">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played single-player.</string> <string>The map can be played single-player.</string>
</property> </property>
@ -227,7 +227,7 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QCheckBox" name="checkBox_5"> <widget class="QCheckBox" name="kingOfTheHill">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played in the King of the Hill game mode.</string> <string>The map can be played in the King of the Hill game mode.</string>
</property> </property>
@ -237,7 +237,7 @@
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QCheckBox" name="checkBox_6"> <widget class="QCheckBox" name="defense">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played in the Defense game mode.</string> <string>The map can be played in the Defense game mode.</string>
</property> </property>
@ -247,7 +247,7 @@
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QCheckBox" name="checkBox_7"> <widget class="QCheckBox" name="rugby">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played in the Rugby game mode.</string> <string>The map can be played in the Rugby game mode.</string>
</property> </property>
@ -257,7 +257,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QCheckBox" name="checkBox_8"> <widget class="QCheckBox" name="captureTheFlag">
<property name="toolTip"> <property name="toolTip">
<string>The map can be played in the Capture the Flag game mode.</string> <string>The map can be played in the Capture the Flag game mode.</string>
</property> </property>
@ -279,7 +279,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<widget class="QCheckBox" name="checkBox_17"> <widget class="QCheckBox" name="vacuum">
<property name="toolTip"> <property name="toolTip">
<string>This flag makes it so most weapons don't work, and the player's oxygen slowly depletes.</string> <string>This flag makes it so most weapons don't work, and the player's oxygen slowly depletes.</string>
</property> </property>
@ -289,7 +289,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_18"> <widget class="QCheckBox" name="magnetic">
<property name="toolTip"> <property name="toolTip">
<string>This flag makes the motion sensor extremely glitchy.</string> <string>This flag makes the motion sensor extremely glitchy.</string>
</property> </property>
@ -299,7 +299,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_19"> <widget class="QCheckBox" name="rebellion">
<property name="toolTip"> <property name="toolTip">
<string>This flag strips the player's items and health, and makes S'pht friendly.</string> <string>This flag strips the player's items and health, and makes S'pht friendly.</string>
</property> </property>
@ -309,7 +309,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_20"> <widget class="QCheckBox" name="lowGravity">
<property name="toolTip"> <property name="toolTip">
<string>This flag lowers gravity significantly.</string> <string>This flag lowers gravity significantly.</string>
</property> </property>
@ -319,7 +319,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_21"> <widget class="QCheckBox" name="marathon1Glue">
<property name="toolTip"> <property name="toolTip">
<string>This flag makes glue polygons handle like they did in Marathon 1.</string> <string>This flag makes glue polygons handle like they did in Marathon 1.</string>
</property> </property>
@ -329,7 +329,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_22"> <widget class="QCheckBox" name="lavaFloor">
<property name="toolTip"> <property name="toolTip">
<string>This flag makes floors damage the player.</string> <string>This flag makes floors damage the player.</string>
</property> </property>
@ -339,7 +339,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_23"> <widget class="QCheckBox" name="rebellionNoStrip">
<property name="toolTip"> <property name="toolTip">
<string>This flag makes S'pht friendly.</string> <string>This flag makes S'pht friendly.</string>
</property> </property>
@ -349,7 +349,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_24"> <widget class="QCheckBox" name="music">
<property name="toolTip"> <property name="toolTip">
<string>This flag enables music in the level.</string> <string>This flag enables music in the level.</string>
</property> </property>
@ -359,7 +359,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_25"> <widget class="QCheckBox" name="terminalsStopTime">
<property name="toolTip"> <property name="toolTip">
<string>This flag makes reading terminals stop time in single-player.</string> <string>This flag makes reading terminals stop time in single-player.</string>
</property> </property>
@ -369,7 +369,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_26"> <widget class="QCheckBox" name="m1MonsterLimits">
<property name="toolTip"> <property name="toolTip">
<string>This flag sets monster activation limits to Marathon 1's.</string> <string>This flag sets monster activation limits to Marathon 1's.</string>
</property> </property>
@ -379,7 +379,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_27"> <widget class="QCheckBox" name="m1WeaponDifferences">
<property name="toolTip"> <property name="toolTip">
<string>This flag changes weapon pickups on Total Carnage and makes grenades low gravity.</string> <string>This flag changes weapon pickups on Total Carnage and makes grenades low gravity.</string>
</property> </property>
@ -402,7 +402,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="checkBox_9"> <widget class="QCheckBox" name="extermination">
<property name="toolTip"> <property name="toolTip">
<string>The player must kill all monsters on the map, allowing for only up to 8 of them to still be alive.</string> <string>The player must kill all monsters on the map, allowing for only up to 8 of them to still be alive.</string>
</property> </property>
@ -412,7 +412,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QCheckBox" name="checkBox_10"> <widget class="QCheckBox" name="exploration">
<property name="toolTip"> <property name="toolTip">
<string>The player must stand in polygons marked as explorable.</string> <string>The player must stand in polygons marked as explorable.</string>
</property> </property>
@ -422,7 +422,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QCheckBox" name="checkBox_12"> <widget class="QCheckBox" name="repair">
<property name="toolTip"> <property name="toolTip">
<string>The player must flip switches marked as repairable.</string> <string>The player must flip switches marked as repairable.</string>
</property> </property>
@ -432,7 +432,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QCheckBox" name="checkBox_11"> <widget class="QCheckBox" name="retrieval">
<property name="toolTip"> <property name="toolTip">
<string>The player must grab items marked as retreivable.</string> <string>The player must grab items marked as retreivable.</string>
</property> </property>
@ -442,7 +442,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QCheckBox" name="checkBox_13"> <widget class="QCheckBox" name="rescue">
<property name="toolTip"> <property name="toolTip">
<string>The player must keep half of the BoBs in the level alive. Failure will be set if more than half are killed.</string> <string>The player must keep half of the BoBs in the level alive. Failure will be set if more than half are killed.</string>
</property> </property>
@ -452,7 +452,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QCheckBox" name="checkBox_14"> <widget class="QCheckBox" name="m1Exploration">
<property name="toolTip"> <property name="toolTip">
<string>The player must look at polygons marked as explorable.</string> <string>The player must look at polygons marked as explorable.</string>
</property> </property>
@ -462,7 +462,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QCheckBox" name="checkBox_15"> <widget class="QCheckBox" name="m1Rescue">
<property name="toolTip"> <property name="toolTip">
<string>The player must flip the last (by side index) switch marked as repairable.</string> <string>The player must flip the last (by side index) switch marked as repairable.</string>
</property> </property>
@ -472,7 +472,7 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QCheckBox" name="checkBox_16"> <widget class="QCheckBox" name="m1Repair">
<property name="toolTip"> <property name="toolTip">
<string>The exact same as Repair, but uses the internal ID for Marathon 1 BoBs instead.</string> <string>The exact same as Repair, but uses the internal ID for Marathon 1 BoBs instead.</string>
</property> </property>
@ -491,9 +491,9 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
<sender>checkBox_24</sender> <sender>music</sender>
<signal>toggled(bool)</signal> <signal>toggled(bool)</signal>
<receiver>spinBox</receiver> <receiver>musicNo</receiver>
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
@ -507,9 +507,9 @@ Some of them also set the &quot;failure&quot; terminal state when the objective
</hints> </hints>
</connection> </connection>
<connection> <connection>
<sender>checkBox_24</sender> <sender>music</sender>
<signal>toggled(bool)</signal> <signal>toggled(bool)</signal>
<receiver>comboBox_2</receiver> <receiver>landscape</receiver>
<slot>setDisabled(bool)</slot> <slot>setDisabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">

View File

@ -16,6 +16,9 @@
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QListView" name="listView"> <widget class="QListView" name="listView">
<property name="statusTip">
<string>A list of all items in this project. Double-click an item to open it in the view.</string>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::NoFrame</enum> <enum>QFrame::NoFrame</enum>
</property> </property>