blob: 38372cfb108f7cfcdd000c3e56809ee11948d278 (
plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/* This file is part of the KDE project
Copyright (C) 2001-2002 Matthias Kretz <[email protected]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
// $Id$
#ifndef KIMAGEVIEWER_VIEWER_H
#define KIMAGEVIEWER_VIEWER_H
#include <tdeparts/part.h>
#include <kdemacros.h>
namespace KParts
{
class BrowserExtension;
}
namespace KImageViewer
{
class Canvas;
/**
* An image viewer KPart
*
* @author Matthias Kretz <[email protected]>
*
* You'll find an implementation in tdegraphics (KView). You may
* still use this interface in your program but it will only work
* if you have an implementation installed
*
* WARNING: This interface is not guaranteed to be kept binary or source compatible
* until it's finished. So if you're using this interface please get in contact
* with me.
*/
class TDE_EXPORT Viewer : public KParts::ReadWritePart
{
TQ_OBJECT
public:
Viewer( TQObject * parent = 0, const char * name = 0 );
virtual ~Viewer();
/**
* Return the canvas this viewer is using. The interface of the
* canvas is defined in kimageviewer/canvas.h
*/
virtual Canvas * canvas() const = 0;
/**
* If the Viewer wants to be configurable
*/
//virtual void createConfigurationDialogPages() = 0;
/**
* A pointer to the Browser Extension (if available). You should always
* check whether this returns a valid pointer.
*/
virtual KParts::BrowserExtension * browserExtension() const { return 0; }
public slots:
/**
* Set a new Image. Close the old one and change the caption and file
* name and url and whatnot accordingly.
* So if you want to display a new image (not change the one shown) this
* is the method to use. Else take a look at Canvas::setImage().
*/
virtual void newImage( const TQImage & ) = 0;
/**
* Tell the view to reload the current image. The host for this view
* should make an Action available for reloading.
*/
virtual void reload() = 0;
signals:
/**
* Emitted when the viewer opens a new image
*/
void imageOpened( const KURL & );
}; //class Viewer
} //namespace KImageViewer
#endif // KIMAGEVIEWER_VIEWER_H
|