mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2021-06-19 Fred Gleason <fredg@paravelsystems.com>
* Added an 'RDMainWindow' class. * Added 'RDMainWindow' to rdairplay(1). * Added 'RDMainWindow' to rdpanel(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -40,7 +40,7 @@ RDAudioPort *rdaudioport_conf;
|
||||
RDCartDialog *panel_cart_dialog;
|
||||
|
||||
MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
: RDWidget(c,parent)
|
||||
: RDMainWindow("rdpanel",c)
|
||||
{
|
||||
QPixmap panel_skin_pixmap;
|
||||
QString err_msg;
|
||||
@@ -48,10 +48,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
#ifndef RESIZABLE
|
||||
setMinimumSize(sizeHint());
|
||||
// setMaximumSize(sizeHint());
|
||||
#endif // RESIZABLE
|
||||
|
||||
//
|
||||
// Open the Database
|
||||
@@ -247,6 +244,10 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
panel_empty_cart->hide();
|
||||
}
|
||||
|
||||
if(!loadSettings(true)) {
|
||||
showMaximized();
|
||||
}
|
||||
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
}
|
||||
|
||||
@@ -345,6 +346,7 @@ void MainWidget::wheelEvent(QWheelEvent *e)
|
||||
void MainWidget::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
panel_db->removeDatabase(rda->config()->mysqlDbname());
|
||||
saveSettings();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -392,7 +394,6 @@ int main(int argc,char *argv[])
|
||||
RDConfig *config=new RDConfig();
|
||||
config->load();
|
||||
MainWidget *w=new MainWidget(config);
|
||||
w->setGeometry(QRect(QPoint(0,0),w->sizeHint()));
|
||||
w->show();
|
||||
return a.exec();
|
||||
}
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#define RDPANEL_H
|
||||
|
||||
#include <rdemptycart.h>
|
||||
#include <rdmainwindow.h>
|
||||
#include <rdsound_panel.h>
|
||||
#include <rdstereometer.h>
|
||||
#include <rdwidget.h>
|
||||
@@ -31,11 +32,9 @@
|
||||
//
|
||||
#define MASTER_TIMER_INTERVAL 100
|
||||
#define METER_INTERVAL 50
|
||||
//#define RDPANEL_PANEL_BUTTON_ROWS 7
|
||||
//#define RDPANEL_PANEL_BUTTON_COLUMNS 9
|
||||
#define RDPANEL_USAGE "\n"
|
||||
|
||||
class MainWidget : public RDWidget
|
||||
class MainWidget : public RDMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
Reference in New Issue
Block a user