mirror of
https://github.com/redstrate/Novus.git
synced 2025-05-03 08:27:46 +00:00
Add Quit actions to the apps that don't have it
This commit is contained in:
parent
d93d730274
commit
b8693effc0
18 changed files with 93 additions and 12 deletions
|
@ -21,6 +21,7 @@ target_link_libraries(novus-gamelauncher
|
||||||
Qt6::Widgets)
|
Qt6::Widgets)
|
||||||
|
|
||||||
install(TARGETS novus-gamelauncher ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS novus-gamelauncher ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
install(FILES gamelauncher.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set_target_properties(novus-gamelauncher PROPERTIES
|
set_target_properties(novus-gamelauncher PROPERTIES
|
||||||
|
@ -28,4 +29,4 @@ if (WIN32)
|
||||||
OUTPUT_NAME "GameLauncher")
|
OUTPUT_NAME "GameLauncher")
|
||||||
|
|
||||||
install(FILES $<TARGET_RUNTIME_DLLS:novus-gamelauncher> DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(FILES $<TARGET_RUNTIME_DLLS:novus-gamelauncher> DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
14
apps/gamelauncher/gamelauncher.rc
Normal file
14
apps/gamelauncher/gamelauncher.rc
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gui name="gamelauncher"
|
||||||
|
version="1"
|
||||||
|
xmlns="https://www.kde.org/standards/kxmlgui/1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0
|
||||||
|
https://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd">
|
||||||
|
<MenuBar>
|
||||||
|
<Menu name="file" >
|
||||||
|
<text>File</text>
|
||||||
|
<Action name="quit"/>
|
||||||
|
</Menu>
|
||||||
|
</MenuBar>
|
||||||
|
</gui>
|
|
@ -17,5 +17,7 @@ public:
|
||||||
explicit MainWindow();
|
explicit MainWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void setupActions();
|
||||||
|
|
||||||
QProcess *process = nullptr;
|
QProcess *process = nullptr;
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,6 +40,7 @@ MainWindow::MainWindow()
|
||||||
});
|
});
|
||||||
layout->addWidget(launchGameButton);
|
layout->addWidget(launchGameButton);
|
||||||
|
|
||||||
|
setupActions();
|
||||||
setupGUI(Keys | Save | Create);
|
setupGUI(Keys | Save | Create);
|
||||||
|
|
||||||
// We don't provide help (yet)
|
// We don't provide help (yet)
|
||||||
|
@ -48,4 +49,9 @@ MainWindow::MainWindow()
|
||||||
actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE)));
|
actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_mainwindow.cpp"
|
void MainWindow::setupActions()
|
||||||
|
{
|
||||||
|
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "moc_mainwindow.cpp"
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
<text>File</text>
|
<text>File</text>
|
||||||
<Action name="import_list" />
|
<Action name="import_list" />
|
||||||
<Action name="download_list" />
|
<Action name="download_list" />
|
||||||
|
<Separator/>
|
||||||
|
<Action name="quit"/>
|
||||||
</Menu>
|
</Menu>
|
||||||
</MenuBar>
|
</MenuBar>
|
||||||
</gui>
|
</gui>
|
||||||
|
|
|
@ -172,6 +172,8 @@ void MainWindow::setupActions()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
actionCollection()->addAction(QStringLiteral("download_list"), downloadList);
|
actionCollection()->addAction(QStringLiteral("download_list"), downloadList);
|
||||||
|
|
||||||
|
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_mainwindow.cpp"
|
#include "moc_mainwindow.cpp"
|
||||||
|
|
|
@ -25,6 +25,7 @@ target_link_libraries(novus-mapeditor
|
||||||
Qt6::Widgets)
|
Qt6::Widgets)
|
||||||
|
|
||||||
install(TARGETS novus-mapeditor ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS novus-mapeditor ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
install(FILES mapeditor.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus)
|
||||||
|
|
||||||
ecm_add_app_icon(novus-mapeditor
|
ecm_add_app_icon(novus-mapeditor
|
||||||
ICONS
|
ICONS
|
||||||
|
@ -43,4 +44,4 @@ if (WIN32)
|
||||||
else()
|
else()
|
||||||
install(FILES zone.xiv.mapeditor.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
install(FILES zone.xiv.mapeditor.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
||||||
install(FILES zone.xiv.mapeditor.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
|
install(FILES zone.xiv.mapeditor.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -17,6 +17,8 @@ public:
|
||||||
explicit MainWindow(GameData *data);
|
explicit MainWindow(GameData *data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void setupActions();
|
||||||
|
|
||||||
GameData *data = nullptr;
|
GameData *data = nullptr;
|
||||||
FileCache cache;
|
FileCache cache;
|
||||||
};
|
};
|
||||||
|
|
14
apps/mapeditor/mapeditor.rc
Normal file
14
apps/mapeditor/mapeditor.rc
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gui name="mapeditor"
|
||||||
|
version="1"
|
||||||
|
xmlns="https://www.kde.org/standards/kxmlgui/1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0
|
||||||
|
https://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd">
|
||||||
|
<MenuBar>
|
||||||
|
<Menu name="file" >
|
||||||
|
<text>File</text>
|
||||||
|
<Action name="quit"/>
|
||||||
|
</Menu>
|
||||||
|
</MenuBar>
|
||||||
|
</gui>
|
|
@ -46,6 +46,7 @@ MainWindow::MainWindow(GameData *data)
|
||||||
mapView->addTerrain(bgPath, tera);
|
mapView->addTerrain(bgPath, tera);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setupActions();
|
||||||
setupGUI(Keys | Save | Create);
|
setupGUI(Keys | Save | Create);
|
||||||
|
|
||||||
// We don't provide help (yet)
|
// We don't provide help (yet)
|
||||||
|
@ -54,4 +55,9 @@ MainWindow::MainWindow(GameData *data)
|
||||||
actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE)));
|
actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_mainwindow.cpp"
|
void MainWindow::setupActions()
|
||||||
|
{
|
||||||
|
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "moc_mainwindow.cpp"
|
||||||
|
|
|
@ -25,6 +25,7 @@ target_link_libraries(novus-mateditor
|
||||||
Qt6::Widgets)
|
Qt6::Widgets)
|
||||||
|
|
||||||
install(TARGETS novus-mateditor ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS novus-mateditor ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
install(FILES mateditor.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set_target_properties(novus-mateditor PROPERTIES
|
set_target_properties(novus-mateditor PROPERTIES
|
||||||
|
@ -32,4 +33,4 @@ if (WIN32)
|
||||||
OUTPUT_NAME "MaterialEditor")
|
OUTPUT_NAME "MaterialEditor")
|
||||||
|
|
||||||
install(FILES $<TARGET_RUNTIME_DLLS:novus-mateditor> DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(FILES $<TARGET_RUNTIME_DLLS:novus-mateditor> DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -17,7 +17,9 @@ public:
|
||||||
explicit MainWindow(GameData *data);
|
explicit MainWindow(GameData *data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void setupActions();
|
||||||
|
|
||||||
GameData *data = nullptr;
|
GameData *data = nullptr;
|
||||||
FileCache cache;
|
FileCache cache;
|
||||||
physis_Material m_material;
|
physis_Material m_material;
|
||||||
};
|
};
|
||||||
|
|
14
apps/mateditor/mateditor.rc
Normal file
14
apps/mateditor/mateditor.rc
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gui name="mateditor"
|
||||||
|
version="1"
|
||||||
|
xmlns="https://www.kde.org/standards/kxmlgui/1.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0
|
||||||
|
https://www.kde.org/standards/kxmlgui/1.0/kxmlgui.xsd">
|
||||||
|
<MenuBar>
|
||||||
|
<Menu name="file" >
|
||||||
|
<text>File</text>
|
||||||
|
<Action name="quit"/>
|
||||||
|
</Menu>
|
||||||
|
</MenuBar>
|
||||||
|
</gui>
|
|
@ -36,6 +36,7 @@ MainWindow::MainWindow(GameData *data)
|
||||||
matView->addSphere(m_material);
|
matView->addSphere(m_material);
|
||||||
dummyWidget->addWidget(matView);
|
dummyWidget->addWidget(matView);
|
||||||
|
|
||||||
|
setupActions();
|
||||||
setupGUI(Keys | Save | Create);
|
setupGUI(Keys | Save | Create);
|
||||||
|
|
||||||
// We don't provide help (yet)
|
// We don't provide help (yet)
|
||||||
|
@ -44,4 +45,9 @@ MainWindow::MainWindow(GameData *data)
|
||||||
actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE)));
|
actionCollection()->removeAction(actionCollection()->action(KStandardAction::name(KStandardAction::AboutKDE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_mainwindow.cpp"
|
void MainWindow::setupActions()
|
||||||
|
{
|
||||||
|
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "moc_mainwindow.cpp"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<gui name="mdlviewer"
|
<gui name="mdlviewer"
|
||||||
version="1"
|
version="3"
|
||||||
xmlns="https://www.kde.org/standards/kxmlgui/1.0"
|
xmlns="https://www.kde.org/standards/kxmlgui/1.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0
|
xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0
|
||||||
|
@ -9,6 +9,8 @@
|
||||||
<Menu name="file" >
|
<Menu name="file" >
|
||||||
<text>File</text>
|
<text>File</text>
|
||||||
<Action name="open_mdl" />
|
<Action name="open_mdl" />
|
||||||
|
<Separator/>
|
||||||
|
<Action name="quit"/>
|
||||||
</Menu>
|
</Menu>
|
||||||
</MenuBar>
|
</MenuBar>
|
||||||
</gui>
|
</gui>
|
||||||
|
|
|
@ -119,6 +119,8 @@ void MainWindow::setupActions()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
actionCollection()->addAction(QStringLiteral("open_mdl"), openMDLFile);
|
actionCollection()->addAction(QStringLiteral("open_mdl"), openMDLFile);
|
||||||
|
|
||||||
|
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_mainwindow.cpp"
|
#include "moc_mainwindow.cpp"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<gui name="exceleditor"
|
<gui name="exceleditor"
|
||||||
version="1"
|
version="2"
|
||||||
xmlns="https://www.kde.org/standards/kxmlgui/1.0"
|
xmlns="https://www.kde.org/standards/kxmlgui/1.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0
|
xsi:schemaLocation="https://www.kde.org/standards/kxmlgui/1.0
|
||||||
|
@ -10,6 +10,8 @@
|
||||||
<text>File</text>
|
<text>File</text>
|
||||||
<Action name="import_list" />
|
<Action name="import_list" />
|
||||||
<Action name="download_list" />
|
<Action name="download_list" />
|
||||||
|
<Separator/>
|
||||||
|
<Action name="file_quit"/>
|
||||||
</Menu>
|
</Menu>
|
||||||
</MenuBar>
|
</MenuBar>
|
||||||
</gui>
|
</gui>
|
||||||
|
|
|
@ -271,4 +271,6 @@ void MainWindow::setupActions()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
actionCollection()->addAction(QStringLiteral("download_list"), downloadList);
|
actionCollection()->addAction(QStringLiteral("download_list"), downloadList);
|
||||||
|
|
||||||
|
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue