~ubuntu-branches/ubuntu/intrepid/gwenview/intrepid

« back to all changes in this revision

Viewing changes to gwenview/mainwindow.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Spanier
  • Date: 2002-03-13 11:38:18 UTC
  • Revision ID: james.westby@ubuntu.com-20020313113818-q60emgzka7p7w23q
Tags: upstream-0.12.0
Import upstream version 0.12.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Gwenview - A simple image viewer for KDE
 
3
Copyright (C) 2000-2002 Aur�lien G�teau
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
18
 
 
19
*/
 
20
#ifndef MAINWINDOW_H
 
21
#define MAINWINDOW_H
 
22
 
 
23
 
 
24
#include <kdockwidget.h>
 
25
 
 
26
 
 
27
class KAction;
 
28
class KAccel;
 
29
 
 
30
class FileView;
 
31
class DirView;
 
32
class GVPixmap;
 
33
class PixmapView;
 
34
class StatusBarProgress;
 
35
 
 
36
 
 
37
class MainWindow : public KDockMainWindow {
 
38
Q_OBJECT
 
39
public:
 
40
        MainWindow();
 
41
        ~MainWindow();
 
42
 
 
43
        FileView* fileView() const { return mFileView; }
 
44
        PixmapView* pixmapView() const { return mPixmapView; }
 
45
 
 
46
public slots:
 
47
        void setPath(QString);
 
48
        void setFilename(QString);
 
49
 
 
50
private:
 
51
        KDockWidget* mFolderDock;
 
52
        KDockWidget* mFileDock;
 
53
        KDockWidget* mPixmapDock;
 
54
        StatusBarProgress* mProgress;
 
55
 
 
56
        FileView* mFileView;
 
57
        DirView* mDirView;
 
58
        PixmapView* mPixmapView;
 
59
 
 
60
        bool mFullScreen;
 
61
        QString mFolder,mFilename;
 
62
        GVPixmap* mGVPixmap;
 
63
 
 
64
        KAction* mOpenFile;
 
65
        KAction* mRenameFile;
 
66
        KAction* mCopyFile;
 
67
        KAction* mMoveFile;
 
68
        KAction* mDeleteFile;
 
69
        KAction* mOpenWithEditor;
 
70
        KAction* mShowConfigDialog;
 
71
        KAction* mShowKeyDialog;
 
72
        KAction* mToggleFullScreen;
 
73
        KAction* mStop;
 
74
        KAccel* mAccel;
 
75
 
 
76
        void createWidgets();
 
77
        void createActions();
 
78
        void createAccels();
 
79
        void createMenu();
 
80
        void createToolBar();
 
81
        void createFileViewPopupMenu();
 
82
        void createScrollPixmapViewPopupMenu();
 
83
 
 
84
private slots:
 
85
        void openFile();
 
86
        void toggleFullScreen();
 
87
        void showConfigDialog();
 
88
        void showKeyDialog();
 
89
        void pixmapLoading();
 
90
        void pixmapLoaded();
 
91
        void openWithEditor();
 
92
 
 
93
// Status bar update
 
94
        /**
 
95
         * Update both folder and file status bar
 
96
         */
 
97
        void updateStatusBar();
 
98
 
 
99
        /**
 
100
         * Update only file status bar, allows setting file info
 
101
         * when folder info is not available yet
 
102
         */
 
103
        void updateFileStatusBar();
 
104
 
 
105
        void thumbnailUpdateStarted(int);
 
106
        void thumbnailUpdateEnded();
 
107
        void thumbnailUpdateProcessedOne();
 
108
 
 
109
        /**
 
110
         * Allow quitting full screen mode by pressing Escape key.
 
111
         */
 
112
        void escapePressed();
 
113
};
 
114
 
 
115
 
 
116
#endif