mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 22:48:01 +02:00
2021-02-09 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'Q3PopupMenu' dependency from rdlogmanager(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
8e6b8dcc88
commit
4eb9cacd76
@ -21093,3 +21093,5 @@
|
||||
2021-02-09 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Refactored the 'Log Grids' dialog in rdlogmanager(1) to use
|
||||
the model based API.
|
||||
2021-02-09 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed the 'Q3PopupMenu' dependency from rdlogmanager(1).
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit Rivendell Log Grid
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -45,7 +45,6 @@ EditGrid::EditGrid(QString servicename,QWidget *parent)
|
||||
//
|
||||
// Hour Buttons
|
||||
//
|
||||
// QLabel *label;
|
||||
QSignalMapper *mapper=new QSignalMapper(this);
|
||||
connect(mapper,SIGNAL(mapped(int)),this,SLOT(hourButtonData(int)));
|
||||
for(int i=0;i<5;i++) {
|
||||
@ -84,12 +83,12 @@ EditGrid::EditGrid(QString servicename,QWidget *parent)
|
||||
//
|
||||
// Right Button Menu
|
||||
//
|
||||
edit_right_menu=new Q3PopupMenu(this);
|
||||
connect(edit_right_menu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowData()));
|
||||
edit_right_menu->
|
||||
insertItem(tr("Edit Clock"),this,SLOT(editClockData()),0,0);
|
||||
edit_right_menu->
|
||||
insertItem(tr("Clear Hour"),this,SLOT(clearHourData()),0,1);
|
||||
edit_mouse_menu=new QMenu(this);
|
||||
|
||||
edit_edit_clock_action=edit_mouse_menu->
|
||||
addAction(tr("Edit Clock"),this,SLOT(editClockData()));
|
||||
edit_edit_clock_action->setCheckable(false);
|
||||
connect(edit_mouse_menu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowData()));
|
||||
|
||||
//
|
||||
// Change All Button
|
||||
@ -191,14 +190,15 @@ void EditGrid::rightHourButtonData(int id,const QPoint &pt)
|
||||
edit_rightclick_id=id;
|
||||
int dayofweek=edit_rightclick_id/24+1;
|
||||
int hour=edit_rightclick_id-24*(dayofweek-1);
|
||||
edit_right_menu->
|
||||
|
||||
edit_mouse_menu->
|
||||
setGeometry(edit_hour_button[dayofweek-1][hour]->geometry().x()+
|
||||
geometry().x()+pt.x()+2,
|
||||
edit_hour_button[dayofweek-1][hour]->geometry().y()+
|
||||
geometry().y()+pt.y(),
|
||||
edit_right_menu->sizeHint().width(),
|
||||
edit_right_menu->sizeHint().height());
|
||||
edit_right_menu->exec();
|
||||
edit_mouse_menu->sizeHint().width(),
|
||||
edit_mouse_menu->sizeHint().height());
|
||||
edit_mouse_menu->exec();
|
||||
}
|
||||
|
||||
|
||||
@ -206,8 +206,8 @@ void EditGrid::aboutToShowData()
|
||||
{
|
||||
int dayofweek=edit_rightclick_id/24+1;
|
||||
int hour=edit_rightclick_id-24*(dayofweek-1);
|
||||
edit_right_menu->setItemEnabled(0,!GetClock(dayofweek,hour).isEmpty());
|
||||
edit_right_menu->setItemEnabled(1,!GetClock(dayofweek,hour).isEmpty());
|
||||
|
||||
edit_edit_clock_action->setEnabled(!GetClock(dayofweek,hour).isEmpty());
|
||||
}
|
||||
|
||||
|
||||
@ -251,22 +251,6 @@ void EditGrid::closeData()
|
||||
}
|
||||
|
||||
|
||||
void EditGrid::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
/*
|
||||
QPainter *p=new QPainter(this);
|
||||
p->setPen(Qt::black);
|
||||
for(int i=0;i<5;i++) {
|
||||
p->drawRect(5,21+75*i,sizeHint().width()-10,55);
|
||||
}
|
||||
for(int i=5;i<7;i++) {
|
||||
p->drawRect(5,51+75*i,sizeHint().width()-10,55);
|
||||
}
|
||||
p->end();
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void EditGrid::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
closeData();
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit A Rivendell Log Grid
|
||||
//
|
||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 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
|
||||
@ -21,8 +21,9 @@
|
||||
#ifndef EDIT_GRID_H
|
||||
#define EDIT_GRID_H
|
||||
|
||||
#include <qgroupbox.h>
|
||||
#include <q3popupmenu.h>
|
||||
#include <QAction>
|
||||
#include <QGroupBox>
|
||||
#include <QMenu>
|
||||
|
||||
#include <rddialog.h>
|
||||
#include <rdpushbutton.h>
|
||||
@ -45,7 +46,6 @@ class EditGrid : public RDDialog
|
||||
void closeData();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void closeEvent(QCloseEvent *e);
|
||||
|
||||
private:
|
||||
@ -56,8 +56,9 @@ class EditGrid : public RDDialog
|
||||
QString current_clockname;
|
||||
QGroupBox *edit_day_boxes[7];
|
||||
RDPushButton *edit_hour_button[7][24];
|
||||
Q3PopupMenu *edit_right_menu;
|
||||
int edit_rightclick_id;
|
||||
QMenu *edit_mouse_menu;
|
||||
QAction *edit_edit_clock_action;
|
||||
};
|
||||
|
||||
|
||||
|
@ -676,7 +676,7 @@ existující událostí.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear Hour</source>
|
||||
<translation>Smazat hodiny</translation>
|
||||
<translation type="obsolete">Smazat hodiny</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change
|
||||
|
@ -676,7 +676,7 @@ einem bereits existierendem Event.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear Hour</source>
|
||||
<translation>Stunde löschen</translation>
|
||||
<translation type="obsolete">Stunde löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change
|
||||
|
@ -678,7 +678,7 @@ un evento ya existente.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear Hour</source>
|
||||
<translation>Limpiar tortas</translation>
|
||||
<translation type="obsolete">Limpiar tortas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change
|
||||
|
@ -479,10 +479,6 @@ already existing event.</source>
|
||||
<source>&Close</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear Hour</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change
|
||||
&All</source>
|
||||
|
@ -675,10 +675,6 @@ ei anna hending som finst frå før.</translation>
|
||||
<source>&Close</source>
|
||||
<translation>&Lukk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear Hour</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change
|
||||
&All</source>
|
||||
|
@ -675,10 +675,6 @@ ei anna hending som finst frå før.</translation>
|
||||
<source>&Close</source>
|
||||
<translation>&Lukk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear Hour</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Change
|
||||
&All</source>
|
||||
|
@ -674,7 +674,7 @@ evento existente.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear Hour</source>
|
||||
<translation>Limpar Hora</translation>
|
||||
<translation type="obsolete">Limpar Hora</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Close</source>
|
||||
|
Loading…
x
Reference in New Issue
Block a user