mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Lite version of the viewer
This commit is contained in:
44
Pdf4QtViewerLite/Pdf4QtViewerLite.pro
Normal file
44
Pdf4QtViewerLite/Pdf4QtViewerLite.pro
Normal file
@@ -0,0 +1,44 @@
|
||||
# Copyright (C) 2018-2020 Jakub Melka
|
||||
#
|
||||
# This file is part of Pdf4Qt.
|
||||
#
|
||||
# Pdf4Qt is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Pdf4Qt 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 Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with Pdf4Qt. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
QT += core gui widgets winextras
|
||||
|
||||
TARGET = Pdf4QtViewerLite
|
||||
TEMPLATE = app
|
||||
|
||||
VERSION = 1.0.0
|
||||
|
||||
RC_ICONS = $$PWD/app-icon.ico
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "PDF viewer for Qt, Lite version"
|
||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2020"
|
||||
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
||||
|
||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
|
||||
DESTDIR = $$OUT_PWD/..
|
||||
LIBS += -L$$OUT_PWD/..
|
||||
LIBS += -lPDF4QtLib -lPDF4QtViewer
|
||||
CONFIG += force_debug_info
|
||||
|
||||
application.files = $$DESTDIR/Pdf4QtViewerLite.exe
|
||||
application.path = $$DESTDIR/install
|
||||
INSTALLS += application
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
BIN
Pdf4QtViewerLite/app-icon.ico
Normal file
BIN
Pdf4QtViewerLite/app-icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 251 KiB |
34
Pdf4QtViewerLite/main.cpp
Normal file
34
Pdf4QtViewerLite/main.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "pdfviewermainwindowlite.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication::setAttribute(Qt::AA_CompressHighFrequencyEvents, true);
|
||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||
QApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity, true);
|
||||
QApplication application(argc, argv);
|
||||
|
||||
QCoreApplication::setOrganizationName("MelkaJ");
|
||||
QCoreApplication::setApplicationName("PDF4QT Viewer Lite");
|
||||
QCoreApplication::setApplicationVersion("1.0.0");
|
||||
QApplication::setApplicationDisplayName(QApplication::translate("Application", "PDF4QT Viewer Lite"));
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QCoreApplication::applicationName());
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.addPositionalArgument("file", "The PDF file to open.");
|
||||
parser.process(application);
|
||||
|
||||
pdfviewer::PDFViewerMainWindowLite mainWindow;
|
||||
mainWindow.show();
|
||||
|
||||
QStringList arguments = application.arguments();
|
||||
if (arguments.size() > 1)
|
||||
{
|
||||
mainWindow.getProgramController()->openDocument(arguments[1]);
|
||||
}
|
||||
|
||||
return application.exec();
|
||||
}
|
Reference in New Issue
Block a user