1
0
Fork 0

Remove obsolete files

This commit is contained in:
James Turner 2018-06-27 23:18:18 +01:00
parent 2d6a6cd59e
commit ce15ca666f
6 changed files with 1 additions and 553 deletions

View file

@ -67,8 +67,7 @@ if (APPLE)
endif()
if (HAVE_QT)
qt5_wrap_ui(uic_sources Launcher.ui
SetupRootDialog.ui
qt5_wrap_ui(uic_sources SetupRootDialog.ui
InstallSceneryDialog.ui
)
qt5_add_resources(qrc_sources resources.qrc)
@ -97,8 +96,6 @@ if (HAVE_QT)
InstallSceneryDialog.cxx
LocationController.cxx
LocationController.hxx
ToolboxButton.cpp
ToolboxButton.h
LauncherArgumentTokenizer.cxx
LauncherArgumentTokenizer.hxx
AircraftSearchFilterModel.cxx
@ -107,8 +104,6 @@ if (HAVE_QT)
DefaultAircraftLocator.hxx
LaunchConfig.cxx
LaunchConfig.hxx
ViewCommandLinePage.cxx
ViewCommandLinePage.hxx
MPServersModel.cpp
MPServersModel.h
PathUrlHelper.cxx

View file

@ -1,375 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Launcher</class>
<widget class="QMainWindow" name="Launcher">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>795</width>
<height>658</height>
</rect>
</property>
<property name="windowTitle">
<string>Start FlightGear</string>
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/app-icon-large</normaloff>:/app-icon-large</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QFrame" name="toolbox">
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>8</red>
<green>84</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>8</red>
<green>84</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>8</red>
<green>84</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>8</red>
<green>84</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>1</number>
</property>
<property name="topMargin">
<number>1</number>
</property>
<property name="rightMargin">
<number>1</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<item>
<widget class="ToolboxButton" name="summaryButton">
<property name="text">
<string>Summary</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/toolbox-summary</normaloff>:/toolbox-summary</iconset>
</property>
<property name="pageIndex" stdset="0">
<UInt>0</UInt>
</property>
</widget>
</item>
<item>
<widget class="ToolboxButton" name="aircraftButton">
<property name="text">
<string>Aircraft</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/toolbox-aircraft</normaloff>:/toolbox-aircraft</iconset>
</property>
<property name="pageIndex" stdset="0">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="ToolboxButton" name="locationButton">
<property name="text">
<string>Location</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/toolbox-location</normaloff>:/toolbox-location</iconset>
</property>
<property name="pageIndex" stdset="0">
<number>2</number>
</property>
</widget>
</item>
<item>
<widget class="ToolboxButton" name="environmentButton">
<property name="text">
<string>Environment</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/toolbox-environment</normaloff>:/toolbox-environment</iconset>
</property>
<property name="pageIndex" stdset="0">
<number>3</number>
</property>
</widget>
</item>
<item>
<widget class="ToolboxButton" name="settingsButton">
<property name="text">
<string>Settings</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/toolbox-settings</normaloff>:/toolbox-settings</iconset>
</property>
<property name="pageIndex" stdset="0">
<number>4</number>
</property>
</widget>
</item>
<item>
<widget class="ToolboxButton" name="addOnsButton">
<property name="text">
<string>Add-ons</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/toolbox-addons</normaloff>:/toolbox-addons</iconset>
</property>
<property name="pageIndex" stdset="0">
<number>5</number>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="ToolboxButton" name="flyButton">
<property name="text">
<string>Fly!</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/toolbox-fly</normaloff>:/toolbox-fly</iconset>
</property>
<property name="pageIndex" stdset="0">
<number>99</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="stack">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="summaryPage">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QQuickWidget" name="summary"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="aircraftPage">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QQuickWidget" name="aircraftList"/>
</item>
</layout>
</widget>
<widget class="QQuickWidget" name="location">
</widget>
<widget class="QQuickWidget" name="environmentPage">
</widget>
<widget class="QWidget" name="newSettingsPage">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QQuickWidget" name="settings"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="addOnsPage">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QQuickWidget" name="addOns"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>QQuickWidget</class>
<extends>QWidget</extends>
<header>QtQuickWidgets/QQuickWidget</header>
</customwidget>
<customwidget>
<class>ToolboxButton</class>
<extends>QPushButton</extends>
<header location="global">GUI/ToolboxButton.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>

View file

@ -1,52 +0,0 @@
#include "ToolboxButton.h"
#include <QPainter>
#include <QFontMetrics>
#include <QPalette>
const int ICON_SIZE = 50;
const int INDICATOR_WIDTH = 4;
const int PADDING = 8;
ToolboxButton::ToolboxButton(QWidget *pr) :
QAbstractButton(pr)
{
setCheckable(true);
}
void ToolboxButton::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
if (isChecked()) {
QRect indicatorRect = rect();
indicatorRect.setWidth(INDICATOR_WIDTH);
painter.fillRect(indicatorRect, Qt::white);
}
const int iconLeft = (width() - ICON_SIZE) / 2;
QRect iconRect(iconLeft, PADDING, ICON_SIZE, ICON_SIZE);
// QIcon can paint itself disabled, but it's hard to synchronize the
// text appearance with that
icon().paint(&painter, iconRect, Qt::AlignCenter,
isEnabled() ? QIcon::Normal : QIcon::Disabled);
// white with 50% opacity is what Mac style uses
const QColor iconColor = isEnabled() ? Qt::white : QColor(255, 255, 255, 128);
painter.setPen(iconColor);
QRect textRect = rect();
textRect.setTop(iconRect.bottom());
painter.drawText(textRect, Qt::AlignHCenter, text());
}
QSize ToolboxButton::sizeHint() const
{
QSize icon(ICON_SIZE, ICON_SIZE);
QFontMetrics metrics(font());
QRect bounds = metrics.boundingRect(text());
const int PAD_2 = PADDING * 2;
return QSize(qMax(ICON_SIZE, bounds.width()) + PAD_2, ICON_SIZE + bounds.height() + PAD_2);
}

View file

@ -1,20 +0,0 @@
#ifndef TOOLBOXBUTTON_H
#define TOOLBOXBUTTON_H
#include <QAbstractButton>
class ToolboxButton : public QAbstractButton
{
Q_OBJECT
public:
ToolboxButton(QWidget* pr = nullptr);
protected:
virtual void paintEvent(QPaintEvent* event) override;
virtual QSize sizeHint() const override;
private:
};
#endif // TOOLBOXBUTTON_H

View file

@ -1,73 +0,0 @@
#include "ViewCommandLinePage.hxx"
#include <QTextEdit>
#include <QVBoxLayout>
#include <Main/options.hxx>
#include "LaunchConfig.hxx"
#if 0
#include "ExtraSettingsSection.hxx"
#include "LauncherArgumentTokenizer.hxx"
#endif
ViewCommandLinePage::ViewCommandLinePage(QWidget *parent) : QWidget(parent)
{
QVBoxLayout* vbox = new QVBoxLayout(this);
setLayout(vbox);
m_browser = new QTextEdit(this);
m_browser->setReadOnly(true);
vbox->addWidget(m_browser);
}
#if 0
void ViewCommandLinePage::setExtraSettingsSection(ExtraSettingsSection *ess)
{
m_extraSettings = ess;
}
#endif
void ViewCommandLinePage::setLaunchConfig(LaunchConfig *config)
{
m_config = config;
}
void ViewCommandLinePage::update()
{
QString html;
string_list commandLineOpts = flightgear::Options::sharedInstance()->extractOptions();
if (!commandLineOpts.empty()) {
html += tr("<p>Options passed on the command line:</p>\n");
html += "<ul>\n";
for (auto opt : commandLineOpts) {
html += QString("<li>--") + QString::fromStdString(opt) + "</li>\n";
}
html += "</ul>\n";
}
#if 0
if (m_extraSettings) {
LauncherArgumentTokenizer tk;
Q_FOREACH(auto arg, tk.tokenize(m_extraSettings->argsText())) {
// m_config->setArg(arg.arg, arg.value);
}
}
#endif
m_config->reset();
m_config->collect();
html += tr("<p>Options set in the launcher:</p>\n");
html += "<ul>\n";
for (auto arg : m_config->values()) {
if (arg.value.isEmpty()) {
html += QString("<li>--") + arg.arg + "</li>\n";
} else if (arg.arg == "prop") {
html += QString("<li>--") + arg.arg + ":" + arg.value + "</li>\n";
} else {
html += QString("<li>--") + arg.arg + "=" + arg.value + "</li>\n";
}
}
html += "</ul>\n";
m_browser->setHtml(html);
}

View file

@ -1,27 +0,0 @@
#ifndef VIEWCOMMANDLINEPAGE_HXX
#define VIEWCOMMANDLINEPAGE_HXX
#include <QWidget>
class QTextEdit;
class LaunchConfig;
class ViewCommandLinePage : public QWidget
{
Q_OBJECT
public:
explicit ViewCommandLinePage(QWidget *parent = 0);
void setLaunchConfig(LaunchConfig* config);
void update();
signals:
public slots:
private:
QTextEdit* m_browser;
LaunchConfig* m_config = nullptr;
};
#endif // VIEWCOMMANDLINEPAGE_HXX