initial setup

This commit is contained in:
Marc Wäckerlin
2015-11-10 19:48:38 +00:00
commit a4e5b55c16
36 changed files with 5250 additions and 0 deletions

8
src/languages.qrc Normal file
View File

@@ -0,0 +1,8 @@
<RCC>
<qresource prefix="/language">
<file>pdfsign_de.qm</file>
<file>pdfsign_fr.qm</file>
<file>pdfsign_it.qm</file>
<file>pdfsign_en.qm</file>
</qresource>
</RCC>

28
src/main.cxx Normal file
View File

@@ -0,0 +1,28 @@
/** @id $Id$
This file has been added:
- by bootstrap.sh
- on Tue, 10 November 2015 20:45:44 +0100
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <pdfsign.hxx>
#include <QApplication>
#include <QCommandLineParser>
#include <iostream>
int main(int argc, char *argv[]) try {
QApplication a(argc, argv);
QCommandLineParser parser;
parser.addHelpOption();
parser.process(a);
QStringList scripts(parser.positionalArguments());
Pdfsign w;
w.show();
return a.exec();
} catch (std::exception &x) {
std::cerr<<"**** error: "<<x.what()<<std::endl;
return 1;
}

70
src/makefile.am Normal file
View File

@@ -0,0 +1,70 @@
## @id $Id$
##
## This file has been added:
## - by bootstrap.sh
## - on Tue, 10 November 2015 20:45:44 +0100
## Feel free to change it or even remove and rebuild it, up to your needs
##
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
bin_PROGRAMS = pdfsign
## required to enable the translation feature
LANGUAGE_FILE_BASE = pdfsign
## list here the Qt plugins your project depends on
## required to build Mac OS-X app-bundle
QT_PLUGINS = iconengines imageformats platforms
#### enable if you deliver a KDE/Gnome desktop file
#applicationsdir = /applications
#dist_applications_DATA = pdfsign.desktop
#### enable (ev. instead of bin_PROGRAMS) if you build a library
#lib_LTLIBRARIES = pdfsign.la
#pdfsign_la_SOURCES = libmain.cxx version.cxx
## noop to prevent:
## «src/makefile.am: error: object 'version.$(OBJEXT)' created both with
## libtool and without»
#pdfsign_la_CXXFLAGS = $(AM_CXXFLAGS)
## list headers that are required for build, but that are not installed
noinst_HEADERS = version.hxx
## list all %.hxx files with Q_OBJECT as moc_%.cxx
pdfsign_MOCFILES = moc_pdfsign.cxx
## list all %.ui files as ui_%.hxx
pdfsign_UIFILES = ui_pdfsign.hxx
## list all %.qrc resource files as qrc_%.cxx
## note: if there exists a directory %, the file %.qrc is generated from that
pdfsign_RESOURCES = qrc_languages.cxx # qrc_resources.cxx
## list all final translation files, list all supported languages here
pdfsign_TRANSLATIONS = ${LANGUAGE_FILE_BASE}_en.qm \
${LANGUAGE_FILE_BASE}_de.qm \
${LANGUAGE_FILE_BASE}_fr.qm \
${LANGUAGE_FILE_BASE}_it.qm
## list all C++ files that need translation
pdfsign_TR_FILES = main.cxx version.cxx
## automatic assembly, no need to change
pdfsign_SOURCES = ${pdfsign_TR_FILES} ${BUILT_SOURCES}
## automatic assembly, no need to change
BUILT_SOURCES = ${pdfsign_MOCFILES} ${pdfsign_UIFILES} ${pdfsign_TRANSLATIONS} ${pdfsign_RESOURCES}
## automatic assembly, no need to change
EXTRA_DIST_TR = ${pdfsign_MOCFILES:moc_%.cxx=%.hxx} ${pdfsign_UIFILES:ui_%.hxx=%.ui}
## automatic assembly, no need to change
## except: adapt the pre-delivered qt_%.qm list (language files you copy from qt
EXTRA_DIST = ${EXTRA_DIST_TR} ${pdfsign_RESOURCES:qrc_%.cxx:%.qrc} ${pdfsign_TRANSLATIONS:%.qm=%.ts} qt_de.qm qt_fr.qm
## automatic assembly, no need to change
LANGUAGE_FILES = ${EXTRA_DIST_TR} ${pdfsign_TR_FILES}
MAINTAINERCLEANFILES = makefile.in

28
src/pdfsign.hxx Normal file
View File

@@ -0,0 +1,28 @@
/** @id $Id$
This file has been added:
- by bootstrap.sh
- on Tue, 10 November 2015 20:45:44 +0100
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#ifndef PDFSIGN_HXX
#define PDFSIGN_HXX
#include <QMainWindow>
#include <ui_pdfsign.hxx>
/// Main Window
/** Main window for pdfsign */
class Pdfsign: public QMainWindow, protected Ui::Pdfsign {
Q_OBJECT;
public:
explicit Pdfsign(QWidget *parent = 0): QMainWindow(parent) {
setupUi(this);
}
virtual ~Pdfsign() {}
};
#endif

22
src/pdfsign.pc.in Normal file
View File

@@ -0,0 +1,22 @@
## @id $Id$
##
## This file has been added:
## - by bootstrap.sh
## - on Tue, 10 November 2015 20:45:44 +0100
## Feel free to change it or even remove and rebuild it, up to your needs
##
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=${exec_prefix}/lib
includedir=${prefix}/include
translationsdir=@datadir@/@PACKAGE_NAME@/translations
Name: @PACKAGE_NAME@
Description: @DESCRIPTION@
Version: @VERSION@
Libs: -L${libdir} -lpdfsign @LDFLAGS@
Cflags: -I${includedir} @CPPFLAGS@
Requires: @PKG_REQUIREMENTS@

31
src/pdfsign.ui Normal file
View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Pdfsign</class>
<widget class="QMainWindow" name="Pdfsign">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>Pdfsign</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

40
src/version.cxx Normal file
View File

@@ -0,0 +1,40 @@
/*! @file
@id $
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <string>
namespace NAMESPACE {
std::string package_string() {
return PACKAGE_STRING;
}
std::string package_name() {
return PACKAGE_NAME;
}
std::string version() {
return PACKAGE_VERSION;
}
std::string build_date() {
return BUILD_DATE;
}
std::string author() {
return AUTHOR;
}
std::string description() {
return DESCRIPTION;
}
std::string readme() {
return README;
}
std::string logo() {
return PROJECT_LOGO;
}
std::string icon() {
return PROJECT_ICON;
}
const std::string WHAT("#(@) " PACKAGE_STRING);
const std::string IDENT("$Id: " PACKAGE_STRING);
}

33
src/version.hxx Normal file
View File

@@ -0,0 +1,33 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <string>
namespace NAMESPACE {
/// get package string which consists of package name and package version
std::string package_string();
/// get package name
std::string package_name();
/// get package version
std::string version();
/// get code build date
std::string build_date();
/// get author, i.e. copyright holder
std::string author();
/// get short package description (1st line of README)
std::string description();
/// get long package description (starting at 3rd line in README)
std::string readme();
/// get package logo file name
std::string logo();
/// get package icon file name
std::string icon();
/// used for <code>what filename</code>
extern const std::string WHAT;
/// used for <code>ident filename</code>
extern const std::string IDENT;
}