Skip to content

Commit

Permalink
Remove example models
Browse files Browse the repository at this point in the history
  • Loading branch information
huxingyi committed Feb 18, 2023
1 parent 14a52a1 commit ab0ea21
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 14,875 deletions.
8 changes: 0 additions & 8 deletions application/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,5 @@
<file>resources/toolbar_z_disabled.svg</file>
<file>resources/toolbar_radius.svg</file>
<file>resources/toolbar_radius_disabled.svg</file>
<file>resources/model-addax.ds3</file>
<file>resources/model-banana.ds3</file>
<file>resources/model-bicycle.ds3</file>
<file>resources/model-dog.ds3</file>
<file>resources/model-meerkat.ds3</file>
<file>resources/model-mosquito.ds3</file>
<file>resources/model-screwdriver.ds3</file>
<file>resources/model-seagull.ds3</file>
</qresource>
</RCC>
1,275 changes: 0 additions & 1,275 deletions application/resources/model-addax.ds3

This file was deleted.

431 changes: 0 additions & 431 deletions application/resources/model-banana.ds3

This file was deleted.

1,602 changes: 0 additions & 1,602 deletions application/resources/model-bicycle.ds3

This file was deleted.

3,875 changes: 0 additions & 3,875 deletions application/resources/model-dog.ds3

This file was deleted.

1,997 changes: 0 additions & 1,997 deletions application/resources/model-meerkat.ds3

This file was deleted.

766 changes: 0 additions & 766 deletions application/resources/model-mosquito.ds3

This file was deleted.

Binary file removed application/resources/model-screwdriver.ds3
Binary file not shown.
4,883 changes: 0 additions & 4,883 deletions application/resources/model-seagull.ds3

This file was deleted.

36 changes: 0 additions & 36 deletions application/sources/document_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,27 +299,6 @@ DocumentWindow::DocumentWindow()
this, &DocumentWindow::open,
QKeySequence::Open);

m_openExampleMenu = new QMenu(tr("Open Example"));
std::vector<QString> exampleModels = {
"Addax",
"Banana",
"Bicycle",
"Dog",
"Meerkat",
"Mosquito",
"Screwdriver",
"Seagull"
};
for (const auto& model : exampleModels) {
QAction* openModelAction = new QAction(model, this);
connect(openModelAction, &QAction::triggered, this, [this, model]() {
openExample("model-" + model.toLower().replace(QChar(' '), QChar('-')) + ".ds3");
});
m_openExampleMenu->addAction(openModelAction);
}

m_fileMenu->addMenu(m_openExampleMenu);

m_saveAction = m_fileMenu->addAction(tr("&Save"),
this, &DocumentWindow::save,
QKeySequence::Save);
Expand Down Expand Up @@ -1040,21 +1019,6 @@ void DocumentWindow::unifySnapshotEdgeLinkDirection(dust3d::Snapshot& snapshot)
}
}

void DocumentWindow::openExample(const QString& modelName)
{
if (!m_documentSaved) {
QMessageBox::StandardButton answer = QMessageBox::question(this,
APP_NAME,
tr("Do you really want to open example and lose the unsaved changes?"),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
if (answer != QMessageBox::Yes)
return;
}

openPathAs(":/resources/" + modelName, "");
}

void DocumentWindow::open()
{
if (!m_documentSaved) {
Expand Down
2 changes: 0 additions & 2 deletions application/sources/document_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public slots:
void save();
void saveTo(const QString& saveAsFilename);
void open();
void openExample(const QString& modelName);
void openPathAs(const QString& path, const QString& asName);
void exportObjResult();
void exportGlbResult();
Expand Down Expand Up @@ -130,7 +129,6 @@ public slots:
QAction* m_newWindowAction = nullptr;
QAction* m_newDocumentAction = nullptr;
QAction* m_openAction = nullptr;
QMenu* m_openExampleMenu = nullptr;
QAction* m_saveAction = nullptr;
QAction* m_saveAsAction = nullptr;
QAction* m_saveAllAction = nullptr;
Expand Down

1 comment on commit ab0ea21

@danfe
Copy link

@danfe danfe commented on ab0ea21 Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate on the particular reasons behind this commit and other removed things, e.g. translations?

Please sign in to comment.