File indexing completed on 2024-05-05 04:40:55
0001 /* 0002 SPDX-FileCopyrightText: 2018 Amish K. Naidu <amhndu@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef EMPTYMESSAGELISTVIEW_H 0008 #define EMPTYMESSAGELISTVIEW_H 0009 0010 #include <QListView> 0011 0012 // subclass to show a message when the list is empty 0013 class EmptyMessageListView 0014 : public QListView 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 explicit EmptyMessageListView(QWidget* parent); 0020 void setEmptyMessage(const QString& message); 0021 protected: 0022 void paintEvent(QPaintEvent* event) override; 0023 private: 0024 QString m_message; 0025 }; 0026 0027 #endif // EMPTYMESSAGELISTVIEW_H