Skip to content

Commit

Permalink
Remove Scale Options
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed Mar 19, 2022
1 parent b914b43 commit ef9360a
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 160 deletions.
11 changes: 3 additions & 8 deletions demos/ff7tkWidgetGallery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWin
ui->setupUi(this);
setWindowTitle(QStringLiteral("ff7tkWidgetGallery-%1").arg(ff7tk_version()));
hideAllBoxes();
QScreen *screen = QGuiApplication::screens().at(0);
screen->logicalDotsPerInchX();
ui->sb_scale->setValue(screen->logicalDotsPerInchX() / 96);
scale = screen->logicalDotsPerInchX() / 96;


ListPHS = new PhsListWidget(this);
QHBoxLayout *listLayout = new QHBoxLayout;
Expand All @@ -57,7 +52,7 @@ MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWin
materia_editor_layout->addWidget(materia_editor);
ui->editor_box->setLayout(materia_editor_layout);

char_editor = new CharEditor(scale);
char_editor = new CharEditor(this);
QHBoxLayout *char_editor_layout = new QHBoxLayout();
char_editor_layout->addWidget(char_editor);
ui->charEditor_box->setLayout(char_editor_layout);
Expand All @@ -67,7 +62,7 @@ MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWin
item_list_layout->addWidget(item_list);
ui->itemList_box->setLayout(item_list_layout);

locViewer = new LocationViewer(scale, this);
locViewer = new LocationViewer(this);
QHBoxLayout *locLayout = new QHBoxLayout();
locLayout->addWidget(locViewer);
ui->innerLocBox->setLayout(locLayout);
Expand Down Expand Up @@ -156,7 +151,7 @@ void MainWindow::on_btn_slotSelect_clicked()
QString filename = QFileDialog::getOpenFileName(this, "Select A Save To Preview", QDir::homePath(), fileFilter);
if (!filename.isEmpty()) {
if (ff7save.get()->loadFile(filename)) {
SlotSelect *slotSelect = new SlotSelect(scale, ff7save.get(), ui->cbShowLoad->isChecked());
SlotSelect *slotSelect = new SlotSelect(ff7save.get(), ui->cbShowLoad->isChecked());
if (slotSelect->exec() == -1) {
on_btn_slotSelect_clicked();
} else {
Expand Down
27 changes: 13 additions & 14 deletions demos/ff7tkWidgetGallery/mainwindow.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************/
// copyright 2012 - 2020 Chris Rizzitello <[email protected]> //
// copyright 2012 - 2021 Chris Rizzitello <[email protected]> //
// //
// This file is part of FF7tk //
// //
Expand Down Expand Up @@ -68,17 +68,16 @@ private slots:

private:

Ui::MainWindow *ui;
qreal scale;
MateriaEditor *materia_editor;
CharEditor *char_editor;
ItemList *item_list;
MetadataCreator *metadataCreator;
PhsListWidget *ListPHS;
MenuListWidget *ListMenu;
Lgp *lgpFile;
LocationViewer *locViewer;
OptionsWidget *optionsWidget;
ChocoboManager *chocoboManager;
AchievementEditor *achievementEditor;
Ui::MainWindow *ui = nullptr;
MateriaEditor *materia_editor = nullptr;
CharEditor *char_editor = nullptr;
ItemList *item_list = nullptr;
MetadataCreator *metadataCreator = nullptr;
PhsListWidget *ListPHS = nullptr;
MenuListWidget *ListMenu = nullptr;
Lgp *lgpFile = nullptr;
LocationViewer *locViewer = nullptr;
OptionsWidget *optionsWidget = nullptr;
ChocoboManager *chocoboManager = nullptr;
AchievementEditor *achievementEditor = nullptr;
};
7 changes: 0 additions & 7 deletions demos/ff7tkWidgetGallery/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@
</item>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="sb_scale">
<property name="prefix">
<string>Widget Scale : </string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="item_list_box">
<property name="title">
Expand Down
Loading

0 comments on commit ef9360a

Please sign in to comment.