34 lines
640 B
C
34 lines
640 B
C
|
|
#ifndef TABWIDGET_H
|
||
|
|
#define TABWIDGET_H
|
||
|
|
|
||
|
|
#include <QTabWidget>
|
||
|
|
|
||
|
|
class TabWidget : public QTabWidget
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
explicit TabWidget(QWidget* aParent = nullptr);
|
||
|
|
|
||
|
|
public slots:
|
||
|
|
QString tabPath(int aTabIndex) const;
|
||
|
|
int tabIndexFromPath(const QString& aPath) const;
|
||
|
|
void refreshCurrentTab(bool aSaved);
|
||
|
|
|
||
|
|
void closeAllTabs();
|
||
|
|
void closeCurrentTab();
|
||
|
|
bool closeTab(int aTabIndex);
|
||
|
|
|
||
|
|
void saveAllTabs();
|
||
|
|
void saveCurrentTab();
|
||
|
|
void saveTab(int aTabIndex);
|
||
|
|
|
||
|
|
void saveCurrentTabAs();
|
||
|
|
void saveTabAs(int aTabIndex);
|
||
|
|
|
||
|
|
signals:
|
||
|
|
void tabClosed(QString aTabPath);
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // TABWIDGET_H
|