2
Gwenview: an image viewer
3
Copyright 2007 Aurélien Gâteau <agateau@kde.org>
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License
7
as published by the Free Software Foundation; either version 2
8
of the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef VIEWMAINPAGE_H
21
#define VIEWMAINPAGE_H
24
#include <lib/document/document.h>
30
#include <QToolButton>
35
class KActionCollection;
41
class RasterImageView;
43
class ThumbnailBarView;
45
struct ViewMainPagePrivate;
48
* Holds the active document view and associated widgetry.
50
class ViewMainPage : public QWidget
54
static const int MaxViewCount;
56
ViewMainPage(QWidget* parent, SlideShow*, KActionCollection*);
59
ThumbnailBarView* thumbnailBar() const;
70
void setFullScreenMode(bool fullScreen);
72
bool isFullScreenMode() const;
74
void setNormalPalette(const QPalette&);
76
int statusBarHeight() const;
78
virtual QSize sizeHint() const;
81
* Returns the url of the current document, or an invalid url if unknown
85
void openUrl(const KUrl& url);
88
* Opens up to MaxViewCount urls, and set currentUrl as the current one
90
void openUrls(const KUrl::List& urls, const KUrl& currentUrl);
94
Document::Ptr currentDocument() const;
99
* Returns the image view, if the current adapter has one.
101
RasterImageView* imageView() const;
104
* Returns the document view
106
DocumentView* documentView() const;
109
* Sets a widget to show at the bottom of the panel
111
void setToolWidget(QWidget* widget);
113
QToolButton* toggleSideBarButton() const;
118
* Emitted when the part has finished loading
122
void previousImageRequested();
124
void nextImageRequested();
126
void toggleFullScreenRequested();
128
void captionUpdateRequested(const QString&);
131
void setThumbnailBarVisibility(bool visible);
133
void showContextMenu();
135
void slotViewFocused(DocumentView*);
137
void trashView(DocumentView*);
138
void deselectView(DocumentView*);
141
friend struct ViewMainPagePrivate;
142
ViewMainPagePrivate* const d;
147
#endif /* VIEWMAINPAGE_H */