File: view.cpp

package info (click to toggle)
okular 4%3A16.08.2-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,108 kB
  • sloc: cpp: 74,698; ansic: 3,964; xml: 57; sh: 54; makefile: 8
file content (77 lines) | stat: -rw-r--r-- 1,704 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/***************************************************************************
 *   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()
    : document( 0 )
{
}

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
{
    return d_ptr->document ? d_ptr->document->m_parent : 0;
}

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 )
    return 0;
}

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 )
}