-
Notifications
You must be signed in to change notification settings - Fork 0
/
listwidget.h
40 lines (33 loc) · 1 KB
/
listwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2022-present Contributors to the jobman project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/mikaelsundell/jobman
#pragma once
#include <QListWidget>
class PairItemPrivate;
class PairItem : public QWidget {
Q_OBJECT
public:
PairItem(QWidget* parent = nullptr);
PairItem(const QString& name, const QString& value, QWidget* parent = nullptr);
virtual ~PairItem();
QString name() const;
QString value() const;
bool isChecked() const;
void setName(const QString& name);
void setValue(const QString& value);
void setChecked(bool checked);
private:
QScopedPointer<PairItemPrivate> p;
};
class ListWidgetPrivate;
class ListWidget : public QListWidget
{
Q_OBJECT
public:
ListWidget(QWidget* parent = nullptr);
virtual ~ListWidget();
protected:
void mousePressEvent(QMouseEvent *event) override;
private:
QScopedPointer<ListWidgetPrivate> p;
};