mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 14:43:30 +02:00
2020-12-26 Fred Gleason <fredg@paravelsystems.com>
* Removed 'ListListViewItem' class from rdlogedit(1). * Removed 'LogListView' class from rdlogedit(1). * Removed dependency on 'Q3DateEdit' from rdlogedit(1). * Removed dependency on 'Q3PointArray' from rdlogedit(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
c27e953186
commit
8b7bb369d6
@ -20740,3 +20740,8 @@
|
|||||||
* Added a 'RDLogListModel' class.
|
* Added a 'RDLogListModel' class.
|
||||||
* Added a 'RDLogIcons::listIcon()' method.
|
* Added a 'RDLogIcons::listIcon()' method.
|
||||||
* Refactored rdlogedit(1) to use 'RDLogListModel'.
|
* Refactored rdlogedit(1) to use 'RDLogListModel'.
|
||||||
|
2020-12-26 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Removed 'ListListViewItem' class from rdlogedit(1).
|
||||||
|
* Removed 'LogListView' class from rdlogedit(1).
|
||||||
|
* Removed dependency on 'Q3DateEdit' from rdlogedit(1).
|
||||||
|
* Removed dependency on 'Q3PointArray' from rdlogedit(1).
|
||||||
|
@ -47,9 +47,7 @@ dist_rdlogedit_SOURCES = add_meta.cpp add_meta.h\
|
|||||||
edit_logline.cpp edit_logline.h\
|
edit_logline.cpp edit_logline.h\
|
||||||
edit_marker.cpp edit_marker.h\
|
edit_marker.cpp edit_marker.h\
|
||||||
edit_track.cpp edit_track.h\
|
edit_track.cpp edit_track.h\
|
||||||
list_listviewitem.cpp list_listviewitem.h\
|
|
||||||
list_reports.cpp list_reports.h\
|
list_reports.cpp list_reports.h\
|
||||||
log_listview.cpp log_listview.h\
|
|
||||||
logmodel.cpp logmodel.h\
|
logmodel.cpp logmodel.h\
|
||||||
logtableview.cpp logtableview.h\
|
logtableview.cpp logtableview.h\
|
||||||
rdlogedit.cpp rdlogedit.h globals.h\
|
rdlogedit.cpp rdlogedit.h globals.h\
|
||||||
@ -64,7 +62,6 @@ nodist_rdlogedit_SOURCES = moc_add_meta.cpp\
|
|||||||
moc_edit_marker.cpp\
|
moc_edit_marker.cpp\
|
||||||
moc_edit_track.cpp\
|
moc_edit_track.cpp\
|
||||||
moc_list_reports.cpp\
|
moc_list_reports.cpp\
|
||||||
moc_log_listview.cpp\
|
|
||||||
moc_logmodel.cpp\
|
moc_logmodel.cpp\
|
||||||
moc_logtableview.cpp\
|
moc_logtableview.cpp\
|
||||||
moc_rdlogedit.cpp\
|
moc_rdlogedit.cpp\
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Base class for rdlogedit(1) event editor dialogs
|
// Base class for rdlogedit(1) event editor dialogs
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2020 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
|
||||||
@ -74,7 +74,6 @@ EditEvent::EditEvent(RDLogLine *line,QWidget *parent)
|
|||||||
edit_grace_bgroup->addButton(radio_button,2);
|
edit_grace_bgroup->addButton(radio_button,2);
|
||||||
edit_grace_timeedit=new QTimeEdit(this);
|
edit_grace_timeedit=new QTimeEdit(this);
|
||||||
edit_grace_timeedit->setDisplayFormat("mm:ss");
|
edit_grace_timeedit->setDisplayFormat("mm:ss");
|
||||||
// edit_grace_timeedit->setDisplay(Q3TimeEdit::Minutes|Q3TimeEdit::Seconds);
|
|
||||||
connect(edit_timetype_box,SIGNAL(toggled(bool)),
|
connect(edit_timetype_box,SIGNAL(toggled(bool)),
|
||||||
this,SLOT(timeToggledData(bool)));
|
this,SLOT(timeToggledData(bool)));
|
||||||
connect(edit_grace_bgroup,SIGNAL(buttonClicked(int)),
|
connect(edit_grace_bgroup,SIGNAL(buttonClicked(int)),
|
||||||
|
@ -155,7 +155,8 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
edit_purgedate_label=new QLabel(edit_purgedate_box,tr("Delete on"),this);
|
edit_purgedate_label=new QLabel(edit_purgedate_box,tr("Delete on"),this);
|
||||||
edit_purgedate_label->setFont(labelFont());
|
edit_purgedate_label->setFont(labelFont());
|
||||||
edit_purgedate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
edit_purgedate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
edit_purgedate_edit=new Q3DateEdit(this);
|
edit_purgedate_edit=new QDateEdit(this);
|
||||||
|
edit_purgedate_edit->setDisplayFormat("MM/dd/yyyy");
|
||||||
edit_purgedate_button=new QPushButton(tr("Select"),this);
|
edit_purgedate_button=new QPushButton(tr("Select"),this);
|
||||||
edit_purgedate_button->setFont(buttonFont());
|
edit_purgedate_button->setFont(buttonFont());
|
||||||
connect(edit_purgedate_box,SIGNAL(toggled(bool)),
|
connect(edit_purgedate_box,SIGNAL(toggled(bool)),
|
||||||
@ -164,7 +165,7 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
edit_purgedate_edit,SLOT(setEnabled(bool)));
|
edit_purgedate_edit,SLOT(setEnabled(bool)));
|
||||||
connect(edit_purgedate_box,SIGNAL(toggled(bool)),
|
connect(edit_purgedate_box,SIGNAL(toggled(bool)),
|
||||||
edit_purgedate_button,SLOT(setEnabled(bool)));
|
edit_purgedate_button,SLOT(setEnabled(bool)));
|
||||||
connect(edit_purgedate_edit,SIGNAL(valueChanged(const QDate &)),
|
connect(edit_purgedate_edit,SIGNAL(dateChanged(const QDate &)),
|
||||||
this,SLOT(purgeDateChangedData(const QDate &)));
|
this,SLOT(purgeDateChangedData(const QDate &)));
|
||||||
connect(edit_purgedate_button,SIGNAL(clicked()),
|
connect(edit_purgedate_button,SIGNAL(clicked()),
|
||||||
this,SLOT(selectPurgeDateData()));
|
this,SLOT(selectPurgeDateData()));
|
||||||
@ -199,22 +200,24 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
//
|
//
|
||||||
// Start Date
|
// Start Date
|
||||||
//
|
//
|
||||||
edit_startdate_edit=new Q3DateEdit(this);
|
edit_startdate_edit=new QDateEdit(this);
|
||||||
|
edit_startdate_edit->setDisplayFormat("MM/dd/yyyy");
|
||||||
edit_startdate_label=new QLabel(edit_startdate_edit,tr("Start Date:"),this);
|
edit_startdate_label=new QLabel(edit_startdate_edit,tr("Start Date:"),this);
|
||||||
edit_startdate_label->setFont(labelFont());
|
edit_startdate_label->setFont(labelFont());
|
||||||
edit_startdate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
edit_startdate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
connect(edit_startdate_edit,SIGNAL(valueChanged(const QDate &)),
|
connect(edit_startdate_edit,SIGNAL(dateChanged(const QDate &)),
|
||||||
this,SLOT(dateValueChangedData(const QDate &)));
|
this,SLOT(dateValueChangedData(const QDate &)));
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End Date
|
// End Date
|
||||||
//
|
//
|
||||||
edit_enddate_edit=new Q3DateEdit(this);
|
edit_enddate_edit=new QDateEdit(this);
|
||||||
|
edit_enddate_edit->setDisplayFormat("MM/dd/yyyy");
|
||||||
edit_enddate_label=new QLabel(edit_startdate_edit,tr("End Date:"),this);
|
edit_enddate_label=new QLabel(edit_startdate_edit,tr("End Date:"),this);
|
||||||
edit_enddate_label->setFont(labelFont());
|
edit_enddate_label->setFont(labelFont());
|
||||||
edit_enddate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
edit_enddate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||||
connect(edit_enddate_edit,SIGNAL(valueChanged(const QDate &)),
|
connect(edit_enddate_edit,SIGNAL(dateChanged(const QDate &)),
|
||||||
this,SLOT(dateValueChangedData(const QDate &)));
|
this,SLOT(dateValueChangedData(const QDate &)));
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -533,12 +536,12 @@ EditLog::EditLog(QString logname,QString *filter,QString *group,
|
|||||||
}
|
}
|
||||||
if(!editing_allowed) {
|
if(!editing_allowed) {
|
||||||
if(edit_startdate_box->isChecked()) {
|
if(edit_startdate_box->isChecked()) {
|
||||||
edit_startdate_edit->setRange(edit_startdate_edit->date(),
|
edit_startdate_edit->setMinimumDate(edit_startdate_edit->date());
|
||||||
edit_startdate_edit->date());
|
edit_startdate_edit->setMaximumDate(edit_startdate_edit->date());
|
||||||
}
|
}
|
||||||
if(edit_enddate_box->isChecked()) {
|
if(edit_enddate_box->isChecked()) {
|
||||||
edit_enddate_edit->setRange(edit_enddate_edit->date(),
|
edit_enddate_edit->setMinimumDate(edit_enddate_edit->date());
|
||||||
edit_enddate_edit->date());
|
edit_enddate_edit->setMaximumDate(edit_enddate_edit->date());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
edit_startdate_box->setEnabled(editing_allowed);
|
edit_startdate_box->setEnabled(editing_allowed);
|
||||||
|
@ -118,8 +118,8 @@ class EditLog : public RDDialog
|
|||||||
QLabel *edit_autorefresh_label;
|
QLabel *edit_autorefresh_label;
|
||||||
QComboBox *edit_autorefresh_box;
|
QComboBox *edit_autorefresh_box;
|
||||||
QLineEdit *edit_autorefresh_edit;
|
QLineEdit *edit_autorefresh_edit;
|
||||||
Q3DateEdit *edit_startdate_edit;
|
QDateEdit *edit_startdate_edit;
|
||||||
Q3DateEdit *edit_enddate_edit;
|
QDateEdit *edit_enddate_edit;
|
||||||
QLabel *edit_startdate_label;
|
QLabel *edit_startdate_label;
|
||||||
QLabel *edit_startdate_box_label;
|
QLabel *edit_startdate_box_label;
|
||||||
QLabel *edit_enddate_box_label;
|
QLabel *edit_enddate_box_label;
|
||||||
@ -165,7 +165,7 @@ class EditLog : public RDDialog
|
|||||||
QLineEdit *edit_endtime_edit;
|
QLineEdit *edit_endtime_edit;
|
||||||
QCheckBox *edit_purgedate_box;
|
QCheckBox *edit_purgedate_box;
|
||||||
QLabel *edit_purgedate_label;
|
QLabel *edit_purgedate_label;
|
||||||
Q3DateEdit *edit_purgedate_edit;
|
QDateEdit *edit_purgedate_edit;
|
||||||
QPushButton *edit_purgedate_button;
|
QPushButton *edit_purgedate_button;
|
||||||
RDLogLock *edit_log_lock;
|
RDLogLock *edit_log_lock;
|
||||||
QPushButton *edit_renderas_button;
|
QPushButton *edit_renderas_button;
|
||||||
|
@ -1,116 +0,0 @@
|
|||||||
// list_listviewitem.cpp
|
|
||||||
//
|
|
||||||
// A QListViewItem class for RDLogEdit.
|
|
||||||
//
|
|
||||||
// (C) Copyright 2002-2006,2016 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
|
|
||||||
// published by the Free Software Foundation.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public
|
|
||||||
// License along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <qfontmetrics.h>
|
|
||||||
#include <qpainter.h>
|
|
||||||
//Added by qt3to4:
|
|
||||||
#include <QPixmap>
|
|
||||||
|
|
||||||
#include <list_listviewitem.h>
|
|
||||||
|
|
||||||
#include "../icons/greenball.xpm"
|
|
||||||
#include "../icons/redball.xpm"
|
|
||||||
#include "../icons/whiteball.xpm"
|
|
||||||
|
|
||||||
ListListViewItem::ListListViewItem(Q3ListView *parent)
|
|
||||||
: Q3ListViewItem(parent)
|
|
||||||
{
|
|
||||||
list_track_column=-1;
|
|
||||||
list_tracks=-1;
|
|
||||||
list_total_tracks=0;
|
|
||||||
list_parent=parent;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Create Icons
|
|
||||||
//
|
|
||||||
list_whiteball_map=new QPixmap(whiteball_xpm);
|
|
||||||
list_greenball_map=new QPixmap(greenball_xpm);
|
|
||||||
list_redball_map=new QPixmap(redball_xpm);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int ListListViewItem::trackColumn() const
|
|
||||||
{
|
|
||||||
return list_track_column;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ListListViewItem::setTrackColumn(int col)
|
|
||||||
{
|
|
||||||
list_track_column=col;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int ListListViewItem::tracks() const
|
|
||||||
{
|
|
||||||
return list_tracks;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ListListViewItem::setTracks(int quan)
|
|
||||||
{
|
|
||||||
list_tracks=quan;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int ListListViewItem::totalTracks() const
|
|
||||||
{
|
|
||||||
return list_total_tracks;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ListListViewItem::setTotalTracks(int quan)
|
|
||||||
{
|
|
||||||
list_total_tracks=quan;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ListListViewItem::paintCell(QPainter *p,const QColorGroup &cg,int column,
|
|
||||||
int width,int align)
|
|
||||||
{
|
|
||||||
if(column!=list_track_column) {
|
|
||||||
Q3ListViewItem::paintCell(p,cg,column,width,align);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QColor fg=cg.text();
|
|
||||||
QColor bg=cg.base();
|
|
||||||
if(isSelected()) {
|
|
||||||
fg=cg.highlightedText();
|
|
||||||
bg=cg.highlight();
|
|
||||||
}
|
|
||||||
QString str=QString().sprintf("%u / %u",list_tracks,list_total_tracks);
|
|
||||||
QPixmap *icon=list_whiteball_map;
|
|
||||||
if(list_total_tracks>0) {
|
|
||||||
if(list_tracks==list_total_tracks) {
|
|
||||||
icon=list_greenball_map;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
icon=list_redball_map;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
QFontMetrics *m=new QFontMetrics(p->font());
|
|
||||||
p->setBackgroundColor(bg);
|
|
||||||
p->eraseRect(0,0,width,height());
|
|
||||||
p->setPen(fg);
|
|
||||||
p->drawPixmap(list_parent->itemMargin(),(height()-icon->size().height())/2,
|
|
||||||
*icon);
|
|
||||||
p->drawText(icon->size().width()+10,3*(height()-m->height())/2,str);
|
|
||||||
delete m;
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
// list_listviewitem.h
|
|
||||||
//
|
|
||||||
// A QListViewItem class for RDLogEdit.
|
|
||||||
//
|
|
||||||
// (C) Copyright 2002-2006,2016 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
|
|
||||||
// published by the Free Software Foundation.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public
|
|
||||||
// License along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef LIST_LISTVIEWITEM_H
|
|
||||||
#define LIST_LISTVIEWITEM_H
|
|
||||||
|
|
||||||
#include <q3listview.h>
|
|
||||||
#include <qpixmap.h>
|
|
||||||
|
|
||||||
#include <q3listview.h>
|
|
||||||
|
|
||||||
class ListListViewItem : public Q3ListViewItem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ListListViewItem(Q3ListView *parent);
|
|
||||||
int trackColumn() const;
|
|
||||||
void setTrackColumn(int col);
|
|
||||||
int tracks() const;
|
|
||||||
void setTracks(int quan);
|
|
||||||
int totalTracks() const;
|
|
||||||
void setTotalTracks(int quan);
|
|
||||||
void paintCell(QPainter *p,const QColorGroup &cg,int column,
|
|
||||||
int width,int align);
|
|
||||||
|
|
||||||
private:
|
|
||||||
int list_track_column;
|
|
||||||
int list_tracks;
|
|
||||||
int list_total_tracks;
|
|
||||||
QPixmap *list_whiteball_map;
|
|
||||||
QPixmap *list_redball_map;
|
|
||||||
QPixmap *list_greenball_map;
|
|
||||||
Q3ListView *list_parent;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // LIST_LISTVIEWITEM_H
|
|
@ -67,7 +67,8 @@ ListReports::ListReports(const QString &logname,const QString &description,
|
|||||||
//
|
//
|
||||||
// Effective Date
|
// Effective Date
|
||||||
//
|
//
|
||||||
list_date_edit=new Q3DateEdit(this);
|
list_date_edit=new QDateEdit(this);
|
||||||
|
list_date_edit->setDisplayFormat("MM/dd/yyyy");
|
||||||
list_date_edit->setGeometry(110,34,100,19);
|
list_date_edit->setGeometry(110,34,100,19);
|
||||||
QLabel *list_date_label=new QLabel(list_date_edit,tr("Effective Date:"),this);
|
QLabel *list_date_label=new QLabel(list_date_edit,tr("Effective Date:"),this);
|
||||||
list_date_label->setGeometry(10,34,95,19);
|
list_date_label->setGeometry(10,34,95,19);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#ifndef LIST_REPORTS_H
|
#ifndef LIST_REPORTS_H
|
||||||
#define LIST_REPORTS_H
|
#define LIST_REPORTS_H
|
||||||
|
|
||||||
#include <q3datetimeedit.h>
|
#include <qdatetimeedit.h>
|
||||||
|
|
||||||
#include <qcombobox.h>
|
#include <qcombobox.h>
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class ListReports : public RDDialog
|
|||||||
QDate list_end_date;
|
QDate list_end_date;
|
||||||
bool list_auto_refresh;
|
bool list_auto_refresh;
|
||||||
RDLogModel *list_model;
|
RDLogModel *list_model;
|
||||||
Q3DateEdit *list_date_edit;
|
QDateEdit *list_date_edit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,105 +0,0 @@
|
|||||||
// log_listview.cpp
|
|
||||||
//
|
|
||||||
// The Log ListView widget for RDLogEdit.
|
|
||||||
//
|
|
||||||
// (C) Copyright 2002-2006,2016 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
|
|
||||||
// published by the Free Software Foundation.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public
|
|
||||||
// License along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <q3header.h>
|
|
||||||
//Added by qt3to4:
|
|
||||||
#include <Q3PopupMenu>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
|
|
||||||
#include <log_listview.h>
|
|
||||||
|
|
||||||
LogListView::LogListView(QWidget *parent)
|
|
||||||
: RDListView(parent)
|
|
||||||
{
|
|
||||||
log_parent=parent;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Right Button Menu
|
|
||||||
//
|
|
||||||
log_menu=new Q3PopupMenu(this,"log_menu");
|
|
||||||
connect(log_menu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowData()));
|
|
||||||
log_menu->insertItem(tr("PLAY Transition"),this,SLOT(playData()),0,0);
|
|
||||||
log_menu->insertItem(tr("SEGUE Transition"),this,SLOT(segueData()),0,1);
|
|
||||||
log_menu->insertItem(tr("STOP Transition"),this,SLOT(stopData()),0,2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogListView::aboutToShowData()
|
|
||||||
{
|
|
||||||
RDListViewItem *item=(RDListViewItem *)selectedItem();
|
|
||||||
log_menu->setItemEnabled(0,item->line()!=TRACKER_MAX_LINENO);
|
|
||||||
log_menu->setItemEnabled(1,item->line()!=TRACKER_MAX_LINENO);
|
|
||||||
log_menu->setItemEnabled(2,item->line()!=TRACKER_MAX_LINENO);
|
|
||||||
log_transition_type=item->text(2).lower();
|
|
||||||
log_menu->setItemChecked(0,log_transition_type==tr("play"));
|
|
||||||
log_menu->setItemChecked(1,log_transition_type==tr("segue"));
|
|
||||||
log_menu->setItemChecked(2,log_transition_type==tr("stop"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogListView::playData()
|
|
||||||
{
|
|
||||||
if(log_transition_type=="play") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
emit transitionChanged(((RDListViewItem *)selectedItem())->line(),
|
|
||||||
RDLogLine::Play);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogListView::segueData()
|
|
||||||
{
|
|
||||||
if(log_transition_type=="segue") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
emit transitionChanged(((RDListViewItem *)selectedItem())->line(),
|
|
||||||
RDLogLine::Segue);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogListView::stopData()
|
|
||||||
{
|
|
||||||
if(log_transition_type=="stop") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
emit transitionChanged(((RDListViewItem *)selectedItem())->line(),
|
|
||||||
RDLogLine::Stop);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogListView::contentsMousePressEvent(QMouseEvent *e)
|
|
||||||
{
|
|
||||||
Q3ListView::contentsMousePressEvent(e);
|
|
||||||
log_menu_item=(RDListViewItem *)selectedItem();
|
|
||||||
switch(e->button()) {
|
|
||||||
case Qt::RightButton:
|
|
||||||
log_menu->setGeometry(e->globalX(),e->globalY(),
|
|
||||||
log_menu->sizeHint().width(),
|
|
||||||
log_menu->sizeHint().height());
|
|
||||||
|
|
||||||
log_menu->exec();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
e->ignore();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
// log_listview.h
|
|
||||||
//
|
|
||||||
// The Log ListView widget for RDLogEdit.
|
|
||||||
//
|
|
||||||
// (C) Copyright 2002-2006,2016 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
|
|
||||||
// published by the Free Software Foundation.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public
|
|
||||||
// License along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef LOG_LISTVIEW_H
|
|
||||||
#define LOG_LISTVIEW_H
|
|
||||||
|
|
||||||
#include <q3listview.h>
|
|
||||||
#include <qpixmap.h>
|
|
||||||
#include <q3popupmenu.h>
|
|
||||||
//Added by qt3to4:
|
|
||||||
#include <QMouseEvent>
|
|
||||||
|
|
||||||
#include <rdlistview.h>
|
|
||||||
#include <rdlog_event.h>
|
|
||||||
#include <rdlog_line.h>
|
|
||||||
|
|
||||||
#define TRACKER_MAX_LINENO 2147483647
|
|
||||||
|
|
||||||
class LogListView : public RDListView
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
LogListView(QWidget *parent);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void aboutToShowData();
|
|
||||||
void playData();
|
|
||||||
void segueData();
|
|
||||||
void stopData();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void transitionChanged(int line,RDLogLine::TransType trans);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void contentsMousePressEvent(QMouseEvent *e);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Q3PopupMenu *log_menu;
|
|
||||||
RDListViewItem *log_menu_item;
|
|
||||||
QWidget *log_parent;
|
|
||||||
QString log_transition_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // LOG_LISTVIEW_H
|
|
@ -30,7 +30,6 @@ SOURCES += edit_log.cpp
|
|||||||
SOURCES += edit_logline.cpp
|
SOURCES += edit_logline.cpp
|
||||||
SOURCES += edit_marker.cpp
|
SOURCES += edit_marker.cpp
|
||||||
SOURCES += edit_track.cpp
|
SOURCES += edit_track.cpp
|
||||||
SOURCES += list_listviewitem.cpp
|
|
||||||
SOURCES += list_reports.cpp
|
SOURCES += list_reports.cpp
|
||||||
SOURCES += logmodel.cpp
|
SOURCES += logmodel.cpp
|
||||||
SOURCES += logtableview.cpp
|
SOURCES += logtableview.cpp
|
||||||
@ -45,7 +44,6 @@ HEADERS += edit_logline.h
|
|||||||
HEADERS += edit_marker.h
|
HEADERS += edit_marker.h
|
||||||
HEADERS += edit_track.h
|
HEADERS += edit_track.h
|
||||||
HEADERS += globals.h
|
HEADERS += globals.h
|
||||||
HEADERS += list_listviewitem.h
|
|
||||||
HEADERS += list_reports.h
|
HEADERS += list_reports.h
|
||||||
HEADERS += logmodel.h
|
HEADERS += logmodel.h
|
||||||
HEADERS += logtableview.h
|
HEADERS += logtableview.h
|
||||||
|
@ -3161,7 +3161,7 @@ void VoiceTracker::DrawCursor(RDWavePainter *wp,int height,int xpos,
|
|||||||
if(left_arrow) {
|
if(left_arrow) {
|
||||||
arrow_x=-8;
|
arrow_x=-8;
|
||||||
}
|
}
|
||||||
Q3PointArray *pa=new Q3PointArray(3);
|
QPolygon *pa=new QPolygon(3);
|
||||||
pa->setPoint(0,xpos,arrow_offset);
|
pa->setPoint(0,xpos,arrow_offset);
|
||||||
pa->setPoint(1,xpos+arrow_x,arrow_offset-5);
|
pa->setPoint(1,xpos+arrow_x,arrow_offset-5);
|
||||||
pa->setPoint(2,xpos+arrow_x,arrow_offset+5);
|
pa->setPoint(2,xpos+arrow_x,arrow_offset+5);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user