File indexing completed on 2024-05-12 16:02:09
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2011 Thorsten Zachmann <zachmann@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KOMARKERSELECTOR_H 0008 #define KOMARKERSELECTOR_H 0009 0010 #include "kritawidgets_export.h" 0011 0012 #include <KoFlake.h> 0013 #include <QComboBox> 0014 0015 class KoMarker; 0016 0017 0018 class KRITAWIDGETS_EXPORT KoMarkerSelector : public QComboBox 0019 { 0020 Q_OBJECT 0021 public: 0022 explicit KoMarkerSelector(KoFlake::MarkerPosition position, QWidget *parent = 0); 0023 ~KoMarkerSelector() override; 0024 0025 // set the current marker style 0026 void setMarker(KoMarker *marker); 0027 // return the current marker style 0028 KoMarker *marker() const; 0029 0030 /// reimplement 0031 QVariant itemData(int index, int role = Qt::UserRole) const; 0032 0033 /** 0034 * Set the available markers in the document. 0035 */ 0036 void updateMarkers(const QList<KoMarker*> markers); 0037 0038 protected: 0039 void paintEvent(QPaintEvent *pe) override; 0040 0041 private: 0042 class Private; 0043 Private * const d; 0044 }; 0045 0046 #endif /* KOMARKERSELECTOR_H */