Initial import
This commit is contained in:
18
src/CMakeLists.txt
Normal file
18
src/CMakeLists.txt
Normal file
@@ -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} )
|
||||
62
src/main.cpp
Normal file
62
src/main.cpp
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// application header
|
||||
#include "simplecastenginewindow.h"
|
||||
|
||||
// KF headers
|
||||
#include <KAboutData>
|
||||
#include <KLocalizedString>
|
||||
|
||||
// Qt headers
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
|
||||
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();
|
||||
}
|
||||
23
src/org.example.simplecastengine.appdata.xml
Normal file
23
src/org.example.simplecastengine.appdata.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>org.example.simplecastengine.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license> https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license </project_license>
|
||||
<name>SimpleCastEngine</name>
|
||||
<summary> https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-summary </summary>
|
||||
<description>
|
||||
<p> https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description </p>
|
||||
</description>
|
||||
<url type="homepage">https://www.example.org</url>
|
||||
<url type="bugtracker">https://bugs.example.org</url>
|
||||
<url type="donation">https://www.example.org/community/donations</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image> https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-screenshots </image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<provides>
|
||||
<binary>simplecastengine</binary>
|
||||
</provides>
|
||||
<project_group>KDE</project_group>
|
||||
</component>
|
||||
9
src/org.example.simplecastengine.desktop
Normal file
9
src/org.example.simplecastengine.desktop
Normal file
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
|
||||
Name=SimpleCastEngine
|
||||
GenericName=A Simple KDE Application
|
||||
Icon=simplecastengine
|
||||
|
||||
Exec=simplecastengine
|
||||
StartupWMClass=simplecastengine
|
||||
28
src/simplecastengine.ui
Normal file
28
src/simplecastengine.ui
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>mainWidget</class>
|
||||
<widget class="QWidget" name="mainWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Hello world!</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
33
src/simplecastenginewindow.cpp
Normal file
33
src/simplecastenginewindow.cpp
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "simplecastenginewindow.h"
|
||||
|
||||
SimpleCastEngineWindow::SimpleCastEngineWindow()
|
||||
: QMainWindow()
|
||||
{
|
||||
QWidget *widget = new QWidget(this);
|
||||
setCentralWidget(widget);
|
||||
m_ui.setupUi(widget);
|
||||
}
|
||||
|
||||
SimpleCastEngineWindow::~SimpleCastEngineWindow()
|
||||
{
|
||||
}
|
||||
57
src/simplecastenginewindow.h
Normal file
57
src/simplecastenginewindow.h
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SIMPLECASTENGINEWINDOW_H
|
||||
#define SIMPLECASTENGINEWINDOW_H
|
||||
|
||||
|
||||
#include "ui_simplecastengine.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
/**
|
||||
* 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
|
||||
Reference in New Issue
Block a user