File indexing completed on 2024-04-28 17:05:55

0001 /*
0002     SPDX-FileCopyrightText: 2006 Csaba Karai <krusader@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2006-2022 Krusader Krew <https://krusader.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef PERCENTALSPLITTER_H
0009 #define PERCENTALSPLITTER_H
0010 
0011 // QtWidgets
0012 #include <QLabel>
0013 #include <QSplitter>
0014 
0015 class PercentalSplitter : public QSplitter
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit PercentalSplitter(QWidget *parent = nullptr);
0021     ~PercentalSplitter() override;
0022 
0023     QString toolTipString(int p);
0024 
0025 protected:
0026     void showEvent(QShowEvent *event) override;
0027 
0028 protected slots:
0029     void slotSplitterMoved(int pos, int index);
0030 
0031 private:
0032     QLabel *label;
0033     int opaqueOldPos;
0034     QPoint labelLocation;
0035 };
0036 
0037 #endif /* __PERCENTAL_SPLITTER__ */