mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2022-05-20 Fred Gleason <fredg@paravelsystems.com>
* Added icons to the 'Service' dropdowns in rdlogedit(1), rdairplay(1) and rdlogmanager(1). * Added icons to the host picker in the 'Service' dialog in rdadmin(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -69,7 +69,7 @@ RDAddLog::RDAddLog(QString *logname,QString *svcname,
|
||||
// Service selector
|
||||
//
|
||||
add_service_box=new QComboBox(this);
|
||||
add_service_box->setGeometry(115,33,100,19);
|
||||
add_service_box->setGeometry(115,33,150,19);
|
||||
label=new QLabel(tr("Service")+":",this);
|
||||
label->setGeometry(10,33,100,19);
|
||||
label->setFont(labelFont());
|
||||
@@ -120,7 +120,8 @@ RDAddLog::RDAddLog(QString *logname,QString *svcname,
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
add_service_box->
|
||||
insertItem(add_service_box->count(),q->value(0).toString());
|
||||
insertItem(add_service_box->count(),rda->iconEngine()->serviceIcon(),
|
||||
q->value(0).toString());
|
||||
}
|
||||
add_name_edit->setText(*logname);
|
||||
}
|
||||
|
@@ -55,6 +55,12 @@ RDListSelector::RDListSelector(QWidget *parent)
|
||||
}
|
||||
|
||||
|
||||
void RDListSelector::setItemIcon(const QIcon &icon)
|
||||
{
|
||||
list_item_icon=icon;
|
||||
}
|
||||
|
||||
|
||||
uint RDListSelector::sourceCount() const
|
||||
{
|
||||
return list_source_list->count();
|
||||
@@ -81,7 +87,8 @@ void RDListSelector::destSetLabel(QString label)
|
||||
|
||||
void RDListSelector::sourceInsertItem(const QString &text,int index)
|
||||
{
|
||||
list_source_list->insertItem(index,text);
|
||||
// list_source_list->insertItem(index,text);
|
||||
list_source_list->insertItem(index,new QListWidgetItem(list_item_icon,text));
|
||||
list_source_list->sortItems();
|
||||
CheckButtons();
|
||||
}
|
||||
@@ -89,7 +96,8 @@ void RDListSelector::sourceInsertItem(const QString &text,int index)
|
||||
|
||||
void RDListSelector::destInsertItem(const QString &text,int index)
|
||||
{
|
||||
list_dest_list->insertItem(index,text);
|
||||
// list_dest_list->insertItem(index,text);
|
||||
list_dest_list->insertItem(index,new QListWidgetItem(list_item_icon,text));
|
||||
list_dest_list->sortItems();
|
||||
CheckButtons();
|
||||
}
|
||||
@@ -206,7 +214,7 @@ void RDListSelector::addData()
|
||||
|
||||
if(list_source_list->currentRow()>=0) {
|
||||
list_dest_list->
|
||||
insertItem(list_dest_list->count(),new QListWidgetItem(list_source_list->currentItem()->text()));
|
||||
insertItem(list_dest_list->count(),new QListWidgetItem(list_item_icon,list_source_list->currentItem()->text()));
|
||||
delete list_source_list->takeItem(list_source_list->currentRow());
|
||||
list_dest_list->sortItems();
|
||||
if(list_source_list->count()==0) {
|
||||
@@ -222,7 +230,7 @@ void RDListSelector::removeData()
|
||||
{
|
||||
if(list_dest_list->currentRow()>=0) {
|
||||
list_source_list->
|
||||
insertItem(list_source_list->count(),new QListWidgetItem(list_dest_list->currentItem()->text()));
|
||||
insertItem(list_source_list->count(),new QListWidgetItem(list_item_icon,list_dest_list->currentItem()->text()));
|
||||
delete list_dest_list->takeItem(list_dest_list->currentRow());
|
||||
list_source_list->sortItems();
|
||||
if(list_dest_list->count()==0) {
|
||||
|
@@ -31,6 +31,7 @@ class RDListSelector : public RDWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
RDListSelector(QWidget *parent=0);
|
||||
void setItemIcon(const QIcon &icon);
|
||||
uint sourceCount() const;
|
||||
uint destCount() const;
|
||||
void sourceSetLabel(QString label);
|
||||
@@ -53,7 +54,7 @@ class RDListSelector : public RDWidget
|
||||
Qt::MatchFlags flags=Qt::MatchExactly);
|
||||
QListWidgetItem *destFindItem(const QString &text,
|
||||
Qt::MatchFlags flags=Qt::MatchExactly);
|
||||
void clear();
|
||||
void clear();
|
||||
|
||||
private slots:
|
||||
void addData();
|
||||
@@ -70,6 +71,7 @@ class RDListSelector : public RDWidget
|
||||
QLabel *list_dest_label;
|
||||
QPushButton *list_add_button;
|
||||
QPushButton *list_remove_button;
|
||||
QIcon list_item_icon;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -50,7 +50,8 @@ RDLogFilter::RDLogFilter(RDLogFilter::FilterMode mode,QWidget *parent)
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
filter_service_box->
|
||||
insertItem(filter_service_box->count(),q->value(0).toString());
|
||||
insertItem(filter_service_box->count(),rda->iconEngine()->serviceIcon(),
|
||||
q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
break;
|
||||
@@ -67,7 +68,8 @@ RDLogFilter::RDLogFilter(RDLogFilter::FilterMode mode,QWidget *parent)
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
filter_service_box->
|
||||
insertItem(filter_service_box->count(),q->value(0).toString());
|
||||
insertItem(filter_service_box->count(),rda->iconEngine()->serviceIcon(),
|
||||
q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
break;
|
||||
@@ -169,7 +171,8 @@ void RDLogFilter::changeUser()
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
filter_service_box->
|
||||
insertItem(filter_service_box->count(),q->value(0).toString());
|
||||
insertItem(filter_service_box->count(),rda->iconEngine()->serviceIcon(),
|
||||
q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class RDServiceListModel : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RDServiceListModel(bool incl_none,QObject *parent=0);
|
||||
RDServiceListModel(bool incl_none,QObject *parent);
|
||||
~RDServiceListModel();
|
||||
QPalette palette();
|
||||
void setPalette(const QPalette &pal);
|
||||
|
Reference in New Issue
Block a user