Skip to content

Commit

Permalink
GUI: Remove testing buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
fdde authored and DrMcCoy committed Dec 29, 2017
1 parent d910522 commit e93d0ce
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 41 deletions.
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ AX_CHECK_LZMA(5, 0, 3, 2, , AC_MSG_ERROR([liblzma(>= 5.0.5) is required and coul

dnl Graphic libraries
AX_CHECK_QT5(5.7.1, , AC_MSG_ERROR([Qt5 (>= 5.7.1, modules Core, Gui, Multimedia, Widgets) is required and could not be found!]))
AC_CHECK_PROGS(UIC, [uic])
AC_CHECK_PROGS(UIC, [uic-qt5 uic])
if test -z "$UIC"; then
AC_MSG_ERROR([Qt utility program uic is required.])
fi

dnl Sound libraries
AX_CHECK_AL( , AC_MSG_ERROR([OpenAL or OpenAL Soft (>= 1.12) is required and could not be found!]))
Expand Down
2 changes: 0 additions & 2 deletions src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ MainWindow::MainWindow(QWidget *parent, const char *title, const QSize &size, co
if (path.empty()) {
// nothing is open yet
_ui.actionClose->setEnabled(false);
_resInfo->getUi().bCloseDir->setEnabled(false);
}
else {
_rootPath = path.toQString();
Expand Down Expand Up @@ -112,7 +111,6 @@ void MainWindow::setTreeViewModel(const QString &path) {

_ui.log->append(tr("Set root: %1").arg(path));

_resInfo->getUi().bCloseDir->setEnabled(true);
_ui.actionClose->setEnabled(true);
}

Expand Down
18 changes: 1 addition & 17 deletions src/gui/panelresourceinfo.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <QDir>
#include <QFileDialog>
#include <QPushButton>

#include "verdigris/wobjectimpl.h"

Expand Down Expand Up @@ -40,29 +41,13 @@ PanelResourceInfo::PanelResourceInfo(QWidget *parent)
QObject::connect(_btnExportTGA, &QPushButton::clicked, this, &PanelResourceInfo::slotExportTGA);
QObject::connect(_btnExportBMUMP3, &QPushButton::clicked, this, &PanelResourceInfo::slotExportBMUMP3);
QObject::connect(_btnExportWAV, &QPushButton::clicked, this, &PanelResourceInfo::slotExportWAV);

QObject::connect(_ui.bLoadKotorDir, &QPushButton::clicked, this, &PanelResourceInfo::slotLoadKotorDir);
QObject::connect(_ui.bCloseDir, &QPushButton::clicked, this, &PanelResourceInfo::slotCloseDir);
}

Ui::PanelResourceInfo &PanelResourceInfo::getUi() {
return _ui;
}

/** SLOTS **/
void PanelResourceInfo::slotLoadKotorDir() {
QString myKotorPath("/home/mike/kotor");
QDir dir(myKotorPath);
if (dir.exists())
emit loadModel(myKotorPath);
else
emit log("ERROR: /home/mike/kotor doesn't exist.");
}

void PanelResourceInfo::slotCloseDir() {
emit closeDirClicked();
}

void PanelResourceInfo::slotSave() {
emit saveClicked();
}
Expand Down Expand Up @@ -177,7 +162,6 @@ void PanelResourceInfo::clearLabels() {
}

void PanelResourceInfo::setButtonsForClosedDir() {
_ui.bCloseDir->setEnabled(false);
_btnExportRaw->setVisible(false);
_btnExportBMUMP3->setVisible(false);
_btnExportWAV->setVisible(false);
Expand Down
4 changes: 0 additions & 4 deletions src/gui/panelresourceinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ public /*slots*/:
void slotExportBMUMP3();
void slotExportWAV();

private /*slots*/:
void slotLoadKotorDir();
void slotCloseDir();

private:
Ui::PanelResourceInfo _ui;

Expand Down
20 changes: 3 additions & 17 deletions ui/resourceinfo.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>839</width>
<height>149</height>
<width>837</width>
<height>147</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -41,17 +41,10 @@
<enum>QFrame::NoFrame</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="3">
<widget class="QPushButton" name="bCloseDir">
<property name="text">
<string>Close dir</string>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout"/>
</item>
<item row="0" column="0" colspan="4">
<item row="0" column="0" colspan="3">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="resLabelName">
Expand Down Expand Up @@ -159,13 +152,6 @@
</item>
</layout>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="bLoadKotorDir">
<property name="text">
<string>Load kotor dir</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
Expand Down

0 comments on commit e93d0ce

Please sign in to comment.