File indexing completed on 2024-05-12 04:20:44
0001 /* 0002 * SPDX-FileCopyrightText: 2020 Dag Andersen <danders@get2net.dk> 0003 * 0004 * This file is part of the KGantt library. 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KGANTTPENSTYLECOMBOBOX_H 0010 #define KGANTTPENSTYLECOMBOBOX_H 0011 0012 #include <QComboBox> 0013 0014 #include "kgantt_export.h" 0015 0016 QT_BEGIN_NAMESPACE 0017 class QPaintEvent; 0018 QT_END_NAMESPACE 0019 0020 namespace KGantt { 0021 0022 class KGANTT_EXPORT PenStyleComboBox : public QComboBox 0023 { 0024 Q_OBJECT 0025 public: 0026 explicit PenStyleComboBox(QWidget *parent = nullptr); 0027 0028 void setCurrentStyle(Qt::PenStyle style); 0029 Qt::PenStyle currentStyle() const; 0030 0031 protected: 0032 void paintEvent(QPaintEvent *pe) override; 0033 }; 0034 } 0035 0036 #endif