KNotifyConfig

knotifyeventlist.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2005 Olivier Goffart <ogoffart at kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-only
6*/
7
8#ifndef KNOTIFYEVENTLIST_H
9#define KNOTIFYEVENTLIST_H
10
11#include "knotifyconfigelement.h"
12
13#include <QTreeWidget>
14
16class KNotifyEventListItem;
17class KConfig;
18
19/**
20 @author Olivier Goffart <ogoffart at kde.org>
21*/
23{
25public:
27 ~KNotifyEventList() override;
28 void fill(const QString &appname, bool loadDefaults = false);
29 void save();
30 void updateCurrentItem();
31 void updateAllItems();
32 QSize sizeHint() const override;
33
34 void selectEvent(const QString &eventId);
35 bool disableAllSounds();
36
37private:
38 KConfig *config;
40
41 class KNotifyEventListDelegate;
42
43private Q_SLOTS:
44 void slotSelectionChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
45
47 void eventSelected(KNotifyConfigElement *);
48};
49
50class KNotifyEventListItem : public QTreeWidgetItem
51{
52public:
53 KNotifyEventListItem(QTreeWidget *parent, const QString &eventName, const QString &name, const QString &description, KConfig *confir);
54 ~KNotifyEventListItem() override;
55 void save();
56
57 KNotifyConfigElement *configElement()
58 {
59 return &m_config;
60 }
61
62 void update();
63
64private:
65 KNotifyConfigElement m_config;
66};
67
68#endif
Represent the config for an event.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
QTreeWidgetItem * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.