File indexing completed on 2024-05-05 04:19:19
0001 /* 0002 Gwenview: an image viewer 0003 Copyright 2009 Aurélien Gâteau <agateau@kde.org> 0004 0005 This program is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU General Public License 0007 as published by the Free Software Foundation; either version 2 0008 of the License, or (at your option) any later version. 0009 0010 This program is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU General Public License for more details. 0014 0015 You should have received a copy of the GNU General Public License 0016 along with this program; if not, write to the Free Software 0017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 0019 */ 0020 #ifndef SPLITTER_H 0021 #define SPLITTER_H 0022 0023 // Qt 0024 #include <QSplitter> 0025 0026 namespace Gwenview 0027 { 0028 class SplitterHandle : public QSplitterHandle 0029 { 0030 public: 0031 SplitterHandle(Qt::Orientation orientation, QSplitter *parent) 0032 : QSplitterHandle(orientation, parent) 0033 { 0034 } 0035 }; 0036 0037 /** 0038 * Home made splitter to be able to define a custom handle which is border with 0039 * "mid" colored lines. 0040 */ 0041 class Splitter : public QSplitter 0042 { 0043 public: 0044 Splitter(Qt::Orientation orientation, QWidget *parent) 0045 : QSplitter(orientation, parent) 0046 { 0047 } 0048 0049 protected: 0050 QSplitterHandle *createHandle() override 0051 { 0052 return new SplitterHandle(orientation(), this); 0053 } 0054 }; 0055 0056 } // namespace 0057 0058 #endif /* SPLITTER_H */