diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-12-26 08:23:43 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-12-26 08:23:43 +0000 |
| commit | ae6bb99c521af611989439b6db8a14a1b27866fc (patch) | |
| tree | 8086b991f358ef11d763d4beb2080fae87ba6cce /src | |
| parent | 3869eaaf2bfacf4a44733b8346d790999588c37f (diff) | |
Remove savegameinfowidget from organizer core
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 3 | ||||
| -rw-r--r-- | src/mainwindow.h | 1 | ||||
| -rw-r--r-- | src/organizer.pro | 5 | ||||
| -rw-r--r-- | src/savegameinfowidget.cpp | 83 | ||||
| -rw-r--r-- | src/savegameinfowidget.h | 63 | ||||
| -rw-r--r-- | src/savegameinfowidget.ui | 209 | ||||
| -rw-r--r-- | src/savegameinfowidgetgamebryo.cpp | 86 | ||||
| -rw-r--r-- | src/savegameinfowidgetgamebryo.h | 42 |
9 files changed, 0 insertions, 497 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 428f18f9..b80283af 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,8 +18,6 @@ SET(organizer_SRCS settings.cpp selfupdater.cpp selectiondialog.cpp - savegameinfowidgetgamebryo.cpp - savegameinfowidget.cpp queryoverwritedialog.cpp profilesdialog.cpp profile.cpp @@ -110,8 +108,6 @@ SET(organizer_HDRS settings.h selfupdater.h selectiondialog.h - savegameinfowidgetgamebryo.h - savegameinfowidget.h queryoverwritedialog.h profilesdialog.h profile.h @@ -200,7 +196,6 @@ SET(organizer_UIS simpleinstalldialog.ui settingsdialog.ui selectiondialog.ui - savegameinfowidget.ui queryoverwritedialog.ui profilesdialog.ui overwriteinfodialog.ui diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0a690a8e..4d608d59 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -72,8 +72,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "browserdialog.h"
#include "aboutdialog.h"
#include "safewritefile.h"
-#include "savegameinfowidget.h"
-#include "savegameinfowidgetgamebryo.h"
#include "nxmaccessmanager.h"
#include "appconfig.h"
#include <utility.h>
@@ -869,7 +867,6 @@ void MainWindow::displaySaveGameInfo(QListWidgetItem *newItem) {
QString const &save = newItem->data(Qt::UserRole).toString();
if (m_CurrentSaveView == nullptr) {
- //FIXME Is this the right place?
IPluginGame const *game = m_OrganizerCore.managedGame();
SaveGameInfo const *info = game->feature<SaveGameInfo>();
if (info != nullptr) {
diff --git a/src/mainwindow.h b/src/mainwindow.h index 0fd15d85..177048b4 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -39,7 +39,6 @@ class LockedDialog; class OrganizerCore;
#include "plugincontainer.h" //class PluginContainer;
class PluginListSortProxy;
-class SaveGameInfoWidget;
namespace BSA { class Archive; }
#include "iplugingame.h" //namespace MOBase { class IPluginGame; }
namespace MOBase { class IPluginModPage; }
diff --git a/src/organizer.pro b/src/organizer.pro index ee0526ed..0ef2638b 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -27,8 +27,6 @@ SOURCES += \ settings.cpp \
selfupdater.cpp \
selectiondialog.cpp \
- savegameinfowidgetgamebryo.cpp \
- savegameinfowidget.cpp \
queryoverwritedialog.cpp \
profilesdialog.cpp \
profile.cpp \
@@ -105,8 +103,6 @@ HEADERS += \ settings.h \
selfupdater.h \
selectiondialog.h \
- savegameinfowidgetgamebryo.h \
- savegameinfowidget.h \
queryoverwritedialog.h \
profilesdialog.h \
profile.h \
@@ -179,7 +175,6 @@ FORMS += \ simpleinstalldialog.ui \
settingsdialog.ui \
selectiondialog.ui \
- savegameinfowidget.ui \
queryoverwritedialog.ui \
profilesdialog.ui \
overwriteinfodialog.ui \
diff --git a/src/savegameinfowidget.cpp b/src/savegameinfowidget.cpp deleted file mode 100644 index bf4a9598..00000000 --- a/src/savegameinfowidget.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "savegameinfowidget.h"
-#include "ui_savegameinfowidget.h"
-
-#include "isavegame.h"
-#include "gamebryosavegame.h"
-
-#include <QDate>
-#include <QDateTime>
-#include <QFrame>
-#include <QLabel>
-#include <QLayout>
-#include <QLayoutItem>
-#include <QPixmap>
-#include <QString>
-#include <QStyle>
-#include <QTime>
-
-#include <Qt>
-
-
-SaveGameInfoWidget::SaveGameInfoWidget(QWidget *parent)
- : QWidget(parent)
- , ui(new Ui::SaveGameInfoWidget)
-{
- ui->setupUi(this);
- this->setWindowFlags(Qt::ToolTip | Qt::BypassGraphicsProxyWidget);
- setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / qreal(255.0));
- ui->gameFrame->setStyleSheet("background-color: transparent;");
-// installEventFilter(this);
-}
-
-SaveGameInfoWidget::~SaveGameInfoWidget()
-{
- delete ui;
-}
-
-
-void SaveGameInfoWidget::setSave(MOBase::ISaveGame const *saveGame)
-{
- GamebryoSaveGame const *game = dynamic_cast<GamebryoSaveGame const *>(saveGame);
- ui->saveNumLabel->setText(QString("%1").arg(game->getSaveNumber()));
- ui->characterLabel->setText(game->getPCName());
- ui->locationLabel->setText(game->getPCLocation());
- ui->levelLabel->setText(QString("%1").arg(game->getPCLevel()));
- //This somewhat contorted code is because on my system at least, the
- //old way of doing this appears to give short date and long time.
- QDateTime t = saveGame->getCreationTime();
- ui->dateLabel->setText(t.date().toString(Qt::DefaultLocaleShortDate) + " " +
- t.time().toString(Qt::DefaultLocaleLongDate));
- ui->screenshotLabel->setPixmap(QPixmap::fromImage(game->getScreenshot()));
- if (ui->gameFrame->layout() != nullptr) {
- QLayoutItem *item = nullptr;
- while ((item = ui->gameFrame->layout()->takeAt(0)) != nullptr) {
- delete item->widget();
- delete item;
- }
- ui->gameFrame->layout()->setSizeConstraint(QLayout::SetFixedSize);
- }
-}
-
-QFrame *SaveGameInfoWidget::getGameFrame()
-{
- return ui->gameFrame;
-}
diff --git a/src/savegameinfowidget.h b/src/savegameinfowidget.h deleted file mode 100644 index c811313c..00000000 --- a/src/savegameinfowidget.h +++ /dev/null @@ -1,63 +0,0 @@ -/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef SAVEGAMEINFOWIDGET_H
-#define SAVEGAMEINFOWIDGET_H
-
-#include <QObject>
-#include <QWidget>
-
-class QFrame;
-
-namespace Ui {
-class SaveGameInfoWidget;
-}
-
-namespace MOBase { class ISaveGame; }
-
-class SaveGameInfoWidget : public QWidget
-{
- Q_OBJECT
-
-public:
-
- explicit SaveGameInfoWidget(QWidget *parent = 0);
- ~SaveGameInfoWidget();
-
- virtual void setSave(MOBase::ISaveGame const *saveGame);
-
-signals:
-
- void closeSaveInfo();
-
-protected:
-
-// virtual bool eventFilter(QObject *object, QEvent *event);
-
- QFrame *getGameFrame();
-
-private:
-
-private:
-
- Ui::SaveGameInfoWidget *ui;
-
-};
-
-#endif // SAVEGAMEINFOWIDGET_H
diff --git a/src/savegameinfowidget.ui b/src/savegameinfowidget.ui deleted file mode 100644 index e2e9588c..00000000 --- a/src/savegameinfowidget.ui +++ /dev/null @@ -1,209 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SaveGameInfoWidget</class>
- <widget class="QWidget" name="SaveGameInfoWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle">
- <string/>
- </property>
- <property name="toolTip">
- <string notr="true"/>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QFormLayout" name="formLayout">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="font">
- <font>
- <italic>true</italic>
- </font>
- </property>
- <property name="text">
- <string>Save #</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="font">
- <font>
- <italic>true</italic>
- </font>
- </property>
- <property name="text">
- <string>Character</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_4">
- <property name="font">
- <font>
- <italic>true</italic>
- </font>
- </property>
- <property name="text">
- <string>Level</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_3">
- <property name="font">
- <font>
- <italic>true</italic>
- </font>
- </property>
- <property name="text">
- <string>Location</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_5">
- <property name="font">
- <font>
- <italic>true</italic>
- </font>
- </property>
- <property name="text">
- <string>Date</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="saveNumLabel">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string notr="true"/>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="characterLabel">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string notr="true"/>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="levelLabel">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="locationLabel">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string notr="true"/>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QLabel" name="dateLabel">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QFrame" name="gameFrame">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="screenshotLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="text">
- <string notr="true"/>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/savegameinfowidgetgamebryo.cpp b/src/savegameinfowidgetgamebryo.cpp deleted file mode 100644 index 1836a8f2..00000000 --- a/src/savegameinfowidgetgamebryo.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "savegameinfowidgetgamebryo.h"
-
-#include "pluginlist.h"
-#include "gamebryosavegame.h"
-
-#include <QFont>
-#include <QLabel>
-#include <QLayout>
-#include <QVBoxLayout>
-
-
-SaveGameInfoWidgetGamebryo::SaveGameInfoWidgetGamebryo(MOBase::ISaveGame const *saveGame, PluginList *pluginList, QWidget *parent)
- : SaveGameInfoWidget(parent), m_PluginList(pluginList)
-{
- QVBoxLayout *gameLayout = new QVBoxLayout();
- gameLayout->setMargin(0);
- gameLayout->setSpacing(2);
- getGameFrame()->setLayout(gameLayout);
- setSave(saveGame);
-}
-
-
-void SaveGameInfoWidgetGamebryo::setSave(MOBase::ISaveGame const *saveGame)
-{
- SaveGameInfoWidget::setSave(saveGame);
- GamebryoSaveGame const *gamebryoSave = dynamic_cast<GamebryoSaveGame const *>(saveGame);
- QLayout *layout = getGameFrame()->layout();
- QLabel *header = new QLabel(tr("Missing ESPs"));
- QFont headerFont = header->font();
- QFont contentFont = headerFont;
- headerFont.setItalic(true);
- contentFont.setBold(true);
- contentFont.setPointSize(7);
- header->setFont(headerFont);
- layout->addWidget(header);
- int count = 0;
- for (QString const &pluginName : gamebryoSave->getPlugins()) {
- //if (m_PluginList->isEnabled(pluginName)) {
- //should use IPluginList * in interface
- if (m_PluginList->state(pluginName) == MOBase::IPluginList::STATE_ACTIVE) {
- continue;
- }
-
- ++count;
-
- if (count > 10) {
- break;
- }
-
- QLabel *pluginLabel = new QLabel(pluginName);
- pluginLabel->setIndent(10);
- pluginLabel->setFont(contentFont);
- layout->addWidget(pluginLabel);
- }
- if (count > 10) {
- QLabel *dotDotLabel = new QLabel("...");
- dotDotLabel->setIndent(10);
- dotDotLabel->setFont(contentFont);
- layout->addWidget(dotDotLabel);
- }
- if (count == 0) {
- QLabel *dotDotLabel = new QLabel(tr("None"));
- dotDotLabel->setIndent(10);
- dotDotLabel->setFont(contentFont);
- layout->addWidget(dotDotLabel);
- }
-}
diff --git a/src/savegameinfowidgetgamebryo.h b/src/savegameinfowidgetgamebryo.h deleted file mode 100644 index db6c91df..00000000 --- a/src/savegameinfowidgetgamebryo.h +++ /dev/null @@ -1,42 +0,0 @@ -/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef SAVEGAMEINFOWIDGETGAMEBRYO_H
-#define SAVEGAMEINFOWIDGETGAMEBRYO_H
-
-
-#include "savegameinfowidget.h"
-
-class PluginList;
-
-class SaveGameInfoWidgetGamebryo : public SaveGameInfoWidget
-{
-public:
-
- explicit SaveGameInfoWidgetGamebryo(MOBase::ISaveGame const *saveGame, PluginList *pluginList, QWidget *parent = 0);
-
- virtual void setSave(MOBase::ISaveGame const *saveGame);
-
-private:
-
- PluginList *m_PluginList;
-
-};
-
-#endif // SAVEGAMEINFOWIDGETGAMEBRYO_H
|
