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/savegameinfowidget.cpp | |
| parent | 3869eaaf2bfacf4a44733b8346d790999588c37f (diff) | |
Remove savegameinfowidget from organizer core
Diffstat (limited to 'src/savegameinfowidget.cpp')
| -rw-r--r-- | src/savegameinfowidget.cpp | 83 |
1 files changed, 0 insertions, 83 deletions
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;
-}
|
