Add "switch to textures" button on terrain page
This commit is contained in:
parent
62a956a65f
commit
2021817082
5 changed files with 24 additions and 5 deletions
|
@ -1,12 +1,13 @@
|
||||||
#include "freeformhelper.h"
|
#include "freeformhelper.h"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QSlider>
|
#include <QSlider>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <cmath>
|
#include <QWidget>
|
||||||
#include <qt4/QtGui/qwidget.h>
|
#include "mainwindow.h"
|
||||||
#include "dialogrender.h"
|
#include "dialogrender.h"
|
||||||
#include "dialogexplorer.h"
|
#include "dialogexplorer.h"
|
||||||
#include "rendering/scenery.h"
|
#include "rendering/scenery.h"
|
||||||
|
@ -194,6 +195,15 @@ void FreeFormHelper::openDialog(QDialog* dialog)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FreeFormHelper::gotoMainTab(int position)
|
||||||
|
{
|
||||||
|
QWidget* window = _form_widget->window();
|
||||||
|
if (window->inherits("MainWindow"))
|
||||||
|
{
|
||||||
|
((MainWindow*)window)->openTab(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FreeFormHelper::processDataChange()
|
void FreeFormHelper::processDataChange()
|
||||||
{
|
{
|
||||||
_data_changed = true;
|
_data_changed = true;
|
||||||
|
|
|
@ -39,6 +39,7 @@ public:
|
||||||
void setLabelText(QString widget_name, QString text);
|
void setLabelText(QString widget_name, QString text);
|
||||||
|
|
||||||
void openDialog(QDialog* dialog);
|
void openDialog(QDialog* dialog);
|
||||||
|
void gotoMainTab(int position);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void revertClicked();
|
void revertClicked();
|
||||||
|
@ -75,4 +76,4 @@ private:
|
||||||
QPushButton* _button_render;
|
QPushButton* _button_render;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FREEFORMHELPER_H
|
#endif
|
||||||
|
|
|
@ -168,6 +168,11 @@ void MainWindow::refreshAll()
|
||||||
cameraDeleteDefinition(camera);
|
cameraDeleteDefinition(camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::openTab(int position)
|
||||||
|
{
|
||||||
|
ui->tabs->setCurrentIndex(position);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::fileNew()
|
void MainWindow::fileNew()
|
||||||
{
|
{
|
||||||
if (QMessageBox::question(this, tr("Paysages 3D - New scenery"), tr("Do you want to start a new scenery ? Any unsaved changes will be lost."), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
|
if (QMessageBox::question(this, tr("Paysages 3D - New scenery"), tr("Do you want to start a new scenery ? Any unsaved changes will be lost."), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
|
||||||
|
|
|
@ -28,6 +28,8 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void refreshAll();
|
void refreshAll();
|
||||||
|
|
||||||
|
void openTab(int position);
|
||||||
|
|
||||||
void fileNew();
|
void fileNew();
|
||||||
void fileSave();
|
void fileSave();
|
||||||
void fileLoad();
|
void fileLoad();
|
||||||
|
|
|
@ -127,5 +127,6 @@ void MainTerrainForm::buttonPaintingPressed()
|
||||||
|
|
||||||
void MainTerrainForm::buttonTexturesPressed()
|
void MainTerrainForm::buttonTexturesPressed()
|
||||||
{
|
{
|
||||||
// TODO Switch to textures tab
|
// Switch to textures tab
|
||||||
|
_form_helper->gotoMainTab(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue