~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to app/mainwindow.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
class KUrl;
32
32
 
33
 
namespace Gwenview {
 
33
namespace Gwenview
 
34
{
34
35
 
35
 
class DocumentPanel;
 
36
class ViewMainPage;
36
37
class ContextManager;
37
38
class MessageBubble;
38
39
 
39
 
class MainWindow : public KXmlGuiWindow {
40
 
Q_OBJECT
 
40
class MainWindow : public KXmlGuiWindow
 
41
{
 
42
    Q_OBJECT
41
43
public:
42
 
        MainWindow();
43
 
        ~MainWindow();
44
 
        /**
45
 
         * Defines the url to display when the window is shown for the first time.
46
 
         */
47
 
        void setInitialUrl(const KUrl&);
48
 
 
49
 
        void startSlideShow();
50
 
 
51
 
        DocumentPanel* documentPanel() const;
52
 
 
53
 
        ContextManager* contextManager() const;
54
 
 
55
 
        bool currentDocumentIsRasterImage() const;
56
 
 
57
 
        void setDistractionFreeMode(bool);
58
 
 
59
 
        void showMessageBubble(MessageBubble*);
 
44
    MainWindow();
 
45
    ~MainWindow();
 
46
    /**
 
47
     * Defines the url to display when the window is shown for the first time.
 
48
     */
 
49
    void setInitialUrl(const KUrl&);
 
50
 
 
51
    void startSlideShow();
 
52
 
 
53
    ViewMainPage* documentPanel() const;
 
54
 
 
55
    ContextManager* contextManager() const;
 
56
 
 
57
    bool currentDocumentIsRasterImage() const;
 
58
 
 
59
    void setDistractionFreeMode(bool);
 
60
 
 
61
    void showMessageBubble(MessageBubble*);
60
62
 
61
63
public Q_SLOTS:
62
 
        void showStartPage();
 
64
    void showStartMainPage();
63
65
 
64
 
        /**
65
 
         * Go to url, without changing current mode
66
 
         */
67
 
        void goToUrl(const KUrl&);
 
66
    /**
 
67
     * Go to url, without changing current mode
 
68
     */
 
69
    void goToUrl(const KUrl&);
68
70
 
69
71
Q_SIGNALS:
70
 
        void viewModeChanged();
 
72
    void viewModeChanged();
71
73
 
72
74
public Q_SLOTS:
73
 
        virtual void setCaption(const QString&);
 
75
    virtual void setCaption(const QString&);
74
76
 
75
 
        virtual void setCaption(const QString&, bool modified);
 
77
    virtual void setCaption(const QString&, bool modified);
76
78
 
77
79
protected:
78
 
        virtual bool queryClose();
79
 
        virtual bool queryExit();
80
 
        virtual QSize sizeHint() const;
81
 
        virtual void showEvent(QShowEvent*);
82
 
        virtual void resizeEvent(QResizeEvent*);
83
 
        virtual void saveProperties(KConfigGroup&);
84
 
        virtual void readProperties(const KConfigGroup&);
 
80
    virtual bool queryClose();
 
81
    virtual bool queryExit();
 
82
    virtual QSize sizeHint() const;
 
83
    virtual void showEvent(QShowEvent*);
 
84
    virtual void resizeEvent(QResizeEvent*);
 
85
    virtual void saveProperties(KConfigGroup&);
 
86
    virtual void readProperties(const KConfigGroup&);
85
87
 
86
88
private Q_SLOTS:
87
 
        void setActiveViewModeAction(QAction* action);
88
 
        void openDirUrl(const KUrl&);
89
 
        void slotThumbnailViewIndexActivated(const QModelIndex&);
90
 
 
91
 
        void slotStartPageUrlSelected(const KUrl&);
92
 
 
93
 
        void goUp();
94
 
        void toggleSideBar(bool visible);
95
 
        void updateToggleSideBarAction();
96
 
        void slotModifiedDocumentListChanged();
97
 
 
98
 
        /**
99
 
         * Init all the file list stuff. This should only be necessary when
100
 
         * Gwenview is started with an image as a parameter (in this case we load
101
 
         * the image before looking at the content of the image folder)
102
 
         */
103
 
        void slotPartCompleted();
104
 
        
105
 
        /**
106
 
         * If an image is loaded but there is no item selected for it in the file
107
 
         * view, this function will select the corresponding item if it comes up in
108
 
         * list.
109
 
         */
110
 
        void slotDirModelNewItems();
111
 
 
112
 
        /**
113
 
         * If no image is selected, select the first one available.
114
 
         */
115
 
        void slotDirListerCompleted();
116
 
 
117
 
        void slotSelectionChanged();
118
 
 
119
 
        void goToPrevious();
120
 
        void goToNext();
121
 
        void goToFirst();
122
 
        void goToLast();
123
 
        void updatePreviousNextActions();
124
 
 
125
 
        void reduceLevelOfDetails();
126
 
        void toggleFullScreen(bool);
127
 
        void toggleSlideShow();
128
 
        void updateSlideShowAction();
129
 
 
130
 
        void saveCurrent();
131
 
        void saveCurrentAs();
132
 
        void openFile();
133
 
        void reload();
134
 
 
135
 
        void showDocumentInFullScreen(const KUrl&);
136
 
 
137
 
        void showConfigDialog();
138
 
        void loadConfig();
139
 
        void print();
140
 
 
141
 
        void preloadNextUrl();
142
 
 
143
 
        void toggleMenuBar();
 
89
    void setActiveViewModeAction(QAction* action);
 
90
    void openDirUrl(const KUrl&);
 
91
    void slotThumbnailViewIndexActivated(const QModelIndex&);
 
92
 
 
93
    void slotStartMainPageUrlSelected(const KUrl&);
 
94
 
 
95
    void goUp();
 
96
    void toggleSideBar(bool visible);
 
97
    void updateToggleSideBarAction();
 
98
    void slotModifiedDocumentListChanged();
 
99
 
 
100
    /**
 
101
     * Init all the file list stuff. This should only be necessary when
 
102
     * Gwenview is started with an image as a parameter (in this case we load
 
103
     * the image before looking at the content of the image folder)
 
104
     */
 
105
    void slotPartCompleted();
 
106
 
 
107
    /**
 
108
     * If an image is loaded but there is no item selected for it in the file
 
109
     * view, this function will select the corresponding item if it comes up in
 
110
     * list.
 
111
     */
 
112
    void slotDirModelNewItems();
 
113
 
 
114
    /**
 
115
     * If no image is selected, select the first one available.
 
116
     */
 
117
    void slotDirListerCompleted();
 
118
 
 
119
    void slotSelectionChanged();
 
120
 
 
121
    void goToPrevious();
 
122
    void goToNext();
 
123
    void goToFirst();
 
124
    void goToLast();
 
125
    void updatePreviousNextActions();
 
126
 
 
127
    void reduceLevelOfDetails();
 
128
    void toggleFullScreen(bool);
 
129
    void toggleSlideShow();
 
130
    void updateSlideShowAction();
 
131
 
 
132
    void saveCurrent();
 
133
    void saveCurrentAs();
 
134
    void openFile();
 
135
    void reload();
 
136
 
 
137
    void showDocumentInFullScreen(const KUrl&);
 
138
 
 
139
    void showConfigDialog();
 
140
    void loadConfig();
 
141
    void print();
 
142
 
 
143
    void preloadNextUrl();
 
144
 
 
145
    void toggleMenuBar();
144
146
 
145
147
private:
146
 
        struct Private;
147
 
        MainWindow::Private* const d;
 
148
    struct Private;
 
149
    MainWindow::Private* const d;
148
150
 
149
 
        void openSelectedDocuments();
150
 
        void saveConfig();
 
151
    void openSelectedDocuments();
 
152
    void saveConfig();
151
153
};
152
154
 
153
155
} // namespace