Files
raDIYo/swlistcontrol.h
2025-08-05 22:36:00 +02:00

66 lines
1.4 KiB
C++

/***************************************************************************
source::worx raDIYo
Copyright © 2020-2022 c.holzheuer
chris@sourceworx.org
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
***************************************************************************/
#ifndef SWLISTCONTROL_H
#define SWLISTCONTROL_H
#include <QListWidget>
#include <swbasecontrol.h>
#include <swurl.h>
#include <ui_swlistcontrol.h>
#include <raDIYoglobals.h>
/**
* @brief ein Control zu Anzeige von Listen wie der PlayList und der SenderList.
* @see SWSongs
* @see SWSender
*/
class SWListControl : public SWBaseControl, protected Ui_SWListControl
{
Q_OBJECT
public:
explicit SWListControl( QWidget* parent, QSettings* settings );
virtual ~SWListControl();
signals:
void entryActivated( SWUrl item );
public slots:
virtual void onItemActivated( QListWidgetItem* item );
void onDialPushed() override;
void onDialDeltaChanged( int delta ) override;
virtual QListWidgetItem& createItem( const QString& title, const QString& body );
protected:
static const int SWListControlRole = Qt::UserRole+1;
int _checkedID = 0;
};
#endif // SWLISTCONTROL_H