Warning, file /office/calligra/gemini/lib/GeminiMainWindow.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE project
0002  * Copyright (C) 2015 Dan Leinir Turthra Jensen <admin@leinir.dk>
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef GEMINIMAINWINDOW_H
0021 #define GEMINIMAINWINDOW_H
0022 
0023 #include <QMainWindow>
0024 #include "gemini_export.h"
0025 class QQuickView;
0026 
0027 /**
0028  * \short 
0029  * 
0030  */
0031 class GEMINI_EXPORT GeminiMainWindow : public QMainWindow
0032 {
0033     Q_OBJECT
0034     Q_PROPERTY(GeminiState currentState READ currentState NOTIFY currentStateChanged)
0035     Q_PROPERTY(bool fullScreen READ fullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
0036     Q_ENUMS(GeminiState)
0037 public:
0038     enum GeminiState {
0039         AllStates = -3,
0040         UnknownState = -2,
0041         NoState = -1,
0042         CreateState = 1,
0043         EditState = 2,
0044         ViewState = 3
0045     };
0046 
0047     explicit GeminiMainWindow(QWidget* parent = 0, Qt::WindowFlags flags = 0);
0048     ~GeminiMainWindow() override;
0049 
0050     GeminiState currentState() const;
0051 
0052     bool fullScreen() const;
0053     void setFullScreen(bool newState);
0054 
0055     bool stateLocked() const;
0056     void setStateLocked(bool locked);
0057 
0058     void changeState(GeminiState newState, bool lockNewState = false);
0059 
0060     void setViewForState(QWidget* widget, GeminiState state);
0061     void setViewForState(QQuickView* quickView, GeminiState state);
0062 
0063     void setEventReceiverForState(QObject* receiver, GeminiState state);
0064 
0065 Q_SIGNALS:
0066     void stateLockedChanged();
0067     void currentStateChanged();
0068     void fullScreenChanged();
0069 
0070 private Q_SLOTS:
0071     void stateChanging();
0072 
0073 private:
0074     class Private;
0075     Private* d;
0076 #ifdef Q_OS_WIN
0077     bool winEvent(MSG * message, long * result);
0078 #endif
0079 };
0080 
0081 #endif // GEMINIMAINWINDOW_H