mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-25 23:00:21 +01:00
2018-08-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed style inconsistencies in dialogs within rdcatch(1).
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// edit_cartevent.cpp
|
||||
//
|
||||
// Edit a Rivendell Netcatch Cart Event
|
||||
// Edit a Rivendell Macro Cart Event
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2018 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
|
||||
@@ -19,6 +19,7 @@
|
||||
//
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qstring.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <q3listbox.h>
|
||||
@@ -27,11 +28,6 @@
|
||||
#include <qevent.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
//Added by qt3to4:
|
||||
#include <QCloseEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QLabel>
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rd.h>
|
||||
@@ -45,8 +41,10 @@
|
||||
#include "globals.h"
|
||||
|
||||
EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
QString temp;
|
||||
@@ -73,7 +71,7 @@ EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
edit_deck=NULL;
|
||||
edit_added_events=adds;
|
||||
|
||||
setCaption(tr("Edit Cart Event"));
|
||||
setWindowTitle("RDCatch - "+tr("Edit Cart Event"));
|
||||
|
||||
//
|
||||
// Text Validator
|
||||
@@ -151,10 +149,9 @@ EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
//
|
||||
// Button Label
|
||||
//
|
||||
label=new QLabel(tr("Active Days"),this);
|
||||
label->setGeometry(47,101,90,19);
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(Qt::AlignHCenter);
|
||||
QGroupBox *groupbox=new QGroupBox(tr("Active Days"),this);
|
||||
groupbox->setFont(label_font);
|
||||
groupbox->setGeometry(10,104,sizeHint().width()-20,62);
|
||||
|
||||
//
|
||||
// Monday Button
|
||||
@@ -378,26 +375,17 @@ void EditCartEvent::cancelData()
|
||||
}
|
||||
|
||||
|
||||
void EditCartEvent::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
QPainter *p=new QPainter(this);
|
||||
p->setPen(Qt::black);
|
||||
p->drawRect(10,109,sizeHint().width()-20,62);
|
||||
p->end();
|
||||
}
|
||||
|
||||
|
||||
void EditCartEvent::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
switch(e->key()) {
|
||||
case Qt::Key_Escape:
|
||||
e->accept();
|
||||
cancelData();
|
||||
break;
|
||||
case Qt::Key_Escape:
|
||||
e->accept();
|
||||
cancelData();
|
||||
break;
|
||||
|
||||
default:
|
||||
QDialog::keyPressEvent(e);
|
||||
break;
|
||||
default:
|
||||
QDialog::keyPressEvent(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user