commit 9a7f2cf84018a8f1f82da02450373e3f59c132bf Author: Kevin Whitaker Date: Sat Apr 6 15:54:19 2019 -0400 Initial import diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ba7eeac --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.0) + +project(simplecastengine) + +set(QT_MIN_VERSION "5.9.0") +set(KF_MIN_VERSION "5.35.0") + +find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + +include(KDEInstallDirs) +include(KDECMakeSettings) +include(KDECompilerSettings NO_POLICY_SCOPE) +include(ECMInstallIcons) +include(FeatureSummary) + +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets) + +find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS + CoreAddons + I18n +) + +add_subdirectory(src) +add_subdirectory(icons) + +# Make it possible to use the po files fetched by the fetch-translations step +ki18n_install(po) + +feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/Messages.sh b/Messages.sh new file mode 100644 index 0000000..2a9d186 --- /dev/null +++ b/Messages.sh @@ -0,0 +1,4 @@ +#! /usr/bin/env bash +$EXTRACTRC `find . -name \*.ui -o -name \*.rc -o -name \*.kcfg` >> rc.cpp +$XGETTEXT `find . -name \*.cpp` -o $podir/simplecastengine.pot +rm -f rc.cpp diff --git a/README b/README new file mode 100644 index 0000000..21a8f91 --- /dev/null +++ b/README @@ -0,0 +1,17 @@ +How To Build This Template +-=-=-=-=-=-=-=-=-=-=-=-=-= + +--- On Unix: + +cd +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Debug .. +make +make install or su -c 'make install' or sudo make install + +where $KDEDIRS points to your KDE installation prefix. + +Note: you can use another build path. Then cd in your build dir and: +export KDE_SRC=path_to_your_src +cmake $KDE_SRC -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Debug diff --git a/icons/16-apps-simplecastengine.png b/icons/16-apps-simplecastengine.png new file mode 100644 index 0000000..1d17e6f Binary files /dev/null and b/icons/16-apps-simplecastengine.png differ diff --git a/icons/22-apps-simplecastengine.png b/icons/22-apps-simplecastengine.png new file mode 100644 index 0000000..68d7189 Binary files /dev/null and b/icons/22-apps-simplecastengine.png differ diff --git a/icons/32-apps-simplecastengine.png b/icons/32-apps-simplecastengine.png new file mode 100644 index 0000000..3f32111 Binary files /dev/null and b/icons/32-apps-simplecastengine.png differ diff --git a/icons/48-apps-simplecastengine.png b/icons/48-apps-simplecastengine.png new file mode 100644 index 0000000..38e246a Binary files /dev/null and b/icons/48-apps-simplecastengine.png differ diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt new file mode 100644 index 0000000..ccf4c15 --- /dev/null +++ b/icons/CMakeLists.txt @@ -0,0 +1,8 @@ +set(simplecastengine_ICONS + 16-apps-simplecastengine.png + 22-apps-simplecastengine.png + 32-apps-simplecastengine.png + 48-apps-simplecastengine.png +) + +ecm_install_icons(ICONS ${simplecastengine_ICONS} DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..e62d32a --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,18 @@ +set( simplecastengine_SRCS + main.cpp + simplecastenginewindow.cpp +) + +ki18n_wrap_ui(simplecastengine_SRCS simplecastengine.ui) + +add_executable( simplecastengine ${simplecastengine_SRCS} ) + +target_link_libraries( simplecastengine + KF5::CoreAddons + KF5::I18n + Qt5::Widgets +) + +install( TARGETS simplecastengine ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) +install( PROGRAMS org.example.simplecastengine.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) +install( FILES org.example.simplecastengine.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} ) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..8fa82b7 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,62 @@ +/* + Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +// application header +#include "simplecastenginewindow.h" + +// KF headers +#include +#include + +// Qt headers +#include +#include + +int main(int argc, char **argv) +{ + QApplication application(argc, argv); + + KLocalizedString::setApplicationDomain("simplecastengine"); + + KAboutData aboutData( QStringLiteral("simplecastengine"), + i18n("SimpleCastEngine"), + QStringLiteral("%{VERSION}"), + i18n("A Simple Application written with KDE Frameworks"), + KAboutLicense::GPL, + i18n("Copyright %{CURRENT_YEAR}, %{AUTHOR} <%{EMAIL}>")); + + aboutData.addAuthor(i18n("%{AUTHOR}"),i18n("Author"), QStringLiteral("%{EMAIL}")); + aboutData.setOrganizationDomain("example.org"); + aboutData.setDesktopFileName(QStringLiteral("org.example.simplecastengine")); + + KAboutData::setApplicationData(aboutData); + application.setWindowIcon(QIcon::fromTheme(QStringLiteral("simplecastengine"))); + + QCommandLineParser parser; + aboutData.setupCommandLine(&parser); + + parser.process(application); + aboutData.processCommandLine(&parser); + + SimpleCastEngineWindow *mainWindow = new SimpleCastEngineWindow; + mainWindow->show(); + + return application.exec(); +} diff --git a/src/org.example.simplecastengine.appdata.xml b/src/org.example.simplecastengine.appdata.xml new file mode 100644 index 0000000..f226d00 --- /dev/null +++ b/src/org.example.simplecastengine.appdata.xml @@ -0,0 +1,23 @@ + + + org.example.simplecastengine.desktop + CC0-1.0 + https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license + SimpleCastEngine + https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-summary + +

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description

+
+ https://www.example.org + https://bugs.example.org + https://www.example.org/community/donations + + + https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-screenshots + + + + simplecastengine + + KDE +
diff --git a/src/org.example.simplecastengine.desktop b/src/org.example.simplecastengine.desktop new file mode 100644 index 0000000..ebf1671 --- /dev/null +++ b/src/org.example.simplecastengine.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application + +Name=SimpleCastEngine +GenericName=A Simple KDE Application +Icon=simplecastengine + +Exec=simplecastengine +StartupWMClass=simplecastengine diff --git a/src/simplecastengine.ui b/src/simplecastengine.ui new file mode 100644 index 0000000..c133702 --- /dev/null +++ b/src/simplecastengine.ui @@ -0,0 +1,28 @@ + + + mainWidget + + + + 0 + 0 + 400 + 300 + + + + + + + Hello world! + + + Qt::AlignCenter + + + + + + + + diff --git a/src/simplecastenginewindow.cpp b/src/simplecastenginewindow.cpp new file mode 100644 index 0000000..68ef726 --- /dev/null +++ b/src/simplecastenginewindow.cpp @@ -0,0 +1,33 @@ +/* + Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include "simplecastenginewindow.h" + +SimpleCastEngineWindow::SimpleCastEngineWindow() + : QMainWindow() +{ + QWidget *widget = new QWidget(this); + setCentralWidget(widget); + m_ui.setupUi(widget); +} + +SimpleCastEngineWindow::~SimpleCastEngineWindow() +{ +} diff --git a/src/simplecastenginewindow.h b/src/simplecastenginewindow.h new file mode 100644 index 0000000..246e610 --- /dev/null +++ b/src/simplecastenginewindow.h @@ -0,0 +1,57 @@ +/* + Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef SIMPLECASTENGINEWINDOW_H +#define SIMPLECASTENGINEWINDOW_H + + +#include "ui_simplecastengine.h" + +#include + +/** + * This class serves as the main window for SimpleCastEngine. It handles the + * menus, toolbars and status bars. + * + * @short Main window class + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +class SimpleCastEngineWindow : public QMainWindow +{ + Q_OBJECT +public: + /** + * Default Constructor + */ + SimpleCastEngineWindow(); + + /** + * Default Destructor + */ + ~SimpleCastEngineWindow() override; + +private: + // this is the name of the root widget inside our Ui file + // you can rename it in designer and then change it here + Ui::mainWidget m_ui; +}; + +#endif // SIMPLECASTENGINEWINDOW_H