Commit 5f104e46 authored by Anakin's avatar Anakin

gui changes

parent a9485902
......@@ -20,6 +20,11 @@
<file>Z.png</file>
<file>screenshot.png</file>
<file>wireframe.png</file>
<file>light.png</file>
<file>light_off.png</file>
<file>light_on.png</file>
<file>solid.png</file>
<file>X_disabled.png</file>
<file>Y_disabled.png</file>
<file>Z_disabled.png</file>
</qresource>
</RCC>
QToolButton#test123 {
color: #000000;
QToolButton {
image: url(:/images/toolbar/placeholder.png);
border-style: none;
padding: 2px;
width: 22px;
height: 22px;
}
QToolButton:checked {
background-color: #ffffff;
border-style: inset;
border-width: 1px;
border-radius: 5px;
border-color: #b3b3b3;
min-height: 25px
image: url(:/images/toolbar/placeholder.png);
border-style: none;
padding: 2px;
width: 22px;
height: 22px;
}
QToolButton:hover {
border-style: solid;
padding: 1px;
border-width: 1px;
border-radius: 5px;
border-color: #a4daff;
min-height: 25px
}
QToolButton#openFile {
image: url(:/images/toolbar/open.png);
}
QToolButton#screenshot {
image: url(:/images/toolbar/screenshot.png);
}
QToolButton#x {
image: url(:/images/toolbar/X_disabled.png);
}
QToolButton#x:checked {
image: url(:/images/toolbar/X.png);
}
QToolButton#y {
image: url(:/images/toolbar/Y_disabled.png);
}
QToolButton#y:checked {
image: url(:/images/toolbar/Y.png);
}
QToolButton#z {
image: url(:/images/toolbar/Z_disabled.png);
}
QToolButton#z:checked {
image: url(:/images/toolbar/Z.png);
}
QToolButton#wireframe {
image: url(:/images/toolbar/solid.png);
}
QToolButton#wireframe:checked {
image: url(:/images/toolbar/wireframe.png);
}
QToolButton#light {
image: url(:/images/toolbar/light_off.png);
}
QToolButton#light:checked {
image: url(:/images/toolbar/light_on.png);
}
QToolButton#fileInfo {
image: url(:/images/toolbar/info.png);
}
QToolButton#help {
image: url(:/images/toolbar/about.png);
}
QtMeshViewer/Resources/X.png

3.5 KB | W: | H:

QtMeshViewer/Resources/X.png

932 Bytes | W: | H:

QtMeshViewer/Resources/X.png
QtMeshViewer/Resources/X.png
QtMeshViewer/Resources/X.png
QtMeshViewer/Resources/X.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/Y.png

3.45 KB | W: | H:

QtMeshViewer/Resources/Y.png

885 Bytes | W: | H:

QtMeshViewer/Resources/Y.png
QtMeshViewer/Resources/Y.png
QtMeshViewer/Resources/Y.png
QtMeshViewer/Resources/Y.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/Z.png

3.45 KB | W: | H:

QtMeshViewer/Resources/Z.png

884 Bytes | W: | H:

QtMeshViewer/Resources/Z.png
QtMeshViewer/Resources/Z.png
QtMeshViewer/Resources/Z.png
QtMeshViewer/Resources/Z.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/about.png

3.45 KB | W: | H:

QtMeshViewer/Resources/about.png

883 Bytes | W: | H:

QtMeshViewer/Resources/about.png
QtMeshViewer/Resources/about.png
QtMeshViewer/Resources/about.png
QtMeshViewer/Resources/about.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/info.png

3.43 KB | W: | H:

QtMeshViewer/Resources/info.png

859 Bytes | W: | H:

QtMeshViewer/Resources/info.png
QtMeshViewer/Resources/info.png
QtMeshViewer/Resources/info.png
QtMeshViewer/Resources/info.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/open.png

3.45 KB | W: | H:

QtMeshViewer/Resources/open.png

879 Bytes | W: | H:

QtMeshViewer/Resources/open.png
QtMeshViewer/Resources/open.png
QtMeshViewer/Resources/open.png
QtMeshViewer/Resources/open.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/placeholder.png

3.51 KB | W: | H:

QtMeshViewer/Resources/placeholder.png

940 Bytes | W: | H:

QtMeshViewer/Resources/placeholder.png
QtMeshViewer/Resources/placeholder.png
QtMeshViewer/Resources/placeholder.png
QtMeshViewer/Resources/placeholder.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/screenshot.png

3.55 KB | W: | H:

QtMeshViewer/Resources/screenshot.png

982 Bytes | W: | H:

QtMeshViewer/Resources/screenshot.png
QtMeshViewer/Resources/screenshot.png
QtMeshViewer/Resources/screenshot.png
QtMeshViewer/Resources/screenshot.png
  • 2-up
  • Swipe
  • Onion skin
QtMeshViewer/Resources/wireframe.png

3.47 KB | W: | H:

QtMeshViewer/Resources/wireframe.png

898 Bytes | W: | H:

QtMeshViewer/Resources/wireframe.png
QtMeshViewer/Resources/wireframe.png
QtMeshViewer/Resources/wireframe.png
QtMeshViewer/Resources/wireframe.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -10,6 +10,7 @@
#include <QSizePolicy>
#include <QFont>
#include <QResizeEvent>
#include <QToolButton>
#include "..\Header\FileInterface.h"
#define WINDOW_NAME "Mesh Viewer"
......@@ -32,7 +33,7 @@ MainWindow::MainWindow(QWidget *parent)
setupWidgets();
ui->statusBar->showMessage("MeshViewer by Anakin", 0);
printMessage("MeshViewer by Anakin", 0);
m_fileInfo += "Filename: -\nMaterials: -\nVertices: -\nTriangle: -<detail>No file is open";
......@@ -61,36 +62,46 @@ void MainWindow::setupWidgets()
setCentralWidget(viewer);
connect(viewer, &OglViewerWidget::sendMessage, this, &MainWindow::printMessage);
QAction *openFile = new QAction(QIcon(":/images/toolbar/open.png"), "Open file", this);
connect(openFile, &QAction::triggered, this, &MainWindow::openFile);
ui->mainToolBar->addAction(openFile);
QToolButton *openFile = new QToolButton(this);
openFile->setObjectName("openFile");
openFile->setToolTip("open file");
connect(openFile, &QToolButton::pressed, this, &MainWindow::openFile);
ui->mainToolBar->addWidget(openFile);
QAction *screenShot = new QAction(QIcon(":/images/toolbar/screenshot.png"), "Screenshot", this);
connect(screenShot, &QAction::triggered, this, &MainWindow::takeScreenShot);
ui->mainToolBar->addAction(screenShot);
QToolButton *screenshot = new QToolButton(this);
screenshot->setObjectName("screenshot");
screenshot->setToolTip("take screenshot");
connect(screenshot, &QToolButton::pressed, this, &MainWindow::takeScreenShot);
ui->mainToolBar->addWidget(screenshot);
ui->mainToolBar->addSeparator();
QSignalMapper* signalMapper = new QSignalMapper(this);
QAction *x = new QAction(QIcon(":/images/toolbar/X.png"), "X", this);
QToolButton *x = new QToolButton(this);
x->setObjectName("x");
x->setToolTip("x-direction");
x->setCheckable(true);
x->setChecked(true);
ui->mainToolBar->addAction(x);
ui->mainToolBar->addWidget(x);
QAction *y = new QAction(QIcon(":/images/toolbar/Y.png"), "Y", this);
QToolButton *y = new QToolButton(this);
y->setObjectName("y");
y->setToolTip("y-direction");
y->setCheckable(true);
y->setChecked(true);
ui->mainToolBar->addAction(y);
ui->mainToolBar->addWidget(y);
QAction *z = new QAction(QIcon(":/images/toolbar/Z.png"), "Z", this);
QToolButton *z = new QToolButton(this);
z->setObjectName("z");
z->setToolTip("z-direction");
z->setCheckable(true);
z->setChecked(true);
ui->mainToolBar->addAction(z);
ui->mainToolBar->addWidget(z);
connect(x, SIGNAL(triggered()), signalMapper, SLOT(map()));
connect(y, SIGNAL(triggered()), signalMapper, SLOT(map()));
connect(z, SIGNAL(triggered()), signalMapper, SLOT(map()));
connect(x, SIGNAL(pressed()), signalMapper, SLOT(map()));
connect(y, SIGNAL(pressed()), signalMapper, SLOT(map()));
connect(z, SIGNAL(pressed()), signalMapper, SLOT(map()));
signalMapper->setMapping(x, 1);
signalMapper->setMapping(y, 2);
......@@ -100,32 +111,35 @@ void MainWindow::setupWidgets()
ui->mainToolBar->addSeparator();
QAction *wireframe = new QAction(QIcon(":/images/toolbar/wireframe.png"), "Wireframe", this);
QToolButton *wireframe = new QToolButton(this);
wireframe->setObjectName("wireframe");
wireframe->setToolTip("wireframe");
wireframe->setCheckable(true);
wireframe->setChecked(false);
connect(wireframe, &QAction::triggered, viewer, &OglViewerWidget::toggleWireframe);
ui->mainToolBar->addAction(wireframe);
connect(wireframe, &QToolButton::pressed, viewer, &OglViewerWidget::toggleWireframe);
ui->mainToolBar->addWidget(wireframe);
QAction *light = new QAction(QIcon(":/images/toolbar/light.png"), "Light", this);
QToolButton *light = new QToolButton(this);
light->setObjectName("light");
light->setToolTip("toggle light");
light->setCheckable(true);
light->setChecked(false);
connect(light, &QAction::triggered, viewer, &OglViewerWidget::toggleLight);
ui->mainToolBar->addAction(light);
connect(light, &QToolButton::pressed, viewer, &OglViewerWidget::toggleLight);
ui->mainToolBar->addWidget(light);
ui->mainToolBar->addSeparator();
QAction *fileInfo = new QAction(QIcon(":/images/toolbar/info.png"), "File info", this);
connect(fileInfo, &QAction::triggered, this, &MainWindow::aboutFile);
ui->mainToolBar->addAction(fileInfo);
QAction *help = new QAction(QIcon(":/images/toolbar/about.png"), "Help", this);
connect(help, &QAction::triggered, this, &MainWindow::aboutTool);
ui->mainToolBar->addAction(help);
QAction *test = new QAction(this);
test->setCheckable(true);
test->setObjectName("test123");
ui->mainToolBar->addAction(test);
QToolButton *fileInfo = new QToolButton(this);
fileInfo->setObjectName("fileInfo");
fileInfo->setToolTip("file info");
connect(fileInfo, &QToolButton::pressed, this, &MainWindow::aboutFile);
ui->mainToolBar->addWidget(fileInfo);
QToolButton *help = new QToolButton(this);
help->setObjectName("help");
help->setToolTip("help");
connect(help, &QToolButton::pressed, this, &MainWindow::aboutTool);
ui->mainToolBar->addWidget(help);
m_output->setObjectName("output");
m_output->setStyleSheet("QLabel#output{color : white; min-width: 400px; min-height: 50px;}");
......
......@@ -572,6 +572,7 @@ void MshFile::analyseClthChunks(Model * dataDestination, std::list<ChunkHeader*>
for (auto& it : chunkList)
{
// texture name
//TODO: change this
if (!strcmp("CTEX", it->name))
{
// read the texture name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment