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., 51 Franklin Steet, Fifth Floor, 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
41
* The browser extension is an attribute of GVImagePart and provides
42
* some services to Konqueror. All Konqueror KParts have one.
44
class GVDirPartBrowserExtension: public KParts::BrowserExtension {
48
GVDirPartBrowserExtension(GVDirPart* viewPart, const char* name=0L);
49
~GVDirPartBrowserExtension();
65
GVDirPart* mGVDirPart;
69
* A Read Only KPart to browse directories and their images using Gwenview
71
class GVDirPart : public KParts::ReadOnlyPart {
74
GVDirPart(QWidget*, const char*, QObject*, const char*, const QStringList &);
78
* Return information about the part
80
static KAboutData* createAboutData();
83
* Returns the name of the current file in the pixmap
88
* Print the image being viewed if there is one
92
void partActivateEvent(KParts::PartActivateEvent* event);
95
* Unused because openURL() is implemented but required to be
98
virtual bool openFile();
101
* Tell the widgets the URL to browse. Sets the window
102
* caption and saves URL to m_url (important for history and
105
virtual bool openURL(const KURL& url);
109
* Turns the slide show on or off
111
void toggleSlideShow();
114
* Sets Konqueror's caption, statusbar and emits completed().
115
* Called by loaded() signal in GVDocument
117
void loaded(const KURL& url);
120
* Rotates the current image 90 degrees clockwise
124
void directoryChanged(const KURL& dirURL);
126
void urlChanged( const KURL& );
130
* The component's widget, contains the files view on the left
131
* and scroll view on the right.
133
QSplitter* mSplitter;
138
ImageView* mImageView;
146
* Shows the directory's files and folders
149
FileViewStack* mFilesView;
152
* This inherits from KParts::BrowserExtention and supplies
153
* some extra functionality to Konqueror.
155
GVDirPartBrowserExtension* mBrowserExtension;
158
* Action turns on slide show
160
KToggleAction* mToggleSlideShow;
161
SlideShow* mSlideShow;