Rivendellaudio/rdadmin/list_images.h
Fred Gleason 2e9f8b7608 2020-05-17 Fred Gleason <fredg@paravelsystems.com>
* Added a 'FEEDS.CHANNEL_IMAGE_ID' field to the database.
	* Added a 'FEEDS.DEFAULT_ITEM_IMAGE_ID' field to the database.
	* Added a 'PODCASTS.ITEM_IMAGE_ID' field to the database.
	* Incremented the database version to 324.
	* Added an 'Image Manager' dialog to rdadmin(1).
	* Added an 'Image Viewer' dialog on rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
2020-05-17 10:36:04 -04:00

77 lines
2.0 KiB
C++

// list_images.h
//
// Manage a collection of pixmap images
//
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
//
// 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
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef LIST_IMAGES_H
#define LIST_IMAGES_H
#include <qlistview.h>
#include <qpushbutton.h>
#include <rddelete.h>
#include <rddialog.h>
#include <rdfeed.h>
#include <rdimagepickermodel.h>
#include "edit_image.h"
class ListImages : public RDDialog
{
Q_OBJECT
public:
ListImages(RDImagePickerModel *model,QWidget *parent=0);
~ListImages();
QSize sizeHint() const;
public slots:
int exec(RDFeed *feed);
private slots:
void addData();
void viewData();
void deleteData();
void clickedData(const QModelIndex &index);
void doubleClickedData(const QModelIndex &index);
void closeData();
protected:
void closeEvent(QCloseEvent *e);
void resizeEvent(QResizeEvent *e);
private:
int SelectedRow() const;
bool UploadRemoteImage(const QString &filename,const QString &url,
const QString &username,const QString &password,
QString *err_msg);
bool DeleteRemoteImage(const QString &url,const QString &username,
const QString &password,QString *err_msg);
EditImage *list_edit_image_dialog;
QListView *list_view;
RDImagePickerModel *list_model;
RDFeed *list_feed;
QPushButton *list_add_button;
QPushButton *list_view_button;
QPushButton *list_delete_button;
QPushButton *list_close_button;
QString list_file_dir;
};
#endif // LIST_IMAGES_H