mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-16 08:34:12 +02:00
2020-05-21 Fred Gleason <fredg@paravelsystems.com>
* Added a 'URL' field to the 'View Image' dialog in rdadmin(1).
This commit is contained in:
parent
69e253649e
commit
1da0084d69
@ -19993,3 +19993,5 @@
|
|||||||
* Disabled the 'Post from Cart/Cut', 'Post from File', 'Edit' and
|
* Disabled the 'Post from Cart/Cut', 'Post from File', 'Edit' and
|
||||||
'Delete' buttons when showing a superfeed in the 'Podcast List'
|
'Delete' buttons when showing a superfeed in the 'Podcast List'
|
||||||
dialog of rdcastmanager(1).
|
dialog of rdcastmanager(1).
|
||||||
|
2020-05-21 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Added a 'URL' field to the 'View Image' dialog in rdadmin(1).
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <rddb.h>
|
#include <rddb.h>
|
||||||
|
#include <rdfeed.h>
|
||||||
#include <rdescape_string.h>
|
#include <rdescape_string.h>
|
||||||
|
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
@ -41,6 +42,12 @@ EditImage::EditImage(QWidget *parent)
|
|||||||
c_description_edit=new QLineEdit(this);
|
c_description_edit=new QLineEdit(this);
|
||||||
c_description_edit->setMaxLength(191);
|
c_description_edit->setMaxLength(191);
|
||||||
|
|
||||||
|
c_url_label=new QLabel(tr("URL")+":",this);
|
||||||
|
c_url_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
|
c_url_label->setFont(labelFont());
|
||||||
|
c_url_edit=new QLineEdit(this);
|
||||||
|
c_url_edit->setReadOnly(true);
|
||||||
|
|
||||||
c_size_label=new QLabel(tr("Native Size")+":",this);
|
c_size_label=new QLabel(tr("Native Size")+":",this);
|
||||||
c_size_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
c_size_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
c_size_label->setFont(labelFont());
|
c_size_label->setFont(labelFont());
|
||||||
@ -70,6 +77,12 @@ EditImage::~EditImage()
|
|||||||
delete c_image_label;
|
delete c_image_label;
|
||||||
delete c_description_label;
|
delete c_description_label;
|
||||||
delete c_description_edit;
|
delete c_description_edit;
|
||||||
|
delete c_url_label;
|
||||||
|
delete c_url_edit;
|
||||||
|
delete c_size_label;
|
||||||
|
delete c_size_value_label;
|
||||||
|
delete c_extension_label;
|
||||||
|
delete c_extension_value_label;
|
||||||
delete c_ok_button;
|
delete c_ok_button;
|
||||||
delete c_cancel_button;
|
delete c_cancel_button;
|
||||||
}
|
}
|
||||||
@ -77,7 +90,7 @@ EditImage::~EditImage()
|
|||||||
|
|
||||||
QSize EditImage::sizeHint() const
|
QSize EditImage::sizeHint() const
|
||||||
{
|
{
|
||||||
return QSize(600,700);
|
return QSize(600,722);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -89,17 +102,23 @@ int EditImage::exec(int img_id)
|
|||||||
c_image_id=img_id;
|
c_image_id=img_id;
|
||||||
|
|
||||||
sql=QString("select ")+
|
sql=QString("select ")+
|
||||||
"DESCRIPTION,"+ // 00
|
"FEED_IMAGES.DESCRIPTION,"+ // 00
|
||||||
"FILE_EXTENSION,"+ // 01
|
"FEED_IMAGES.FILE_EXTENSION,"+ // 01
|
||||||
"WIDTH,"+ // 02
|
"FEED_IMAGES.WIDTH,"+ // 02
|
||||||
"HEIGHT,"+ // 03
|
"FEED_IMAGES.HEIGHT,"+ // 03
|
||||||
"DEPTH,"+ // 04
|
"FEED_IMAGES.DEPTH,"+ // 04
|
||||||
"DATA "+ // 05
|
"FEED_IMAGES.DATA,"+ // 05
|
||||||
"from FEED_IMAGES where "+
|
"FEED_IMAGES.FEED_ID,"+ // 06
|
||||||
QString().sprintf("ID=%d",img_id);
|
"FEEDS.BASE_URL "+ // 07
|
||||||
|
"from FEED_IMAGES left join FEEDS "+
|
||||||
|
"on FEED_IMAGES.FEED_ID=FEEDS.ID where "+
|
||||||
|
QString().sprintf("FEED_IMAGES.ID=%d",img_id);
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(q->first()) {
|
if(q->first()) {
|
||||||
c_description_edit->setText(q->value(0).toString());
|
c_description_edit->setText(q->value(0).toString());
|
||||||
|
c_url_edit->setText(q->value(7).toString()+"/"+
|
||||||
|
RDFeed::imageFilename(q->value(6).toInt(),img_id,
|
||||||
|
q->value(1).toString()));
|
||||||
c_extension_value_label->setText(q->value(1).toString().toUpper());
|
c_extension_value_label->setText(q->value(1).toString().toUpper());
|
||||||
c_size_value_label->
|
c_size_value_label->
|
||||||
setText(QString().sprintf("%dx%d",q->value(2).toInt(),
|
setText(QString().sprintf("%dx%d",q->value(2).toInt(),
|
||||||
@ -154,8 +173,11 @@ void EditImage::resizeEvent(QResizeEvent *e)
|
|||||||
c_image_label->setPixmap(QPixmap::fromImage(c_image.
|
c_image_label->setPixmap(QPixmap::fromImage(c_image.
|
||||||
scaled(c_image_label->size(),Qt::KeepAspectRatio)));
|
scaled(c_image_label->size(),Qt::KeepAspectRatio)));
|
||||||
|
|
||||||
c_description_label->setGeometry(10,h-87,120,20);
|
c_description_label->setGeometry(10,h-109,120,20);
|
||||||
c_description_edit->setGeometry(135,h-87,w-145,20);
|
c_description_edit->setGeometry(135,h-109,w-145,20);
|
||||||
|
|
||||||
|
c_url_label->setGeometry(10,h-87,120,20);
|
||||||
|
c_url_edit->setGeometry(135,h-87,w-145,20);
|
||||||
|
|
||||||
c_size_label->
|
c_size_label->
|
||||||
setGeometry(140,h-65,80,20);
|
setGeometry(140,h-65,80,20);
|
||||||
|
@ -56,6 +56,8 @@ class EditImage : public RDDialog
|
|||||||
QLabel *c_image_label;
|
QLabel *c_image_label;
|
||||||
QLabel *c_description_label;
|
QLabel *c_description_label;
|
||||||
QLineEdit *c_description_edit;
|
QLineEdit *c_description_edit;
|
||||||
|
QLabel *c_url_label;
|
||||||
|
QLineEdit *c_url_edit;
|
||||||
QLabel *c_size_label;
|
QLabel *c_size_label;
|
||||||
QLabel *c_size_value_label;
|
QLabel *c_size_value_label;
|
||||||
QLabel *c_extension_label;
|
QLabel *c_extension_label;
|
||||||
|
@ -2009,6 +2009,10 @@ Stále ještě chcete uložit?</translation>
|
|||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>URL</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditJack</name>
|
<name>EditJack</name>
|
||||||
|
@ -1887,6 +1887,10 @@ Do you still want to save?</source>
|
|||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>URL</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditJack</name>
|
<name>EditJack</name>
|
||||||
|
@ -2011,6 +2011,10 @@ Do you still want to save?</source>
|
|||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>URL</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditJack</name>
|
<name>EditJack</name>
|
||||||
|
@ -1557,6 +1557,10 @@ Do you still want to save?</source>
|
|||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>URL</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditJack</name>
|
<name>EditJack</name>
|
||||||
|
@ -1854,6 +1854,10 @@ Vil du framleis lagra?</translation>
|
|||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>URL</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditJack</name>
|
<name>EditJack</name>
|
||||||
|
@ -1854,6 +1854,10 @@ Vil du framleis lagra?</translation>
|
|||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>URL</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditJack</name>
|
<name>EditJack</name>
|
||||||
|
@ -1860,6 +1860,10 @@ Você ainda quer salvar?</translation>
|
|||||||
<source>Type</source>
|
<source>Type</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>URL</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>EditJack</name>
|
<name>EditJack</name>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user