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:
Fred Gleason
2022-05-20 16:53:08 -04:00
parent 17f9c1add9
commit bf4e203742
18 changed files with 41 additions and 19 deletions

View File

@@ -23126,3 +23126,8 @@
* Added the 'xlink' namespace to all chapters of the Operations Guide. * Added the 'xlink' namespace to all chapters of the Operations Guide.
2022-05-20 Fred Gleason <fredg@paravelsystems.com> 2022-05-20 Fred Gleason <fredg@paravelsystems.com>
* Removed unresolved <xref> target from 'docs/opsguide/rdlibrary.xml'. * Removed unresolved <xref> target from 'docs/opsguide/rdlibrary.xml'.
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).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -69,7 +69,7 @@ RDAddLog::RDAddLog(QString *logname,QString *svcname,
// Service selector // Service selector
// //
add_service_box=new QComboBox(this); 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=new QLabel(tr("Service")+":",this);
label->setGeometry(10,33,100,19); label->setGeometry(10,33,100,19);
label->setFont(labelFont()); label->setFont(labelFont());
@@ -120,7 +120,8 @@ RDAddLog::RDAddLog(QString *logname,QString *svcname,
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
while(q->next()) { while(q->next()) {
add_service_box-> 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); add_name_edit->setText(*logname);
} }

View File

@@ -55,6 +55,12 @@ RDListSelector::RDListSelector(QWidget *parent)
} }
void RDListSelector::setItemIcon(const QIcon &icon)
{
list_item_icon=icon;
}
uint RDListSelector::sourceCount() const uint RDListSelector::sourceCount() const
{ {
return list_source_list->count(); return list_source_list->count();
@@ -81,7 +87,8 @@ void RDListSelector::destSetLabel(QString label)
void RDListSelector::sourceInsertItem(const QString &text,int index) 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(); list_source_list->sortItems();
CheckButtons(); CheckButtons();
} }
@@ -89,7 +96,8 @@ void RDListSelector::sourceInsertItem(const QString &text,int index)
void RDListSelector::destInsertItem(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(); list_dest_list->sortItems();
CheckButtons(); CheckButtons();
} }
@@ -206,7 +214,7 @@ void RDListSelector::addData()
if(list_source_list->currentRow()>=0) { if(list_source_list->currentRow()>=0) {
list_dest_list-> 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()); delete list_source_list->takeItem(list_source_list->currentRow());
list_dest_list->sortItems(); list_dest_list->sortItems();
if(list_source_list->count()==0) { if(list_source_list->count()==0) {
@@ -222,7 +230,7 @@ void RDListSelector::removeData()
{ {
if(list_dest_list->currentRow()>=0) { if(list_dest_list->currentRow()>=0) {
list_source_list-> 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()); delete list_dest_list->takeItem(list_dest_list->currentRow());
list_source_list->sortItems(); list_source_list->sortItems();
if(list_dest_list->count()==0) { if(list_dest_list->count()==0) {

View File

@@ -31,6 +31,7 @@ class RDListSelector : public RDWidget
Q_OBJECT Q_OBJECT
public: public:
RDListSelector(QWidget *parent=0); RDListSelector(QWidget *parent=0);
void setItemIcon(const QIcon &icon);
uint sourceCount() const; uint sourceCount() const;
uint destCount() const; uint destCount() const;
void sourceSetLabel(QString label); void sourceSetLabel(QString label);
@@ -53,7 +54,7 @@ class RDListSelector : public RDWidget
Qt::MatchFlags flags=Qt::MatchExactly); Qt::MatchFlags flags=Qt::MatchExactly);
QListWidgetItem *destFindItem(const QString &text, QListWidgetItem *destFindItem(const QString &text,
Qt::MatchFlags flags=Qt::MatchExactly); Qt::MatchFlags flags=Qt::MatchExactly);
void clear(); void clear();
private slots: private slots:
void addData(); void addData();
@@ -70,6 +71,7 @@ class RDListSelector : public RDWidget
QLabel *list_dest_label; QLabel *list_dest_label;
QPushButton *list_add_button; QPushButton *list_add_button;
QPushButton *list_remove_button; QPushButton *list_remove_button;
QIcon list_item_icon;
}; };

View File

@@ -50,7 +50,8 @@ RDLogFilter::RDLogFilter(RDLogFilter::FilterMode mode,QWidget *parent)
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
while(q->next()) { while(q->next()) {
filter_service_box-> 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; delete q;
break; break;
@@ -67,7 +68,8 @@ RDLogFilter::RDLogFilter(RDLogFilter::FilterMode mode,QWidget *parent)
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
while(q->next()) { while(q->next()) {
filter_service_box-> 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; delete q;
break; break;
@@ -169,7 +171,8 @@ void RDLogFilter::changeUser()
RDSqlQuery *q=new RDSqlQuery(sql); RDSqlQuery *q=new RDSqlQuery(sql);
while(q->next()) { while(q->next()) {
filter_service_box-> 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; delete q;
} }

View File

@@ -42,7 +42,7 @@ class RDServiceListModel : public QAbstractTableModel
{ {
Q_OBJECT Q_OBJECT
public: public:
RDServiceListModel(bool incl_none,QObject *parent=0); RDServiceListModel(bool incl_none,QObject *parent);
~RDServiceListModel(); ~RDServiceListModel();
QPalette palette(); QPalette palette();
void setPalette(const QPalette &pal); void setPalette(const QPalette &pal);

View File

@@ -34,10 +34,8 @@ EditSvcPerms::EditSvcPerms(RDSvc *svc,QWidget *parent)
// //
// Fix the Window Size // Fix the Window Size
// //
setMinimumWidth(sizeHint().width()); setMinimumSize(sizeHint());
setMaximumWidth(sizeHint().width()); setMaximumSize(sizeHint());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setWindowTitle("RDAdmin - "+tr("Service: ")+svc_svc->name()); setWindowTitle("RDAdmin - "+tr("Service: ")+svc_svc->name());
@@ -45,6 +43,7 @@ EditSvcPerms::EditSvcPerms(RDSvc *svc,QWidget *parent)
// Services Selector // Services Selector
// //
svc_host_sel=new RDListSelector(this); svc_host_sel=new RDListSelector(this);
svc_host_sel->setItemIcon(rda->iconEngine()->stationIcon());
svc_host_sel->sourceSetLabel(tr("Available Hosts")); svc_host_sel->sourceSetLabel(tr("Available Hosts"));
svc_host_sel->destSetLabel(tr("Enabled Hosts")); svc_host_sel->destSetLabel(tr("Enabled Hosts"));
svc_host_sel->setGeometry(10,10,380,130); svc_host_sel->setGeometry(10,10,380,130);

View File

@@ -491,7 +491,9 @@ int EditLog::exec(const QString &logname,QStringList *new_logs)
QString service=edit_log->service(); QString service=edit_log->service();
for ( QStringList::Iterator it = services_list.begin(); for ( QStringList::Iterator it = services_list.begin();
it != services_list.end(); ++it ) { it != services_list.end(); ++it ) {
edit_service_box->insertItem(edit_service_box->count(),*it); edit_service_box->
insertItem(edit_service_box->count(),
rda->iconEngine()->serviceIcon(),*it);
if(*it==service) { if(*it==service) {
n=ncounter; n=ncounter;
edit_service_edit->setText(*it); edit_service_edit->setText(*it);

View File

@@ -43,6 +43,7 @@ EditPerms::EditPerms(QString object_name,ObjectType type,QWidget *parent)
// Services Selector // Services Selector
// //
svc_object_sel=new RDListSelector(this); svc_object_sel=new RDListSelector(this);
svc_object_sel->setItemIcon(rda->iconEngine()->serviceIcon());
svc_object_sel->setGeometry(10,10,380,130); svc_object_sel->setGeometry(10,10,380,130);
svc_object_sel->sourceSetLabel(tr("Available Services")); svc_object_sel->sourceSetLabel(tr("Available Services"));
svc_object_sel->destSetLabel(tr("Enabled Services")); svc_object_sel->destSetLabel(tr("Enabled Services"));

View File

@@ -63,7 +63,7 @@ GenerateLog::GenerateLog(QWidget *parent,int cmd_switch,QString *cmd_service,
// //
// Service Name // Service Name
// //
gen_service_box=new RDComboBox(this); gen_service_box=new QComboBox(this);
connect(gen_service_box,SIGNAL(activated(int)), connect(gen_service_box,SIGNAL(activated(int)),
this,SLOT(serviceActivatedData(int))); this,SLOT(serviceActivatedData(int)));
gen_service_label=new QLabel(tr("Service:"),this); gen_service_label=new QLabel(tr("Service:"),this);
@@ -79,7 +79,8 @@ GenerateLog::GenerateLog(QWidget *parent,int cmd_switch,QString *cmd_service,
for ( QStringList::Iterator it = services_list.begin(); for ( QStringList::Iterator it = services_list.begin();
it != services_list.end(); it != services_list.end();
++it ) { ++it ) {
gen_service_box->insertItem(*it); gen_service_box->
insertItem(gen_service_box->count(),rda->iconEngine()->serviceIcon(),*it);
if (cmdswitch != 0 && *cmdservice == *it) if (cmdswitch != 0 && *cmdservice == *it)
cmdservicefit=true; cmdservicefit=true;
} }

View File

@@ -55,7 +55,7 @@ class GenerateLog : public RDDialog
void UpdateControls(); void UpdateControls();
void SendNotification(RDNotification::Action action,const QString &logname); void SendNotification(RDNotification::Action action,const QString &logname);
QLabel *gen_service_label; QLabel *gen_service_label;
RDComboBox *gen_service_box; QComboBox *gen_service_box;
QLabel *gen_date_label; QLabel *gen_date_label;
RDDateEdit *gen_date_edit; RDDateEdit *gen_date_edit;
QPushButton *gen_select_button; QPushButton *gen_select_button;