2
Copyright 2004 Jonathan Riddell <jr@jriddell.org>
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
as published by the Free Software Foundation; either version 2
7
of the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#ifndef __gvdirpart_h__
20
#define __gvdirpart_h__
22
#include <kparts/part.h>
23
#include <kparts/browserextension.h>
25
// Forward declarations
29
class GVScrollPixmapView;
30
class GVFileViewStack;
37
* The browser extension is an attribute of GVImagePart and provides
38
* some services to Konqueror. All Konqueror KParts have one.
40
class GVDirPartBrowserExtension: public KParts::BrowserExtension {
44
GVDirPartBrowserExtension(GVDirPart* viewPart, const char* name=0L);
45
~GVDirPartBrowserExtension();
61
GVDirPart* mGVDirPart;
65
* A Read Only KPart to browse directories and their images using Gwenview
67
class GVDirPart : public KParts::ReadOnlyPart {
70
GVDirPart(QWidget*, const char*, QObject*, const char*, const QStringList &);
74
* Return information about the part
76
static KAboutData* createAboutData();
79
* Returns the name of the current file in the pixmap
84
* Print the image being viewed if there is one
88
void partActivateEvent(KParts::PartActivateEvent* event);
91
* Unused because openURL() is implemented but required to be
94
virtual bool openFile();
97
* Tell the widgets the URL to browse. Sets the window
98
* caption and saves URL to m_url (important for history and
101
virtual bool openURL(const KURL& url);
105
* Turns the slide show on or off
107
void toggleSlideShow();
110
* Sets Konqueror's caption, statusbar and emits completed().
111
* Called by loaded() signal in GVDocument
113
void loaded(const KURL& url);
116
* Rotates the current image 90 degrees clockwise
120
void directoryChanged(const KURL& dirURL);
124
* The component's widget, contains the files view on the left
125
* and scroll view on the right.
127
QSplitter* mSplitter;
132
GVScrollPixmapView* mPixmapView;
137
GVDocument* mDocument;
140
* Shows the directory's files and folders
143
GVFileViewStack* mFilesView;
146
* This inherits from KParts::BrowserExtention and supplies
147
* some extra functionality to Konqueror.
149
GVDirPartBrowserExtension* mBrowserExtension;
152
* Action turns on slide show
154
KToggleAction* mToggleSlideShow;
155
GVSlideShow* mSlideShow;