added icons
|
@ -16,7 +16,7 @@
|
|||
<widget class="QWidget" name="centralWidget"/>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
<enum>LeftToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
|
|
|
@ -9,4 +9,13 @@
|
|||
<qresource prefix="/files">
|
||||
<file>about.txt</file>
|
||||
</qresource>
|
||||
<qresource prefix="/images/toolbar">
|
||||
<file>placeholder.png</file>
|
||||
<file>info.png</file>
|
||||
<file>about.png</file>
|
||||
<file>open.png</file>
|
||||
<file>X.png</file>
|
||||
<file>Y.png</file>
|
||||
<file>Z.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
|
@ -50,23 +50,25 @@ void MainWindow::setupWidgets()
|
|||
OglViewerWidget* viewer = new OglViewerWidget(this);
|
||||
setCentralWidget(viewer);
|
||||
|
||||
QAction *openFile = new QAction("Open file", this);
|
||||
QAction *openFile = new QAction(QIcon(":/images/toolbar/open.png"), "Open file", this);
|
||||
connect(openFile, &QAction::triggered, this, &MainWindow::openFile);
|
||||
ui->mainToolBar->addAction(openFile);
|
||||
|
||||
ui->mainToolBar->addSeparator();
|
||||
|
||||
QSignalMapper* signalMapper = new QSignalMapper(this);
|
||||
|
||||
QAction *x = new QAction("X", this);
|
||||
QAction *x = new QAction(QIcon(":/images/toolbar/X.png"), "X", this);
|
||||
x->setCheckable(true);
|
||||
x->setChecked(true);
|
||||
ui->mainToolBar->addAction(x);
|
||||
|
||||
QAction *y = new QAction("Y", this);
|
||||
QAction *y = new QAction(QIcon(":/images/toolbar/Y.png"), "Y", this);
|
||||
y->setCheckable(true);
|
||||
y->setChecked(true);
|
||||
ui->mainToolBar->addAction(y);
|
||||
|
||||
QAction *z = new QAction("Z", this);
|
||||
QAction *z = new QAction(QIcon(":/images/toolbar/Z.png"), "Z", this);
|
||||
z->setCheckable(true);
|
||||
z->setChecked(true);
|
||||
ui->mainToolBar->addAction(z);
|
||||
|
@ -81,12 +83,13 @@ void MainWindow::setupWidgets()
|
|||
|
||||
connect(signalMapper, SIGNAL(mapped(int)), viewer, SLOT(changeDirection(int)));
|
||||
|
||||
ui->mainToolBar->addSeparator();
|
||||
|
||||
QAction *fileInfo = new QAction("File info", this);
|
||||
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("Help", this);
|
||||
QAction *help = new QAction(QIcon(":/images/toolbar/about.png"), "Help", this);
|
||||
connect(help, &QAction::triggered, this, &MainWindow::aboutTool);
|
||||
ui->mainToolBar->addAction(help);
|
||||
|
||||
|
|
|
@ -302,6 +302,10 @@ void MshFile::analyseModlChunks(Model * dataDestination, std::list<ChunkHeader*>
|
|||
// geometry data
|
||||
else if (!strcmp("GEOM", it->name))
|
||||
{
|
||||
// don't get null, bone, shadowMesh and hidden mesh indices
|
||||
if (m_currentType == null || m_currentType == bone || m_currentType == shadowMesh || m_currentRenderFlag == 1)
|
||||
continue;
|
||||
|
||||
// get all GEOM subchunks
|
||||
std::list<ChunkHeader*> tmp_geomChunks;
|
||||
loadChunks(tmp_geomChunks, it->position, it->size);
|
||||
|
@ -419,9 +423,6 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list<ChunkHeader*>
|
|||
// polygons (indices into vertex/uv list)
|
||||
else if (!strcmp("STRP", it->name))
|
||||
{
|
||||
// don't get null, bone, shadowMesh and hidden mesh indices
|
||||
if (m_currentType == null || m_currentType == bone || m_currentType == shadowMesh || m_currentRenderFlag == 1)
|
||||
continue;
|
||||
|
||||
// jump to the data section and read the size;
|
||||
std::uint32_t tmp_size;
|
||||
|
|