ff7tk  1.2.0.13
Work with Final Fantasy 7 game data
Splitter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2009 - 2022 Arzel Jérôme <myst6re@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <QSplitter>
7 #include <QMap>
8 #include <ff7tkqtwidgets_export.h>
9 
10 class FF7TKQTWIDGETS_EXPORT Splitter : public QSplitter
11 {
12  Q_OBJECT
13 public:
14  explicit Splitter(QWidget *parent = nullptr);
15  explicit Splitter(Qt::Orientation orientation, QWidget *parent = nullptr);
16  bool isCollapsed(int index);
17 public slots:
18  void setCollapsed(int index, bool collapsed);
19  inline void toggleCollapsed(int index) {
20  setCollapsed(index, !isCollapsed(index));
21  }
22 private:
23  QMap<int, int> _lastSizes;
24 };
Splitter
Definition: Splitter.h:10
Splitter::toggleCollapsed
void toggleCollapsed(int index)
Definition: Splitter.h:19