File indexing completed on 2022-09-27 16:29:17

0001 /**
0002  * SPDX-FileCopyrightText: (C) 2003 Sébastien Laoût <slaout@linux62.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef CONTAINER_H
0008 #define CONTAINER_H
0009 
0010 #include <KXmlGuiWindow>
0011 
0012 class QResizeEvent;
0013 class QVBoxLayout;
0014 class QMoveEvent;
0015 class QWidget;
0016 class QAction;
0017 class KToggleAction;
0018 class BNPView;
0019 class SettingsDialog;
0020 
0021 /** The window that contain baskets, organized by tabs.
0022  * @author Sébastien Laoût
0023  */
0024 class MainWindow : public KXmlGuiWindow
0025 {
0026     Q_OBJECT
0027 public:
0028     /** Constructor, initializer and destructor */
0029     explicit MainWindow(QWidget *parent = nullptr);
0030     ~MainWindow() override;
0031 
0032 private:
0033     void setupActions();
0034 public Q_SLOTS:
0035     bool askForQuit();
0036     /** Settings **/
0037     //  void toggleToolBar();
0038     void toggleStatusBar();
0039     void showShortcutsSettingsDialog();
0040     void configureToolbars() override;
0041     void configureNotifications();
0042     void showSettingsDialog();
0043     void minimizeRestore();
0044     void quit();
0045     void slotNewToolbarConfig();
0046 
0047 protected:
0048     bool queryExit();
0049     bool queryClose() override;
0050     void resizeEvent(QResizeEvent *) override;
0051     void moveEvent(QMoveEvent *) override;
0052 
0053 public:
0054     void ensurePolished();
0055 
0056 private:
0057     // Settings actions :
0058     //  KToggleAction *m_actShowToolbar;
0059     KToggleAction *m_actShowStatusbar;
0060     QAction *actQuit;
0061     QAction *actAppConfig;
0062     QList<QAction *> actBasketsList;
0063 
0064 private:
0065     QVBoxLayout *m_layout;
0066     BNPView *m_baskets;
0067     bool m_startDocked;
0068     SettingsDialog *m_settings;
0069     bool m_quit;
0070 };
0071 
0072 #endif // CONTAINER_H