mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-02 08:59:33 +02:00
2016-06-07 Fred Gleason <fredg@paravelsystems.com>
* Made the 'Test Import' dialog resizeable in 'rdadmin/test_import.cpp' and 'rdadmin/test_import.h'.
This commit is contained in:
parent
adba9b1718
commit
5342d41f8d
@ -15206,3 +15206,6 @@
|
|||||||
2016-06-07 Fred Gleason <fredg@paravelsystems.com>
|
2016-06-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Refactored 'rdlogmanager/generate_log.cpp' and
|
* Refactored 'rdlogmanager/generate_log.cpp' and
|
||||||
'rdlogmanager/generate_log.h' to use 'QWidget::resizeEvent()'.
|
'rdlogmanager/generate_log.h' to use 'QWidget::resizeEvent()'.
|
||||||
|
2016-06-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Made the 'Test Import' dialog resizeable in
|
||||||
|
'rdadmin/test_import.cpp' and 'rdadmin/test_import.h'.
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <qpushbutton.h>
|
#include <qpushbutton.h>
|
||||||
#include <qlabel.h>
|
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
|
|
||||||
@ -46,9 +45,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
|||||||
// Fix the Window Size
|
// Fix the Window Size
|
||||||
//
|
//
|
||||||
setMinimumWidth(sizeHint().width());
|
setMinimumWidth(sizeHint().width());
|
||||||
setMaximumWidth(sizeHint().width());
|
|
||||||
setMinimumHeight(sizeHint().height());
|
setMinimumHeight(sizeHint().height());
|
||||||
setMaximumHeight(sizeHint().height());
|
|
||||||
|
|
||||||
switch(test_src) {
|
switch(test_src) {
|
||||||
case RDSvc::Traffic:
|
case RDSvc::Traffic:
|
||||||
@ -71,12 +68,10 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
|||||||
//
|
//
|
||||||
// Date Selector
|
// Date Selector
|
||||||
//
|
//
|
||||||
test_date_edit=new QDateEdit(this,"test_date_edit");
|
test_date_edit=new QDateEdit(this);
|
||||||
test_date_edit->setGeometry(95,10,95,20);
|
test_date_label=new QLabel(test_date_edit,tr("Test Date:"),this);
|
||||||
QLabel *label=new QLabel(test_date_edit,tr("Test Date:"),this,"test_date_label");
|
test_date_label->setFont(font);
|
||||||
label->setGeometry(5,10,85,20);
|
test_date_label->setAlignment(AlignVCenter|AlignRight);
|
||||||
label->setFont(font);
|
|
||||||
label->setAlignment(AlignVCenter|AlignRight);
|
|
||||||
test_date_edit->setDate(current_date);
|
test_date_edit->setDate(current_date);
|
||||||
connect(test_date_edit,SIGNAL(valueChanged(const QDate &)),
|
connect(test_date_edit,SIGNAL(valueChanged(const QDate &)),
|
||||||
this,SLOT(dateChangedData(const QDate &)));
|
this,SLOT(dateChangedData(const QDate &)));
|
||||||
@ -84,7 +79,7 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
|||||||
//
|
//
|
||||||
// Select Date Button
|
// Select Date Button
|
||||||
//
|
//
|
||||||
QPushButton *button=new QPushButton(this,"select_date_button");
|
QPushButton *button=new QPushButton(this);
|
||||||
button->setGeometry(200,5,60,30);
|
button->setGeometry(200,5,60,30);
|
||||||
button->setFont(font);
|
button->setFont(font);
|
||||||
button->setText(tr("&Select"));
|
button->setText(tr("&Select"));
|
||||||
@ -93,28 +88,25 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
|||||||
//
|
//
|
||||||
// Import Button
|
// Import Button
|
||||||
//
|
//
|
||||||
button=new QPushButton(this,"import_button");
|
test_import_button=new QPushButton(this);
|
||||||
button->setGeometry(30,45,sizeHint().width()-60,50);
|
test_import_button->setFont(font);
|
||||||
button->setFont(font);
|
test_import_button->setText(tr("&Import"));
|
||||||
button->setText(tr("&Import"));
|
connect(test_import_button,SIGNAL(clicked()),this,SLOT(importData()));
|
||||||
connect(button,SIGNAL(clicked()),this,SLOT(importData()));
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Import Filename
|
// Import Filename
|
||||||
//
|
//
|
||||||
test_filename_edit=new QLineEdit(this);
|
test_filename_edit=new QLineEdit(this);
|
||||||
test_filename_edit->setReadOnly(true);
|
test_filename_edit->setReadOnly(true);
|
||||||
test_filename_edit->setGeometry(10,133,sizeHint().width()-20,18);
|
test_filename_label=
|
||||||
label=new QLabel(test_filename_edit,tr("Using source file:"),this);
|
new QLabel(test_filename_edit,tr("Using source file:"),this);
|
||||||
label->setGeometry(15,115,sizeHint().width()-30,18);
|
test_filename_label->setGeometry(15,115,sizeHint().width()-30,18);
|
||||||
label->setFont(font);
|
test_filename_label->setFont(font);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Events List
|
// Events List
|
||||||
//
|
//
|
||||||
test_events_list=new RDListView(this);
|
test_events_list=new RDListView(this);
|
||||||
test_events_list->
|
|
||||||
setGeometry(10,178,sizeHint().width()-20,sizeHint().height()-248);
|
|
||||||
test_events_list->setItemMargin(2);
|
test_events_list->setItemMargin(2);
|
||||||
test_events_list->addColumn(tr("Start Time"));
|
test_events_list->addColumn(tr("Start Time"));
|
||||||
test_events_list->setColumnAlignment(0,AlignCenter);
|
test_events_list->setColumnAlignment(0,AlignCenter);
|
||||||
@ -131,20 +123,17 @@ TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent)
|
|||||||
test_events_list->addColumn(tr("Announcement Type"));
|
test_events_list->addColumn(tr("Announcement Type"));
|
||||||
test_events_list->setColumnAlignment(6,AlignCenter);
|
test_events_list->setColumnAlignment(6,AlignCenter);
|
||||||
test_events_list->setColumnSortType(0,RDListView::LineSort);
|
test_events_list->setColumnSortType(0,RDListView::LineSort);
|
||||||
label=new QLabel(test_events_list,tr("Imported Events"),
|
test_events_label=new QLabel(test_events_list,tr("Imported Events"),this);
|
||||||
this,"test_events_label");
|
test_events_label->setGeometry(15,160,sizeHint().width()-30,18);
|
||||||
label->setGeometry(15,160,sizeHint().width()-30,18);
|
test_events_label->setFont(font);
|
||||||
label->setFont(font);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Close Button
|
// Close Button
|
||||||
//
|
//
|
||||||
button=new QPushButton(this);
|
test_close_button=new QPushButton(this);
|
||||||
button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
|
test_close_button->setFont(font);
|
||||||
80,50);
|
test_close_button->setText(tr("&Close"));
|
||||||
button->setFont(font);
|
connect(test_close_button,SIGNAL(clicked()),this,SLOT(closeData()));
|
||||||
button->setText(tr("&Close"));
|
|
||||||
connect(button,SIGNAL(clicked()),this,SLOT(closeData()));
|
|
||||||
|
|
||||||
dateChangedData(current_date);
|
dateChangedData(current_date);
|
||||||
}
|
}
|
||||||
@ -157,7 +146,7 @@ TestImport::~TestImport()
|
|||||||
|
|
||||||
QSize TestImport::sizeHint() const
|
QSize TestImport::sizeHint() const
|
||||||
{
|
{
|
||||||
return QSize(270,400);
|
return QSize(700,400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -279,7 +268,19 @@ void TestImport::paintEvent(QPaintEvent *e)
|
|||||||
QPainter *p=new QPainter(this);
|
QPainter *p=new QPainter(this);
|
||||||
p->setPen(QColor(black));
|
p->setPen(QColor(black));
|
||||||
p->moveTo(10,105);
|
p->moveTo(10,105);
|
||||||
p->lineTo(sizeHint().width()-20,105);
|
p->lineTo(size().width()-20,105);
|
||||||
p->end();
|
p->end();
|
||||||
delete p;
|
delete p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TestImport::resizeEvent(QResizeEvent *e)
|
||||||
|
{
|
||||||
|
test_date_edit->setGeometry(95,10,95,20);
|
||||||
|
test_date_label->setGeometry(5,10,85,20);
|
||||||
|
test_filename_edit->setGeometry(10,133,size().width()-20,18);
|
||||||
|
test_import_button->setGeometry(30,45,size().width()-60,50);
|
||||||
|
test_events_list->
|
||||||
|
setGeometry(10,178,size().width()-20,size().height()-248);
|
||||||
|
test_close_button->setGeometry(size().width()-90,size().height()-60,80,50);
|
||||||
|
}
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
#include <qdialog.h>
|
#include <qdialog.h>
|
||||||
#include <qsqldatabase.h>
|
#include <qsqldatabase.h>
|
||||||
|
#include <qpushbutton.h>
|
||||||
#include <qdatetimeedit.h>
|
#include <qdatetimeedit.h>
|
||||||
|
#include <qlabel.h>
|
||||||
#include <qlineedit.h>
|
#include <qlineedit.h>
|
||||||
|
|
||||||
#include <rdsvc.h>
|
#include <rdsvc.h>
|
||||||
@ -46,13 +48,19 @@ class TestImport : public QDialog
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e);
|
||||||
|
void resizeEvent(QResizeEvent *e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RDSvc *test_svc;
|
RDSvc *test_svc;
|
||||||
RDSvc::ImportSource test_src;
|
RDSvc::ImportSource test_src;
|
||||||
|
QLabel *test_date_label;
|
||||||
QDateEdit *test_date_edit;
|
QDateEdit *test_date_edit;
|
||||||
|
QPushButton *test_import_button;
|
||||||
|
QLabel *test_events_label;
|
||||||
RDListView *test_events_list;
|
RDListView *test_events_list;
|
||||||
|
QLabel *test_filename_label;
|
||||||
QLineEdit *test_filename_edit;
|
QLineEdit *test_filename_edit;
|
||||||
|
QPushButton *test_close_button;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user