File indexing completed on 2024-05-12 05:14:38
0001 /* 0002 * alarmlistview.h - widget showing list of alarms 0003 * Program: kalarm 0004 * SPDX-FileCopyrightText: 2007-2023 David Jarvie <djarvie@kde.org> 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include "eventlistview.h" 0012 0013 #include <QByteArray> 0014 0015 0016 class AlarmListView : public EventListView 0017 { 0018 Q_OBJECT 0019 public: 0020 explicit AlarmListView(const QString& configGroup, QWidget* parent = nullptr); 0021 0022 /** Return which of the optional columns are currently shown. */ 0023 QList<bool> columnsVisible() const; 0024 0025 void setColumnsVisible(const QList<bool>& show); 0026 0027 Q_SIGNALS: 0028 void columnsVisibleChanged(); 0029 0030 protected Q_SLOTS: 0031 void initSections() override; 0032 0033 private Q_SLOTS: 0034 void saveColumnsState(); 0035 void headerContextMenuRequested(const QPoint&); 0036 void useAlarmNameChanged(bool); 0037 0038 private: 0039 void showHideColumn(QMenu&, QAction*); 0040 void setReplaceBlankName(); 0041 void enableTimeColumns(QMenu*); 0042 0043 QString mConfigGroup; 0044 }; 0045 0046 // vim: et sw=4: