mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-03 22:19:09 +02:00
2022-04-29 Fred Gleason <fredg@paravelsystems.com>
* Added a 'StayOnTop=' directive to the '[SoftKeys]' section of rd.conf(5). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
07fd2ef3cb
commit
76ddbb9b35
@ -20872,3 +20872,6 @@
|
||||
a service name option.
|
||||
2022-03-22 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Incremented the package version to 3.6.5int0.
|
||||
2022-04-29 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'StayOnTop=' directive to the '[SoftKeys]' section of
|
||||
rd.conf(5).
|
||||
|
@ -131,6 +131,8 @@ ChannelsPerPcm=-1
|
||||
; can use the --map-file=<filename> switch to configure multiple soft
|
||||
; key setups on the same host.
|
||||
;
|
||||
; StayOnTop=No
|
||||
;
|
||||
; Columns=10
|
||||
;
|
||||
; Command1=hithlum.srlabs.loc:GO 3 1 1 0!
|
||||
|
@ -37,15 +37,14 @@
|
||||
//
|
||||
#include "../icons/rivendell-22x22.xpm"
|
||||
|
||||
MainWidget::MainWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
MainWidget::MainWidget(RDConfig *config,Qt::WindowFlags f)
|
||||
: QWidget(NULL,f)
|
||||
{
|
||||
key_ysize=70;
|
||||
|
||||
//
|
||||
// Read Command Options
|
||||
//
|
||||
RDConfig *config=new RDConfig();
|
||||
QString map_filename=config->filename();
|
||||
RDCmdSwitch *cmd=
|
||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdsoftkeys",RDSOFTKEYS_USAGE);
|
||||
@ -233,10 +232,31 @@ int main(int argc,char *argv[])
|
||||
tests.load(tr_path+QString("rdsoftkeys_")+QTextCodec::locale(),".");
|
||||
a.installTranslator(&tests);
|
||||
|
||||
//
|
||||
// Read Command Options
|
||||
//
|
||||
RDConfig *config=new RDConfig();
|
||||
QString map_filename=config->filename();
|
||||
RDCmdSwitch *cmd=
|
||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdsoftkeys",RDSOFTKEYS_USAGE);
|
||||
for(unsigned i=0;i<cmd->keys();i++) {
|
||||
if(cmd->key(i)=="--map-file") {
|
||||
map_filename=cmd->value(i);
|
||||
}
|
||||
}
|
||||
delete cmd;
|
||||
RDProfile *profile=new RDProfile();
|
||||
Qt::WindowFlags f=Qt::WindowFlags();
|
||||
profile->setSource(map_filename);
|
||||
if(profile->boolValue("SoftKeys","StayOnTop",false)) {
|
||||
f=f|Qt::WindowStaysOnTopHint;
|
||||
}
|
||||
delete profile;
|
||||
|
||||
//
|
||||
// Start Event Loop
|
||||
//
|
||||
MainWidget *w=new MainWidget();
|
||||
MainWidget *w=new MainWidget(config,f);
|
||||
a.setMainWidget(w);
|
||||
w->setGeometry(w->geometry().x(),w->geometry().y(),w->sizeHint().width(),w->sizeHint().height());
|
||||
w->show();
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <q3socketdevice.h>
|
||||
#include <qwidget.h>
|
||||
|
||||
#include <rdconfig.h>
|
||||
|
||||
//
|
||||
// Settings
|
||||
//
|
||||
@ -34,7 +36,7 @@ class MainWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWidget(QWidget *parent=0);
|
||||
MainWidget(RDConfig *config,Qt::WindowFlags f=Qt::WindowFlags());
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user