Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_categorized_list_view.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2011 Silvio Heinrich <plassy@web.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KIS_CATEGORIZED_LIST_VIEW_H_
8#define KIS_CATEGORIZED_LIST_VIEW_H_
9
10#include <kritaui_export.h>
11#include <QListView>
12#include <QListWidget>
13#include <QScroller>
14
15class KRITAUI_EXPORT KisCategorizedListView: public QListView
16{
17 Q_OBJECT
18public:
19 KisCategorizedListView(QWidget* parent=0);
20 ~KisCategorizedListView() override;
21 void setModel(QAbstractItemModel* model) override;
22
23 QSize sizeHint() const override;
24 void setCompositeBoxControl(bool value);
25
26Q_SIGNALS:
27 void sigCategoryToggled(const QModelIndex& index, bool toggled);
28 void sigEntryChecked(const QModelIndex& index);
31 void lockAreaTriggered(const QModelIndex& index);
32
33protected Q_SLOTS:
34 void slotIndexChanged(const QModelIndex& index);
35 void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int> &roles = QVector<int>()) override;
36 void rowsInserted(const QModelIndex& parent, int start, int end) override;
37 void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) override;
38 void mousePressEvent(QMouseEvent* event) override;
39 void mouseReleaseEvent(QMouseEvent* event) override;
40 void slotScrollerStateChange(QScroller::State state);
41
42private:
43 void updateRows(int begin, int end);
44 bool isCompositeBoxControl = false;
45};
46
47#endif // KIS_CATEGORIZED_LIST_VIEW_H_
float value(const T *src, size_t ch)
void lockAreaTriggered(const QModelIndex &index)
void sigEntryChecked(const QModelIndex &index)
void sigCategoryToggled(const QModelIndex &index, bool toggled)
void rightClickedMenuSaveSettingsTriggered()
void rightClickedMenuDropSettingsTriggered()