From 9a7f2cf84018a8f1f82da02450373e3f59c132bf Mon Sep 17 00:00:00 2001 From: Kevin Whitaker Date: Sat, 6 Apr 2019 15:54:19 -0400 Subject: [PATCH] Initial import --- CMakeLists.txt | 30 +++++++++ Messages.sh | 4 ++ README | 17 +++++ icons/16-apps-simplecastengine.png | Bin 0 -> 625 bytes icons/22-apps-simplecastengine.png | Bin 0 -> 802 bytes icons/32-apps-simplecastengine.png | Bin 0 -> 1231 bytes icons/48-apps-simplecastengine.png | Bin 0 -> 1862 bytes icons/CMakeLists.txt | 8 +++ src/CMakeLists.txt | 18 ++++++ src/main.cpp | 62 +++++++++++++++++++ src/org.example.simplecastengine.appdata.xml | 23 +++++++ src/org.example.simplecastengine.desktop | 9 +++ src/simplecastengine.ui | 28 +++++++++ src/simplecastenginewindow.cpp | 33 ++++++++++ src/simplecastenginewindow.h | 57 +++++++++++++++++ 15 files changed, 289 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 Messages.sh create mode 100644 README create mode 100644 icons/16-apps-simplecastengine.png create mode 100644 icons/22-apps-simplecastengine.png create mode 100644 icons/32-apps-simplecastengine.png create mode 100644 icons/48-apps-simplecastengine.png create mode 100644 icons/CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/main.cpp create mode 100644 src/org.example.simplecastengine.appdata.xml create mode 100644 src/org.example.simplecastengine.desktop create mode 100644 src/simplecastengine.ui create mode 100644 src/simplecastenginewindow.cpp create mode 100644 src/simplecastenginewindow.h 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 0000000000000000000000000000000000000000..1d17e6fd742c7256161532576c6cfa21e6e9dda5 GIT binary patch literal 625 zcmV-%0*?KOP)Ll09e?Q51#0JDa#W79&{1 zq*E{`SfmuOh+62fc|%yjB4VSg3TZ?|3&Aw0(-;UCP#Zyu5n*>GC`6GIHiC#h(b#Cx zB#nsdDlbFUxi+)QY+@=;_ujqtd-oiku#JkvVm_bG4NuGMNi6p=ol z;W*CN{QUgyEr2MB9;xappb1LPg;3;qrmj( z0UXEK2b@#YzDlLCV>1AtP$*mnzNW|7(b3Vp9SgNuZ5dcL#+mq&7)+AnM%G#f&}=rRM5NkiG!8{kR8`fxB62`g zpGQ%2#&zAJsyeQ!*Rp`lS6*0HXaV;#wb$(uKoA6ffII&R_`mcQT-e;_z3qo>00000 LNkvXXu0mjf?|cup literal 0 HcmV?d00001 diff --git a/icons/22-apps-simplecastengine.png b/icons/22-apps-simplecastengine.png new file mode 100644 index 0000000000000000000000000000000000000000..68d71892d4b54bdcb05b838df3b1e511fff36725 GIT binary patch literal 802 zcmV+-1Ks?IP)bl|hJAWf+E^_rFH7k)UGK zkwU>$MlJ5DT$BWcp8wp7BjZME6;qK=6toa(L<4EzD#)0iHlj6ZHTRrzr6CBSfk-Bd zY9|ziGntWuo4MmX|L5jhIdkW9uN&Xh`Tp-c5AS&o_a3-M(lA4#(O7S0p97nKjn27U zv$M0m08CC!-nX>0bOyKq%md#iNpcxr-7s(n;eJWGt9FZvi^nDHE5?`1>=^JafV+#Q zTBUBcYXET^dr5DWR$tfa^&`DuO%-t*zX4oMk|YK2-ajnq`kfo3?UHVW5H0}^0+`t! zD=RDYxw*N2E5Y9TS0tS*%%^I#+Q~f6Z%O*G=W)(Gk>~kGlAbP(Iw6D|S(Yu7S*xlr zvx{aHiev{v2=kJ*l|3PZqa`S2cBmg(S%vrhLrJfi*?*D_n%NKKD*A$ak*4Xss$JE~ z`wB4U+}>W#eY#P)ekO{d%|pS>W^;?Ax6JHZtJV7Ue^R~S2TKb8Db-utJj zz%yoc*3A9}$n$)Z0h*qkz6HDpbc&;O!0CyJi3e7Jvn*?;X}Uj6(+$7{NzouMK$0ZC znb|v~)LWL9m)~CnE=$sk(CKvk1c>8!Tv7nenb`*+gq3Zs#*=Lg4 zMgNZim2=Kufz07*qoM6N<$f;8lO!TSXoO*S763F&gNOjY z7=Q+Vj*gC90M<-QOjIq)I!yAAh#d5N|H~O4ZLR=WBH6Gz%d$2CSQD>zl3WSk4FC@( z{cZ?=#K$lr$8jDc`Cf*f@B99?8xBCS4&XRWr&8*30J&80GrF#?127A=X%E=8{j`YO zR;^aIkB^UstpG%%{t1*)J4r4{tzQmlj zZ>zxi9O&=w?=}qMAra{X&eXB>w=y{cNESq7Z?RbH9UmXB zWyRG`K-cxNB2ohII)KLkb zlvJryIt1X|j65%xra9OSAWQmO005v+C~Qq%VF1uHZP&oSz~ZI=VHn<}l-eL7p91(L zHs3v00M~V|h{!q-N#FkkN~zC=hK6QsstzzZI(jMyf{%RPU*~z=?Et6sG%P6C(`k;NpJ0mzBS6_WGPIh9go z5CmUj0W>tBuInNGy@rUd(>B8}ZUykNhka9M#%wl&~@GDI`jN5`~wJ2_=xPs_1FLa002ovPDHLkV1m!3JR<-A literal 0 HcmV?d00001 diff --git a/icons/48-apps-simplecastengine.png b/icons/48-apps-simplecastengine.png new file mode 100644 index 0000000000000000000000000000000000000000..38e246ab872e0e88a27e830e3c8794645155d1bf GIT binary patch literal 1862 zcmV-M2f6r(P)JAaq zESok#YbXA|vPRlkj2)0@rZe|UTgU~{9<{Ti6inDqH~&w0=DzVCU@Iq!SU z1uo$Hg54x5l}f!NFY`RFPel3v^pU(&MEVTFc)@X;`=iF^^Z5nobb1+pL$2%oBZSKh}BCYP)eNua7aWBo2GeaU|`_b)~#DT z|2U(Y4n%>ZMD=GfnS0SPzJ(6}SV!^!&-0Fsj*kATP$&%e$GvS1h{&ATn?|WrDgyX= z48^XYp`qXT8_#BYHm$Tb6ZaP{(Ay@45$nM4@bDzbjUh^Z z(BI#`yi%$BvQx!Ao_{tPjhn)fRTL5>GRJW$BC^+~^d7DCmv-*lS?^S-A0#hMrBWY! zGh-8HVv>Jp`+QPsy}3hO|BdKN0oXk_ICxQqoXH$06bgL+ZU+DnIb)jUhE5fU$PWR8 zo-QOWo0yo`*(q-#2Tara9L^o3+xP6*bEZ>8n2Nw>MI>~clf1#U?Jsmf8kh&xuV0@& zefsnjBC-^~QV}V&ZdeTfyE;+O4%c-@Y}?)j;M-v`B=0X23WtV%E|*(AJUl!Z$2V&Uk^C}% zWeCo^5Ru<@Y_SjJa`|qO-BFd33dGMUWwBz&FT2maond>~xcJxcQK7_l!ZrB=sr zb>x6y7;pK^pT@j-^R@x_b&S}<`Fwssq)oo>$d>~Vd3OTa5}{l!H$Bh0718*w?hX+-7$dg1SS)@bs3W$Vb{ywnOkF8K@>1KjgDyC4 z1=46VZWEDL!vsj0Bp)dji*uH6qD@S4ciU%V$U8-$P#9=7n`0spR`E6gJP%+yNz>n- z=vBgToM&v?K1y;4$xqp~eZAKDsSt4i@K+J3k~}UVRS`Mf)6;XrFE}_j*fTjf`6JUb zM_kw4pp;q*U=4u(iO502Fn%r~j_bOi$useKwryLJEVe$!JkMM1zxu6Nv*waUqcNei zjyhRppp<$5z;t1_DwRsTSg+TwF$`nKah%A<;Eo(9l}a~>$fLgImq~uwah&5xIQ)8* zQuhIvc^49qlOl3?rBWH|glNv1@*|(mzt=E~3V`{(u8TzEGudqR&(&)6SW<;+*RFlv z;>C*}1#nw?JIP*>S7x)>cU7y^-z4RWjeu?2kCVJ1M(lYJ*=AYR(_z=b*3XOE0c^z7 z`%)l8q-hw&Qpa)T?3o}$I-r!g4nWvu4N`svz^?!t2QWr54PYUFj{^8eoW3@m5v}!A zh^Y(^N2ru~0aMj!kdiup2LY@gd1VsATI0?F*a2V}$!j9yN?L0-jxRC~G#ZU{t>$)$7$!4?J50m_uzg4mPf4hi0r?u{O4F#afe`q|<3p>AuyQ!xgU3FmJzI`u= z$iMyVBJ%&?001HBzb3wR_Uze_F6+5~3+NW!0GY$Ui%VV~B>(^b07*qoM6N<$g4lU> AzW@LL literal 0 HcmV?d00001 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