mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-25 16:58:04 +02:00
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
* Refactored rdpanel(1) to use the 'RDDialog' and 'RDWidget' base classes.
This commit is contained in:
parent
ecf328eecf
commit
84d4696160
@ -19157,3 +19157,6 @@
|
|||||||
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
|
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Refactored rdmonitor(1) to use the 'RDDialog' and 'RDWidget'
|
* Refactored rdmonitor(1) to use the 'RDDialog' and 'RDWidget'
|
||||||
base classes.
|
base classes.
|
||||||
|
2019-10-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Refactored rdpanel(1) to use the 'RDDialog' and 'RDWidget'
|
||||||
|
base classes.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A Dedicated Cart Wall Utility for Rivendell.
|
// A Dedicated Cart Wall Utility for Rivendell.
|
||||||
//
|
//
|
||||||
// (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
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -50,8 +50,8 @@ RDCartDialog *panel_cart_dialog;
|
|||||||
//
|
//
|
||||||
#include "../icons/rdpanel-22x22.xpm"
|
#include "../icons/rdpanel-22x22.xpm"
|
||||||
|
|
||||||
MainWidget::MainWidget(QWidget *parent)
|
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||||
: QWidget(parent)
|
: RDWidget(c,parent)
|
||||||
{
|
{
|
||||||
QPixmap panel_skin_pixmap;
|
QPixmap panel_skin_pixmap;
|
||||||
QString err_msg;
|
QString err_msg;
|
||||||
@ -60,18 +60,10 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
// Fix the Window Size
|
// Fix the Window Size
|
||||||
//
|
//
|
||||||
#ifndef RESIZABLE
|
#ifndef RESIZABLE
|
||||||
setMinimumWidth(sizeHint().width());
|
setMinimumSize(sizeHint());
|
||||||
setMaximumWidth(sizeHint().width());
|
setMaximumSize(sizeHint());
|
||||||
setMinimumHeight(sizeHint().height());
|
|
||||||
setMaximumHeight(sizeHint().height());
|
|
||||||
#endif // RESIZABLE
|
#endif // RESIZABLE
|
||||||
|
|
||||||
//
|
|
||||||
// Generate Fonts
|
|
||||||
//
|
|
||||||
QFont button_font=QFont("Helvetica",16,QFont::Bold);
|
|
||||||
button_font.setPixelSize(16);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create Icons
|
// Create Icons
|
||||||
//
|
//
|
||||||
@ -396,7 +388,9 @@ int main(int argc,char *argv[])
|
|||||||
QTextCodec::locale(),".");
|
QTextCodec::locale(),".");
|
||||||
a.installTranslator(&tr);
|
a.installTranslator(&tr);
|
||||||
|
|
||||||
MainWidget *w=new MainWidget();
|
RDConfig *config=new RDConfig();
|
||||||
|
config->load();
|
||||||
|
MainWidget *w=new MainWidget(config);
|
||||||
a.setMainWidget(w);
|
a.setMainWidget(w);
|
||||||
w->setGeometry(QRect(QPoint(0,0),w->sizeHint()));
|
w->setGeometry(QRect(QPoint(0,0),w->sizeHint()));
|
||||||
w->show();
|
w->show();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A Dedicated Cart Wall Utility for Rivendell.
|
// A Dedicated Cart Wall Utility for Rivendell.
|
||||||
//
|
//
|
||||||
// (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
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -21,15 +21,10 @@
|
|||||||
#ifndef RDPANEL_H
|
#ifndef RDPANEL_H
|
||||||
#define RDPANEL_H
|
#define RDPANEL_H
|
||||||
|
|
||||||
#include <qwidget.h>
|
|
||||||
#include <qtimer.h>
|
|
||||||
#include <qpixmap.h>
|
|
||||||
|
|
||||||
#include <rdemptycart.h>
|
#include <rdemptycart.h>
|
||||||
#include <rdevent_player.h>
|
|
||||||
#include <rdmacro.h>
|
|
||||||
#include <rdsound_panel.h>
|
#include <rdsound_panel.h>
|
||||||
#include <rdstereometer.h>
|
#include <rdstereometer.h>
|
||||||
|
#include <rdwidget.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
// Settings
|
// Settings
|
||||||
@ -40,11 +35,11 @@
|
|||||||
#define RDPANEL_PANEL_BUTTON_COLUMNS 9
|
#define RDPANEL_PANEL_BUTTON_COLUMNS 9
|
||||||
#define RDPANEL_USAGE "\n"
|
#define RDPANEL_USAGE "\n"
|
||||||
|
|
||||||
class MainWidget : public QWidget
|
class MainWidget : public RDWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MainWidget(QWidget *parent=0);
|
MainWidget(RDConfig *c,QWidget *parent=0);
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const;
|
||||||
QSizePolicy sizePolicy() const;
|
QSizePolicy sizePolicy() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user