mirror of
https://github.com/redstrate/Novus.git
synced 2025-05-02 16:17:44 +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)
|
||||
|
||||
install(TARGETS novus-gamelauncher ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
install(FILES gamelauncher.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus)
|
||||
|
||||
if (WIN32)
|
||||
set_target_properties(novus-gamelauncher PROPERTIES
|
||||
|
@ -28,4 +29,4 @@ if (WIN32)
|
|||
OUTPUT_NAME "GameLauncher")
|
||||
|
||||
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();
|
||||
|
||||
private:
|
||||
void setupActions();
|
||||
|
||||
QProcess *process = nullptr;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -40,6 +40,7 @@ MainWindow::MainWindow()
|
|||
});
|
||||
layout->addWidget(launchGameButton);
|
||||
|
||||
setupActions();
|
||||
setupGUI(Keys | Save | Create);
|
||||
|
||||
// We don't provide help (yet)
|
||||
|
@ -48,4 +49,9 @@ MainWindow::MainWindow()
|
|||
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>
|
||||
<Action name="import_list" />
|
||||
<Action name="download_list" />
|
||||
<Separator/>
|
||||
<Action name="quit"/>
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
</gui>
|
||||
|
|
|
@ -172,6 +172,8 @@ void MainWindow::setupActions()
|
|||
});
|
||||
});
|
||||
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)
|
||||
|
||||
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
|
||||
ICONS
|
||||
|
@ -43,4 +44,4 @@ if (WIN32)
|
|||
else()
|
||||
install(FILES zone.xiv.mapeditor.desktop DESTINATION ${KDE_INSTALL_APPDIR})
|
||||
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);
|
||||
|
||||
private:
|
||||
void setupActions();
|
||||
|
||||
GameData *data = nullptr;
|
||||
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);
|
||||
});
|
||||
|
||||
setupActions();
|
||||
setupGUI(Keys | Save | Create);
|
||||
|
||||
// We don't provide help (yet)
|
||||
|
@ -54,4 +55,9 @@ MainWindow::MainWindow(GameData *data)
|
|||
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)
|
||||
|
||||
install(TARGETS novus-mateditor ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
install(FILES mateditor.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/novus)
|
||||
|
||||
if (WIN32)
|
||||
set_target_properties(novus-mateditor PROPERTIES
|
||||
|
@ -32,4 +33,4 @@ if (WIN32)
|
|||
OUTPUT_NAME "MaterialEditor")
|
||||
|
||||
install(FILES $<TARGET_RUNTIME_DLLS:novus-mateditor> DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -17,7 +17,9 @@ public:
|
|||
explicit MainWindow(GameData *data);
|
||||
|
||||
private:
|
||||
void setupActions();
|
||||
|
||||
GameData *data = nullptr;
|
||||
FileCache cache;
|
||||
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);
|
||||
dummyWidget->addWidget(matView);
|
||||
|
||||
setupActions();
|
||||
setupGUI(Keys | Save | Create);
|
||||
|
||||
// We don't provide help (yet)
|
||||
|
@ -44,4 +45,9 @@ MainWindow::MainWindow(GameData *data)
|
|||
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"?>
|
||||
<gui name="mdlviewer"
|
||||
version="1"
|
||||
version="3"
|
||||
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
|
||||
|
@ -9,6 +9,8 @@
|
|||
<Menu name="file" >
|
||||
<text>File</text>
|
||||
<Action name="open_mdl" />
|
||||
<Separator/>
|
||||
<Action name="quit"/>
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
</gui>
|
||||
|
|
|
@ -119,6 +119,8 @@ void MainWindow::setupActions()
|
|||
}
|
||||
});
|
||||
actionCollection()->addAction(QStringLiteral("open_mdl"), openMDLFile);
|
||||
|
||||
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||
}
|
||||
|
||||
#include "moc_mainwindow.cpp"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gui name="exceleditor"
|
||||
version="1"
|
||||
version="2"
|
||||
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
|
||||
|
@ -10,6 +10,8 @@
|
|||
<text>File</text>
|
||||
<Action name="import_list" />
|
||||
<Action name="download_list" />
|
||||
<Separator/>
|
||||
<Action name="file_quit"/>
|
||||
</Menu>
|
||||
</MenuBar>
|
||||
</gui>
|
||||
|
|
|
@ -271,4 +271,6 @@ void MainWindow::setupActions()
|
|||
});
|
||||
});
|
||||
actionCollection()->addAction(QStringLiteral("download_list"), downloadList);
|
||||
|
||||
KStandardAction::quit(qApp, &QCoreApplication::quit, actionCollection());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue