mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
simplify by not having a subclass just to call a method
This commit is contained in:
parent
60d38e7970
commit
2552bf6976
4 changed files with 5 additions and 80 deletions
|
@ -3,7 +3,6 @@ include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES})
|
|||
|
||||
set(active-documentviewer_SRCS
|
||||
main.cpp
|
||||
documentviewer.cpp
|
||||
)
|
||||
|
||||
kde4_add_kdeinit_executable(active-documentviewer ${active-documentviewer_SRCS})
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/***************************************************************************
|
||||
* *
|
||||
* Copyright 2011 Sebastian Kügler <sebas@kde.org> *
|
||||
* Copyright 2012 Marco Martin <mart@kde.org> *
|
||||
* *
|
||||
* 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) any later version. *
|
||||
* *
|
||||
* 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, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
|
||||
***************************************************************************/
|
||||
|
||||
#include "documentviewer.h"
|
||||
#include "kdeclarativeview.h"
|
||||
|
||||
|
||||
DocumentViewer::DocumentViewer()
|
||||
: KDeclarativeMainWindow()
|
||||
{
|
||||
|
||||
declarativeView()->setPackageName("org.kde.active.documentviewer");
|
||||
}
|
||||
|
||||
DocumentViewer::~DocumentViewer()
|
||||
{
|
||||
}
|
||||
|
||||
#include "documentviewer.moc"
|
|
@ -1,41 +0,0 @@
|
|||
/***************************************************************************
|
||||
* *
|
||||
* Copyright 2011 Sebastian Kügler <sebas@kde.org> *
|
||||
* Copyright 2012 Marco Martin <mart@kde.org> *
|
||||
* *
|
||||
* 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) any later version. *
|
||||
* *
|
||||
* 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, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef DOCUMENTVIEWER_H
|
||||
#define DOCUMENTVIEWER_H
|
||||
|
||||
#include "kdeclarativemainwindow.h"
|
||||
|
||||
#include <KProcess>
|
||||
|
||||
class DirModel;
|
||||
|
||||
|
||||
class DocumentViewer : public KDeclarativeMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DocumentViewer();
|
||||
virtual ~DocumentViewer();
|
||||
};
|
||||
|
||||
#endif // DOCUMENTVIEWER_H
|
|
@ -27,6 +27,9 @@
|
|||
#include <KDE/KLocale>
|
||||
#include <KConfigGroup>
|
||||
|
||||
#include "kdeclarativemainwindow.h"
|
||||
#include "kdeclarativeview.h"
|
||||
|
||||
// Own
|
||||
#include "documentviewer.h"
|
||||
|
||||
|
@ -56,7 +59,8 @@ KDE_EXPORT int kdemain(int argc, char **argv)
|
|||
|
||||
//kDebug() << "ARGS:" << args << args->count();
|
||||
|
||||
DocumentViewer *mainWindow = new DocumentViewer();
|
||||
KDeclarativeMainWindow *mainWindow = new KDeclarativeMainWindow();
|
||||
mainWindow->declarativeView()->setPackageName("org.kde.active.documentviewer");
|
||||
mainWindow->show();
|
||||
args->clear();
|
||||
return app.exec();
|
||||
|
|
Loading…
Reference in a new issue