2021-02-15 Fred Gleason <fredg@paravelsystems.com>

* Removed the 'Q3ListBox' dependency from 'RDListSelector'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-02-15 17:57:33 -05:00
parent 6388987323
commit edbb464dee
17 changed files with 105 additions and 219 deletions

View File

@ -21153,3 +21153,5 @@
* Refactored the 'Select Group' dialog to use the model based API. * Refactored the 'Select Group' dialog to use the model based API.
2021-02-15 Fred Gleason <fredg@paravelsystems.com> 2021-02-15 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Q3RangeControl' dependency from 'RDSlider'. * Removed the 'Q3RangeControl' dependency from 'RDSlider'.
2021-02-15 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Q3ListBox' dependency from 'RDListSelector'.

View File

@ -2,7 +2,7 @@
// //
// A List Selector Widget. // A List Selector Widget.
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License // it under the terms of the GNU Library General Public License
@ -34,7 +34,8 @@ RDListSelector::RDListSelector(QWidget *parent)
list_source_label->setFont(labelFont()); list_source_label->setFont(labelFont());
list_source_label->setText(tr("Available Services")); list_source_label->setText(tr("Available Services"));
list_source_label->setAlignment(Qt::AlignCenter); list_source_label->setAlignment(Qt::AlignCenter);
list_source_box=new Q3ListBox(this); list_source_list=new QListWidget(this);
list_source_list->setSortingEnabled(true);
list_add_button=new QPushButton(this); list_add_button=new QPushButton(this);
list_add_button->setText(tr("Add >>")); list_add_button->setText(tr("Add >>"));
@ -49,19 +50,20 @@ RDListSelector::RDListSelector(QWidget *parent)
list_dest_label->setFont(labelFont()); list_dest_label->setFont(labelFont());
list_dest_label->setText(tr("Active Services")); list_dest_label->setText(tr("Active Services"));
list_dest_label->setAlignment(Qt::AlignCenter); list_dest_label->setAlignment(Qt::AlignCenter);
list_dest_box=new Q3ListBox(this); list_dest_list=new QListWidget(this);
list_dest_list->setSortingEnabled(true);
} }
uint RDListSelector::sourceCount() const uint RDListSelector::sourceCount() const
{ {
return list_source_box->count(); return list_source_list->count();
} }
uint RDListSelector::destCount() const uint RDListSelector::destCount() const
{ {
return list_dest_box->count(); return list_dest_list->count();
} }
@ -79,157 +81,155 @@ void RDListSelector::destSetLabel(QString label)
void RDListSelector::sourceInsertItem(const QString &text,int index) void RDListSelector::sourceInsertItem(const QString &text,int index)
{ {
list_source_box->insertItem(text,index); list_source_list->insertItem(index,text);
list_source_box->sort(); list_source_list->sortItems();
CheckButtons(); CheckButtons();
} }
void RDListSelector::destInsertItem(const QString &text,int index) void RDListSelector::destInsertItem(const QString &text,int index)
{ {
list_dest_box->insertItem(text,index); list_dest_list->insertItem(index,text);
list_dest_box->sort(); list_dest_list->sortItems();
CheckButtons(); CheckButtons();
} }
void RDListSelector::sourceRemoveItem(int index) void RDListSelector::sourceRemoveItem(int index)
{ {
list_source_box->removeItem(index); list_source_list->removeItemWidget(list_source_list->item(index));
CheckButtons(); CheckButtons();
} }
void RDListSelector::destRemoveItem(int index) void RDListSelector::destRemoveItem(int index)
{ {
list_dest_box->removeItem(index); list_dest_list->removeItemWidget(list_source_list->item(index));
CheckButtons(); CheckButtons();
} }
QString RDListSelector::sourceText(int index) const QString RDListSelector::sourceText(int index) const
{ {
return list_source_box->text(index); return list_source_list->item(index)->text();
} }
QString RDListSelector::destText(int index) const QString RDListSelector::destText(int index) const
{ {
return list_dest_box->text(index); return list_dest_list->item(index)->text();
} }
void RDListSelector::sourceChangeItem(const QString &text,int index) void RDListSelector::sourceChangeItem(const QString &text,int index)
{ {
list_source_box->changeItem(text,index); list_source_list->item(index)->setText(text);
list_source_box->sort(); list_source_list->sortItems();
} }
void RDListSelector::destChangeItem(const QString &text,int index) void RDListSelector::destChangeItem(const QString &text,int index)
{ {
list_dest_box->changeItem(text,index); list_dest_list->item(index)->setText(text);
list_dest_box->sort(); list_dest_list->sortItems();
}
int RDListSelector::sourceNumItemsVisible() const
{
return list_source_box->numItemsVisible();
}
int RDListSelector::destNumItemsVisible() const
{
return list_dest_box->numItemsVisible();
} }
int RDListSelector::sourceCurrentItem() const int RDListSelector::sourceCurrentItem() const
{ {
return list_source_box->currentItem(); return list_source_list->currentRow();
} }
int RDListSelector::destCurrentItem() const int RDListSelector::destCurrentItem() const
{ {
return list_dest_box->currentItem(); return list_dest_list->currentRow();
} }
QString RDListSelector::sourceCurrentText() const QString RDListSelector::sourceCurrentText() const
{ {
return list_source_box->currentText(); return list_source_list->currentItem()->text();
} }
QString RDListSelector::destCurrentText() const QString RDListSelector::destCurrentText() const
{ {
return list_dest_box->currentText(); return list_dest_list->currentItem()->text();
} }
void RDListSelector::sourceSetCurrentItem(int item) void RDListSelector::sourceSetCurrentItem(int item)
{ {
list_source_box->setCurrentItem(item); list_source_list->setCurrentRow(item);
} }
void RDListSelector::destSetCurrentItem(int item) void RDListSelector::destSetCurrentItem(int item)
{ {
list_dest_box->setCurrentItem(item); list_dest_list->setCurrentRow(item);
} }
Q3ListBoxItem *RDListSelector::sourceFindItem(const QString &text, QListWidgetItem *RDListSelector::sourceFindItem(const QString &text,
Q3ListBox::ComparisonFlags compare) const Qt::MatchFlags flag)
{ {
return list_source_box->findItem(text,compare); QList<QListWidgetItem *> items=list_source_list->findItems(text,flag);
if(items.size()==0) {
return NULL;
}
return items.first();
} }
Q3ListBoxItem *RDListSelector::destFindItem(const QString &text, QListWidgetItem *RDListSelector::destFindItem(const QString &text,
Q3ListBox::ComparisonFlags compare) const Qt::MatchFlags flag)
{ {
return list_dest_box->findItem(text,compare); QList<QListWidgetItem *> items=list_dest_list->findItems(text,flag);
if(items.size()==0) {
return NULL;
}
return items.first();
} }
void RDListSelector::clear() void RDListSelector::clear()
{ {
list_source_box->clear(); list_source_list->clear();
list_dest_box->clear(); list_dest_list->clear();
} }
void RDListSelector::addData() void RDListSelector::addData()
{ {
if(list_source_box->currentItem()>=0) { QList<QListWidgetItem *> items;
list_dest_box->
insertItem(list_source_box->currentText()); if(list_source_list->currentRow()>=0) {
list_source_box->removeItem(list_source_box->currentItem()); list_dest_list->
list_dest_box->sort(); insertItem(list_dest_list->count(),new QListWidgetItem(list_source_list->currentItem()->text()));
if(list_source_box->count()==0) { delete list_source_list->takeItem(list_source_list->currentRow());
list_dest_list->sortItems();
if(list_source_list->count()==0) {
list_add_button->setDisabled(true); list_add_button->setDisabled(true);
} }
list_remove_button->setEnabled(true); list_remove_button->setEnabled(true);
list_source_box->setCurrentItem(-1); list_source_list->setCurrentRow(-1);
} }
} }
void RDListSelector::removeData() void RDListSelector::removeData()
{ {
if(list_dest_box->currentItem()>=0) { if(list_dest_list->currentRow()>=0) {
list_source_box-> list_source_list->
insertItem(list_dest_box->currentText()); insertItem(list_source_list->count(),new QListWidgetItem(list_dest_list->currentItem()->text()));
list_dest_box->removeItem(list_dest_box->currentItem()); delete list_dest_list->takeItem(list_dest_list->currentRow());
list_source_box->sort(); list_source_list->sortItems();
if(list_dest_box->count()==0) { if(list_dest_list->count()==0) {
list_remove_button->setDisabled(true); list_remove_button->setDisabled(true);
} }
list_add_button->setEnabled(true); list_add_button->setEnabled(true);
list_dest_box->setCurrentItem(-1); list_dest_list->setCurrentRow(-1);
} }
} }
@ -240,25 +240,25 @@ void RDListSelector::resizeEvent(QResizeEvent *e)
int h=size().height(); int h=size().height();
list_source_label->setGeometry(0,0,w/3,12); list_source_label->setGeometry(0,0,w/3,12);
list_source_box->setGeometry(0,12,w/3,h-12); list_source_list->setGeometry(0,12,w/3,h-12);
list_add_button->setGeometry(w/3+20,20,w/3-40,25); list_add_button->setGeometry(w/3+20,20,w/3-40,25);
list_remove_button->setGeometry(w/3+20,2*h/3-3,w/3-40,25); list_remove_button->setGeometry(w/3+20,2*h/3-3,w/3-40,25);
list_dest_label->setGeometry(2*w/3,0,w/3,12); list_dest_label->setGeometry(2*w/3,0,w/3,12);
list_dest_box->setGeometry(2*w/3,12,w/3,h-12); list_dest_list->setGeometry(2*w/3,12,w/3,h-12);
} }
void RDListSelector::CheckButtons() void RDListSelector::CheckButtons()
{ {
if(list_source_box->count()==0) { if(list_source_list->count()==0) {
list_add_button->setDisabled(true); list_add_button->setDisabled(true);
} }
else { else {
list_add_button->setEnabled(true); list_add_button->setEnabled(true);
} }
if(list_dest_box->count()==0) { if(list_dest_list->count()==0) {
list_remove_button->setDisabled(true); list_remove_button->setDisabled(true);
} }
else { else {

View File

@ -2,7 +2,7 @@
// //
// An listselector widget with word wrap. // An listselector widget with word wrap.
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License // it under the terms of the GNU Library General Public License
@ -21,11 +21,8 @@
#ifndef RDLISTSELECTOR_H #ifndef RDLISTSELECTOR_H
#define RDLISTSELECTOR_H #define RDLISTSELECTOR_H
#include <q3listbox.h> #include <QPushButton>
#include <QListWidget>
#include <qlabel.h>
#include <qcolor.h>
#include <qpushbutton.h>
#include <rdwidget.h> #include <rdwidget.h>
@ -46,18 +43,16 @@ class RDListSelector : public RDWidget
QString destText(int index) const; QString destText(int index) const;
void sourceChangeItem(const QString &text,int index); void sourceChangeItem(const QString &text,int index);
void destChangeItem(const QString &text,int index); void destChangeItem(const QString &text,int index);
int sourceNumItemsVisible() const;
int destNumItemsVisible() const;
int sourceCurrentItem() const; int sourceCurrentItem() const;
int destCurrentItem() const; int destCurrentItem() const;
QString sourceCurrentText() const; QString sourceCurrentText() const;
QString destCurrentText() const; QString destCurrentText() const;
void sourceSetCurrentItem(int item); void sourceSetCurrentItem(int item);
void destSetCurrentItem(int item); void destSetCurrentItem(int item);
Q3ListBoxItem *sourceFindItem(const QString &text, QListWidgetItem *sourceFindItem(const QString &text,
Q3ListBox::ComparisonFlags compare=Q3ListBox::ExactMatch) const; Qt::MatchFlags flags=Qt::MatchExactly);
Q3ListBoxItem *destFindItem(const QString &text, QListWidgetItem *destFindItem(const QString &text,
Q3ListBox::ComparisonFlags compare=Q3ListBox::ExactMatch) const; Qt::MatchFlags flags=Qt::MatchExactly);
void clear(); void clear();
private slots: private slots:
@ -69,9 +64,9 @@ class RDListSelector : public RDWidget
private: private:
void CheckButtons(); void CheckButtons();
Q3ListBox *list_source_box; QListWidget *list_source_list;
QLabel *list_source_label; QLabel *list_source_label;
Q3ListBox *list_dest_box; QListWidget *list_dest_list;
QLabel *list_dest_label; QLabel *list_dest_label;
QPushButton *list_add_button; QPushButton *list_add_button;
QPushButton *list_remove_button; QPushButton *list_remove_button;

View File

@ -2,7 +2,7 @@
// //
// Service Picker dialog // Service Picker dialog
// //
// (C) Copyright 2012,2016 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2012-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell Group // Add a Rivendell Group
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,17 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <qdialog.h> #include <QMessageBox>
#include <qstring.h>
#include <qpushbutton.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <q3buttongroup.h>
#include <rddb.h> #include <rddb.h>
#include <rdescape_string.h> #include <rdescape_string.h>

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell Report // Add a Rivendell Report
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,16 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <qstring.h> #include <QMessageBox>
#include <qpushbutton.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <q3buttongroup.h>
#include <rd.h> #include <rd.h>
#include <rddb.h> #include <rddb.h>

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell Workstation // Add a Rivendell Workstation
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,16 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <qstring.h> #include <QMessageBox>
#include <qpushbutton.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <q3buttongroup.h>
#include <rddb.h> #include <rddb.h>
#include <rdairplay_conf.h> #include <rdairplay_conf.h>

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell Workstation // Add a Rivendell Workstation
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -21,12 +21,7 @@
#ifndef ADD_STATION_H #ifndef ADD_STATION_H
#define ADD_STATION_H #define ADD_STATION_H
#include <q3listbox.h> #include <QComboBox>
#include <q3textedit.h>
#include <qpixmap.h>
#include <qcombobox.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <rddialog.h> #include <rddialog.h>
#include <rdstation.h> #include <rdstation.h>

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell Service // Add a Rivendell Service
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,16 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <qstring.h> #include <QMessageBox>
#include <qpushbutton.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <q3buttongroup.h>
#include <rdapplication.h> #include <rdapplication.h>
#include <rddb.h> #include <rddb.h>

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell Service // Add a Rivendell Service
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -21,12 +21,7 @@
#ifndef ADD_SVC_H #ifndef ADD_SVC_H
#define ADD_SVC_H #define ADD_SVC_H
#include <q3listbox.h> #include <QComboBox>
#include <q3textedit.h>
#include <qpixmap.h>
#include <qcombobox.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <rddialog.h> #include <rddialog.h>
#include <rdsvc.h> #include <rdsvc.h>

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell User // Add a Rivendell User
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,18 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <math.h> #include <QMessageBox>
#include <qstring.h>
#include <qpushbutton.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <q3buttongroup.h>
#include <rddb.h> #include <rddb.h>
#include <edit_user.h> #include <edit_user.h>

View File

@ -2,7 +2,7 @@
// //
// Add a Rivendell User // Add a Rivendell User
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -21,12 +21,7 @@
#ifndef ADD_USER_H #ifndef ADD_USER_H
#define ADD_USER_H #define ADD_USER_H
#include <q3listbox.h> #include <QLineEdit>
#include <q3textedit.h>
#include <qpixmap.h>
#include <qcheckbox.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <rddialog.h> #include <rddialog.h>
#include <rduser.h> #include <rduser.h>

View File

@ -2,7 +2,7 @@
// //
// Edit a Rivendell Dropbox Configuration // Edit a Rivendell Dropbox Configuration
// //
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,21 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <math.h> #include <QFileDialog>
#include <QMessageBox>
#include <q3buttongroup.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qcheckbox.h>
#include <qcolordialog.h>
#include <qevent.h>
#include <qfiledialog.h>
#include <qmessagebox.h>
#include <qpainter.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qvalidator.h>
#include <rdapplication.h> #include <rdapplication.h>
#include <rdcart_dialog.h> #include <rdcart_dialog.h>

View File

@ -2,7 +2,7 @@
// //
// Edit a Rivendell Dropbox Configuration // Edit a Rivendell Dropbox Configuration
// //
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -21,18 +21,9 @@
#ifndef EDIT_DROPBOX_H #ifndef EDIT_DROPBOX_H
#define EDIT_DROPBOX_H #define EDIT_DROPBOX_H
#include <q3listbox.h> #include <QCheckBox>
#include <q3textedit.h> #include <QComboBox>
#include <qpixmap.h> #include <QSpinBox>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qsqldatabase.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qstringlist.h>
#include <rddialog.h> #include <rddialog.h>
#include <rddropbox.h> #include <rddropbox.h>

View File

@ -2,7 +2,7 @@
// //
// Edit Rivendell RSS Feed Permissions // Edit Rivendell RSS Feed Permissions
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,17 +18,6 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <qstring.h>
#include <qpushbutton.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <q3buttongroup.h>
#include <rddb.h> #include <rddb.h>
#include <rdescape_string.h> #include <rdescape_string.h>
#include <rdpasswd.h> #include <rdpasswd.h>
@ -99,7 +88,7 @@ EditFeedPerms::EditFeedPerms(RDUser *user,QWidget *parent)
sql=QString().sprintf("select KEY_NAME from FEEDS"); sql=QString().sprintf("select KEY_NAME from FEEDS");
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);
while(q->next()) { while(q->next()) {
if(feed_host_sel->destFindItem(q->value(0).toString(),Q3ListBox::ExactMatch)==0) { if(feed_host_sel->destFindItem(q->value(0).toString())==0) {
feed_host_sel->sourceInsertItem(q->value(0).toString()); feed_host_sel->sourceInsertItem(q->value(0).toString());
} }
} }

View File

@ -2,7 +2,7 @@
// //
// Edit a Rivendell Group // Edit a Rivendell Group
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -18,18 +18,8 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
#include <math.h> #include <QColorDialog>
#include <QMessageBox>
#include <qstring.h>
#include <qpushbutton.h>
#include <q3listbox.h>
#include <q3textedit.h>
#include <qpainter.h>
#include <qevent.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <q3buttongroup.h>
#include <qcolordialog.h>
#include <rddb.h> #include <rddb.h>
#include <rdescape_string.h> #include <rdescape_string.h>

View File

@ -2,7 +2,7 @@
// //
// Edit a Rivendell Group // Edit a Rivendell Group
// //
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as // it under the terms of the GNU General Public License version 2 as
@ -21,15 +21,9 @@
#ifndef EDIT_GROUP_H #ifndef EDIT_GROUP_H
#define EDIT_GROUP_H #define EDIT_GROUP_H
#include <q3listbox.h> #include <QCheckBox>
#include <q3textedit.h> #include <QComboBox>
#include <qpixmap.h> #include <QSpinBox>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <rddialog.h> #include <rddialog.h>
#include <rdgroup.h> #include <rdgroup.h>