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

0001 /***************************************************************************
0002  * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr
0003  * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  ***************************************************************************/
0006 #ifndef SKGTABWIDGET_H
0007 #define SKGTABWIDGET_H
0008 /** @file
0009  * A QTabWidget with more features.
0010  *
0011  * @author Stephane MANKOWSKI / Guillaume DE BURE
0012  */
0013 #include <qhash.h>
0014 #include <qtabwidget.h>
0015 #include <qtimer.h>
0016 
0017 #include "skgbasegui_export.h"
0018 
0019 class QPushButton;
0020 
0021 /**
0022  * A QTabWidget with more features.
0023  */
0024 class SKGBASEGUI_EXPORT SKGTabWidget : public QTabWidget
0025 {
0026     Q_OBJECT
0027 
0028 public:
0029     /**
0030      * Default Constructor
0031      * @param iParent the parent
0032      */
0033     explicit SKGTabWidget(QWidget* iParent);
0034 
0035     /**
0036      * Default Destructor
0037      */
0038     ~SKGTabWidget() override;
0039 
0040 public Q_SLOTS:
0041     /**
0042      * Remove a tab
0043      * @param index the tab index
0044      */
0045     virtual void removeTab(int index);
0046 
0047 private Q_SLOTS:
0048     void onCurrentChanged();
0049     void onRefreshSaveIcon();
0050     void onSaveRequested();
0051     void onMoveTab(int oldPos, int newPos);
0052 
0053 private:
0054     QTimer m_timerSave;
0055 
0056     QHash<QWidget*, QPushButton*> m_tabIndexSaveButton;
0057 };
0058 
0059 #endif  // SKGTABWIDGET_H