2008-04-27 11:05:59 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2008 by Pino Toscano <pino@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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#include "view.h"
|
|
|
|
#include "view_p.h"
|
|
|
|
|
|
|
|
// local includes
|
|
|
|
#include "document_p.h"
|
|
|
|
|
|
|
|
using namespace Okular;
|
|
|
|
|
|
|
|
ViewPrivate::ViewPrivate()
|
2017-09-05 21:27:18 +00:00
|
|
|
: document(nullptr)
|
2008-04-27 11:05:59 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ViewPrivate::~ViewPrivate()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
View::View(const QString &name)
|
|
|
|
: d_ptr(new ViewPrivate())
|
|
|
|
{
|
|
|
|
d_ptr->name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
View::~View()
|
|
|
|
{
|
|
|
|
if (d_ptr->document) {
|
|
|
|
d_ptr->document->m_views.remove(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
delete d_ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
Document *View::viewDocument() const
|
|
|
|
{
|
2017-09-05 21:27:18 +00:00
|
|
|
return d_ptr->document ? d_ptr->document->m_parent : nullptr;
|
2008-04-27 11:05:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QString View::name() const
|
|
|
|
{
|
|
|
|
return d_ptr->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool View::supportsCapability(View::ViewCapability capability) const
|
|
|
|
{
|
|
|
|
Q_UNUSED(capability)
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
View::CapabilityFlags View::capabilityFlags(View::ViewCapability capability) const
|
|
|
|
{
|
|
|
|
Q_UNUSED(capability)
|
2019-12-23 16:15:49 +00:00
|
|
|
return NoFlag;
|
2008-04-27 11:05:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QVariant View::capability(View::ViewCapability capability) const
|
|
|
|
{
|
|
|
|
Q_UNUSED(capability)
|
|
|
|
return QVariant();
|
|
|
|
}
|
|
|
|
|
|
|
|
void View::setCapability(View::ViewCapability capability, const QVariant &option)
|
|
|
|
{
|
|
|
|
Q_UNUSED(capability)
|
|
|
|
Q_UNUSED(option)
|
|
|
|
}
|