mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-15 17:11:33 +01:00
2019-10-01 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDDialog' class. * Added an 'RDWidget' class. * Refactored rdadmin(1) to use 'RDDialog' and 'RDWidget' base classes.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Add a Rivendell Group
|
||||
//
|
||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2019 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
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <rdtextvalidator.h>
|
||||
|
||||
AddGroup::AddGroup(QString *group,QWidget *parent)
|
||||
: QDialog(parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
setModal(true);
|
||||
|
||||
@@ -53,15 +53,7 @@ AddGroup::AddGroup(QString *group,QWidget *parent)
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMaximumHeight(sizeHint().height());
|
||||
|
||||
setCaption("RDAdmin - "+tr("Add Group"));
|
||||
|
||||
//
|
||||
// Create Fonts
|
||||
//
|
||||
QFont font=QFont("Helvetica",12,QFont::Bold);
|
||||
font.setPixelSize(12);
|
||||
QFont user_font=QFont("Helvetica",12,QFont::Normal);
|
||||
user_font.setPixelSize(12);
|
||||
setWindowTitle("RDAdmin - "+tr("Add Group"));
|
||||
|
||||
//
|
||||
// Text Validator
|
||||
@@ -76,8 +68,9 @@ AddGroup::AddGroup(QString *group,QWidget *parent)
|
||||
group_name_edit->setMaxLength(10);
|
||||
group_name_edit->setValidator(validator);
|
||||
QLabel *label=new QLabel(group_name_edit,tr("&New Group Name:"),this);
|
||||
label->setFont(labelFont());
|
||||
label->setGeometry(10,11,130,19);
|
||||
label->setFont(font);
|
||||
label->setFont(labelFont());
|
||||
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
|
||||
|
||||
//
|
||||
@@ -87,8 +80,8 @@ AddGroup::AddGroup(QString *group,QWidget *parent)
|
||||
group_users_box->setGeometry(40,40,15,15);
|
||||
group_users_box->setChecked(true);
|
||||
label=new QLabel(group_users_box,tr("Enable Group for All Users"),this);
|
||||
label->setFont(subLabelFont());
|
||||
label->setGeometry(60,38,sizeHint().width()-60,19);
|
||||
label->setFont(user_font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic);
|
||||
|
||||
//
|
||||
@@ -98,8 +91,8 @@ AddGroup::AddGroup(QString *group,QWidget *parent)
|
||||
group_svcs_box->setGeometry(40,61,15,15);
|
||||
group_svcs_box->setChecked(true);
|
||||
label=new QLabel(group_svcs_box,tr("Enable Group for All Services"),this);
|
||||
label->setFont(subLabelFont());
|
||||
label->setGeometry(60,58,sizeHint().width()-60,19);
|
||||
label->setFont(user_font);
|
||||
label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic);
|
||||
|
||||
//
|
||||
@@ -108,7 +101,7 @@ AddGroup::AddGroup(QString *group,QWidget *parent)
|
||||
QPushButton *ok_button=new QPushButton(this);
|
||||
ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
|
||||
ok_button->setDefault(true);
|
||||
ok_button->setFont(font);
|
||||
ok_button->setFont(buttonFont());
|
||||
ok_button->setText(tr("&OK"));
|
||||
connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));
|
||||
|
||||
@@ -118,7 +111,7 @@ AddGroup::AddGroup(QString *group,QWidget *parent)
|
||||
QPushButton *cancel_button=new QPushButton(this);
|
||||
cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
|
||||
80,50);
|
||||
cancel_button->setFont(font);
|
||||
cancel_button->setFont(buttonFont());
|
||||
cancel_button->setText(tr("&Cancel"));
|
||||
connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user