mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 22:48:01 +02:00
2020-12-15 Fred Gleason <fredg@paravelsystems.com>
* Modified rdcastmanager(1) to use the standard log model. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
355cad9d23
commit
15b4517f55
@ -20696,3 +20696,5 @@
|
|||||||
* Fixed a regression in rdlogedit(1)'s 'Edit Log' dialog that
|
* Fixed a regression in rdlogedit(1)'s 'Edit Log' dialog that
|
||||||
could delay updating cart status indications when changing the
|
could delay updating cart status indications when changing the
|
||||||
logs owning service.
|
logs owning service.
|
||||||
|
2020-12-15 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified rdcastmanager(1) to use the standard log model.
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include "rdlogmodel.h"
|
#include "rdlogmodel.h"
|
||||||
|
|
||||||
RDLogModel::RDLogModel(const QString &logname,QObject *parent)
|
RDLogModel::RDLogModel(const QString &logname,bool read_only,QObject *parent)
|
||||||
: QAbstractTableModel(parent)
|
: QAbstractTableModel(parent)
|
||||||
{
|
{
|
||||||
d_fms=NULL;
|
d_fms=NULL;
|
||||||
@ -36,6 +36,7 @@ RDLogModel::RDLogModel(const QString &logname,QObject *parent)
|
|||||||
d_start_time_style=RDLogModel::Scheduled;
|
d_start_time_style=RDLogModel::Scheduled;
|
||||||
|
|
||||||
d_log_name=logname;
|
d_log_name=logname;
|
||||||
|
d_read_only=read_only;
|
||||||
d_max_id=0;
|
d_max_id=0;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -140,6 +141,9 @@ int RDLogModel::columnCount(const QModelIndex &parent) const
|
|||||||
|
|
||||||
int RDLogModel::rowCount(const QModelIndex &parent) const
|
int RDLogModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
|
if(d_read_only) {
|
||||||
|
return lineCount();
|
||||||
|
}
|
||||||
return 1+lineCount();
|
return 1+lineCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class RDLogModel : public QAbstractTableModel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
enum StartTimeStyle {Estimated=0,Scheduled=1};
|
enum StartTimeStyle {Estimated=0,Scheduled=1};
|
||||||
RDLogModel(const QString &logname,QObject *parent=0);
|
RDLogModel(const QString &logname,bool read_only,QObject *parent=0);
|
||||||
~RDLogModel();
|
~RDLogModel();
|
||||||
QPalette palette();
|
QPalette palette();
|
||||||
void setPalette(const QPalette &pal);
|
void setPalette(const QPalette &pal);
|
||||||
@ -46,10 +46,6 @@ class RDLogModel : public QAbstractTableModel
|
|||||||
QVariant headerData(int section,Qt::Orientation orient,
|
QVariant headerData(int section,Qt::Orientation orient,
|
||||||
int role=Qt::DisplayRole) const;
|
int role=Qt::DisplayRole) const;
|
||||||
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
||||||
|
|
||||||
//
|
|
||||||
// From RDLogEvent
|
|
||||||
//
|
|
||||||
bool exists();
|
bool exists();
|
||||||
bool exists(int line);
|
bool exists(int line);
|
||||||
bool exists(const QTime &hard_time,int except_line=-1);
|
bool exists(const QTime &hard_time,int except_line=-1);
|
||||||
@ -113,6 +109,7 @@ class RDLogModel : public QAbstractTableModel
|
|||||||
QString d_log_name;
|
QString d_log_name;
|
||||||
QString d_service_name;
|
QString d_service_name;
|
||||||
int d_max_id;
|
int d_max_id;
|
||||||
|
bool d_read_only;
|
||||||
QList<RDLogLine *> d_log_lines;
|
QList<RDLogLine *> d_log_lines;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -46,14 +46,12 @@ dist_rdcastmanager_SOURCES = edit_cast.cpp edit_cast.h\
|
|||||||
globals.h\
|
globals.h\
|
||||||
list_casts.cpp list_casts.h\
|
list_casts.cpp list_casts.h\
|
||||||
logdialog.cpp logdialog.h\
|
logdialog.cpp logdialog.h\
|
||||||
logmodel.cpp logmodel.h\
|
|
||||||
rdcastmanager.cpp rdcastmanager.h\
|
rdcastmanager.cpp rdcastmanager.h\
|
||||||
render_dialog.cpp render_dialog.h
|
render_dialog.cpp render_dialog.h
|
||||||
|
|
||||||
nodist_rdcastmanager_SOURCES = moc_edit_cast.cpp\
|
nodist_rdcastmanager_SOURCES = moc_edit_cast.cpp\
|
||||||
moc_list_casts.cpp\
|
moc_list_casts.cpp\
|
||||||
moc_logdialog.cpp\
|
moc_logdialog.cpp\
|
||||||
moc_logmodel.cpp\
|
|
||||||
moc_rdcastmanager.cpp\
|
moc_rdcastmanager.cpp\
|
||||||
moc_render_dialog.cpp
|
moc_render_dialog.cpp
|
||||||
|
|
||||||
|
@ -308,14 +308,14 @@ void ListCasts::addLogData()
|
|||||||
|
|
||||||
RDListLogs *d=new RDListLogs(&logname,RDLogFilter::UserFilter,this);
|
RDListLogs *d=new RDListLogs(&logname,RDLogFilter::UserFilter,this);
|
||||||
if(d->exec()) {
|
if(d->exec()) {
|
||||||
RDLogEvent *log=new RDLogEvent(logname);
|
RDLogModel *model=new RDLogModel(logname,true,this);
|
||||||
log->load();
|
model->load();
|
||||||
QTime start_time;
|
QTime start_time;
|
||||||
bool ignore_stops=true;
|
bool ignore_stops=true;
|
||||||
int start_line=0;
|
int start_line=0;
|
||||||
int end_line=log->size()-1;
|
int end_line=model->lineCount()-1;
|
||||||
|
|
||||||
if(list_render_dialog->exec(log,&start_time,&ignore_stops,
|
if(list_render_dialog->exec(model,&start_time,&ignore_stops,
|
||||||
&start_line,&end_line)) {
|
&start_line,&end_line)) {
|
||||||
if((cast_id=list_feed->postLog(logname,start_time,ignore_stops,
|
if((cast_id=list_feed->postLog(logname,start_time,ignore_stops,
|
||||||
start_line,end_line,&err))!=0) {
|
start_line,end_line,&err))!=0) {
|
||||||
@ -337,11 +337,11 @@ void ListCasts::addLogData()
|
|||||||
QMessageBox::warning(this,"RDCastManager - "+tr("Posting Error"),
|
QMessageBox::warning(this,"RDCastManager - "+tr("Posting Error"),
|
||||||
RDFeed::errorString(err));
|
RDFeed::errorString(err));
|
||||||
delete d;
|
delete d;
|
||||||
delete log;
|
delete model;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete log;
|
delete model;
|
||||||
}
|
}
|
||||||
else { // Render dialog was canceled!
|
else { // Render dialog was canceled!
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// logdialog.cpp
|
// logdialog.cpp
|
||||||
//
|
//
|
||||||
// Real-only lister dialogs for Rivendell logs
|
// Read-only log lister dialog for Rivendell
|
||||||
//
|
//
|
||||||
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
@ -36,9 +36,7 @@ LogDialog::LogDialog(QWidget *parent)
|
|||||||
d_log_view->setShowGrid(false);
|
d_log_view->setShowGrid(false);
|
||||||
d_log_view->setSortingEnabled(false);
|
d_log_view->setSortingEnabled(false);
|
||||||
d_log_view->setWordWrap(false);
|
d_log_view->setWordWrap(false);
|
||||||
d_log_model=new LogModel(this);
|
d_model=NULL;
|
||||||
d_log_model->setFont(font());
|
|
||||||
d_log_view->setModel(d_log_model);
|
|
||||||
|
|
||||||
d_ok_button=new QPushButton(tr("OK"),this);
|
d_ok_button=new QPushButton(tr("OK"),this);
|
||||||
d_ok_button->setFont(buttonFont());
|
d_ok_button->setFont(buttonFont());
|
||||||
@ -52,6 +50,9 @@ LogDialog::LogDialog(QWidget *parent)
|
|||||||
|
|
||||||
LogDialog::~LogDialog()
|
LogDialog::~LogDialog()
|
||||||
{
|
{
|
||||||
|
if(d_model!=NULL) {
|
||||||
|
delete d_model;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -61,21 +62,23 @@ QSize LogDialog::sizeHint() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LogDialog::exec(RDLogEvent *log,int *start_line,int *end_line)
|
int LogDialog::exec(RDLogModel *model,int *start_line,int *end_line)
|
||||||
{
|
{
|
||||||
QItemSelection item_sel;
|
QItemSelection item_sel;
|
||||||
QItemSelectionModel *sel=NULL;
|
QItemSelectionModel *sel=NULL;
|
||||||
|
|
||||||
d_log_model->setLogEvent(log);
|
d_model=model;
|
||||||
|
d_model->setFont(font());
|
||||||
|
d_log_view->setModel(d_model);
|
||||||
|
|
||||||
d_log_view->resizeColumnsToContents();
|
d_log_view->resizeColumnsToContents();
|
||||||
|
|
||||||
sel=d_log_view->selectionModel();
|
sel=d_log_view->selectionModel();
|
||||||
sel->reset();
|
sel->reset();
|
||||||
item_sel.select(d_log_model->index(*start_line,0),
|
item_sel.select(d_model->index(*start_line,0),
|
||||||
d_log_model->index(*end_line,d_log_model->columnCount()-1));
|
d_model->index(*end_line,d_model->columnCount()-1));
|
||||||
sel->select(item_sel,QItemSelectionModel::SelectCurrent);
|
sel->select(item_sel,QItemSelectionModel::SelectCurrent);
|
||||||
|
|
||||||
d_log=log;
|
|
||||||
d_start_line=start_line;
|
d_start_line=start_line;
|
||||||
d_end_line=end_line;
|
d_end_line=end_line;
|
||||||
|
|
||||||
@ -93,7 +96,6 @@ void LogDialog::okData()
|
|||||||
}
|
}
|
||||||
*d_start_line=list.first().row();
|
*d_start_line=list.first().row();
|
||||||
*d_end_line=list.last().row();
|
*d_end_line=list.last().row();
|
||||||
d_log_model->clearLogEvent();
|
|
||||||
|
|
||||||
done(true);
|
done(true);
|
||||||
}
|
}
|
||||||
@ -101,8 +103,6 @@ void LogDialog::okData()
|
|||||||
|
|
||||||
void LogDialog::cancelData()
|
void LogDialog::cancelData()
|
||||||
{
|
{
|
||||||
d_log_model->clearLogEvent();
|
|
||||||
|
|
||||||
done(false);
|
done(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// logdialog.h
|
// logdialog.h
|
||||||
//
|
//
|
||||||
// Real-only lister dialogs for Rivendell logs
|
// Read-only log lister dialog for Rivendell
|
||||||
//
|
//
|
||||||
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2020 Fred Gleason <fredg@paravelsystems.com>
|
||||||
//
|
//
|
||||||
@ -25,9 +25,7 @@
|
|||||||
#include <qtableview.h>
|
#include <qtableview.h>
|
||||||
|
|
||||||
#include <rddialog.h>
|
#include <rddialog.h>
|
||||||
#include <rdlog_event.h>
|
#include <rdlogmodel.h>
|
||||||
|
|
||||||
#include "logmodel.h"
|
|
||||||
|
|
||||||
class LogDialog : public RDDialog
|
class LogDialog : public RDDialog
|
||||||
{
|
{
|
||||||
@ -38,7 +36,7 @@ class LogDialog : public RDDialog
|
|||||||
QSize sizeHint() const;
|
QSize sizeHint() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
int exec(RDLogEvent *log,int *start_line,int *end_line);
|
int exec(RDLogModel *model,int *start_line,int *end_line);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void okData();
|
void okData();
|
||||||
@ -51,11 +49,10 @@ class LogDialog : public RDDialog
|
|||||||
QTableView *d_log_view;
|
QTableView *d_log_view;
|
||||||
QPushButton *d_ok_button;
|
QPushButton *d_ok_button;
|
||||||
QPushButton *d_cancel_button;
|
QPushButton *d_cancel_button;
|
||||||
LogModel *d_log_model;
|
RDLogModel *d_model;
|
||||||
RDLogEvent *d_log;
|
|
||||||
int *d_start_line;
|
int *d_start_line;
|
||||||
int *d_end_line;
|
int *d_end_line;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // LIST_CASTS_H
|
#endif // LOGDIALOG_H
|
||||||
|
@ -1,246 +0,0 @@
|
|||||||
// logmodel.cpp
|
|
||||||
//
|
|
||||||
// Read-only data model for Rivendell logs
|
|
||||||
//
|
|
||||||
// (C) Copyright 2020 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 <stdio.h>
|
|
||||||
|
|
||||||
#include <rdescape_string.h>
|
|
||||||
#include <rdlog_line.h>
|
|
||||||
|
|
||||||
#include "logmodel.h"
|
|
||||||
|
|
||||||
LogModel::LogModel(QObject *parent)
|
|
||||||
: QAbstractTableModel(parent)
|
|
||||||
{
|
|
||||||
d_log=NULL;
|
|
||||||
d_fms=NULL;
|
|
||||||
d_bold_fms=NULL;
|
|
||||||
d_log_icons=new RDLogIcons();
|
|
||||||
|
|
||||||
//
|
|
||||||
// Column Attributes
|
|
||||||
//
|
|
||||||
unsigned left=Qt::AlignLeft|Qt::AlignVCenter;
|
|
||||||
unsigned center=Qt::AlignCenter;
|
|
||||||
unsigned right=Qt::AlignRight|Qt::AlignVCenter;
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Start Time"));
|
|
||||||
d_alignments.push_back(right);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Trans"));
|
|
||||||
d_alignments.push_back(center);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Cart"));
|
|
||||||
d_alignments.push_back(center);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Group"));
|
|
||||||
d_alignments.push_back(center);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Length"));
|
|
||||||
d_alignments.push_back(right);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Title"));
|
|
||||||
d_alignments.push_back(left);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Artist"));
|
|
||||||
d_alignments.push_back(left);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Client"));
|
|
||||||
d_alignments.push_back(left);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Agency"));
|
|
||||||
d_alignments.push_back(left);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Label"));
|
|
||||||
d_alignments.push_back(left);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Source"));
|
|
||||||
d_alignments.push_back(left);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Ext Data"));
|
|
||||||
d_alignments.push_back(left);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Line ID"));
|
|
||||||
d_alignments.push_back(right);
|
|
||||||
|
|
||||||
d_headers.push_back(tr("Count"));
|
|
||||||
d_alignments.push_back(right);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LogModel::~LogModel()
|
|
||||||
{
|
|
||||||
if(d_fms!=NULL) {
|
|
||||||
delete d_fms;
|
|
||||||
}
|
|
||||||
if(d_bold_fms!=NULL) {
|
|
||||||
delete d_bold_fms;
|
|
||||||
}
|
|
||||||
delete d_log_icons;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogModel::setLogEvent(RDLogEvent *log)
|
|
||||||
{
|
|
||||||
if(log->size()>0) {
|
|
||||||
beginInsertRows(QModelIndex(),0,log->size()-1);
|
|
||||||
endInsertRows();
|
|
||||||
}
|
|
||||||
d_log=log;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogModel::clearLogEvent()
|
|
||||||
{
|
|
||||||
if((d_log!=NULL)&&(d_log->size()>0)) {
|
|
||||||
beginRemoveRows(QModelIndex(),0,d_log->size()-1);
|
|
||||||
endRemoveRows();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LogModel::setFont(const QFont &font)
|
|
||||||
{
|
|
||||||
d_font=font;
|
|
||||||
if(d_fms!=NULL) {
|
|
||||||
delete d_fms;
|
|
||||||
}
|
|
||||||
d_fms=new QFontMetrics(d_font);
|
|
||||||
d_bold_font=font;
|
|
||||||
d_bold_font.setBold(true);
|
|
||||||
if(d_bold_fms!=NULL) {
|
|
||||||
delete d_bold_fms;
|
|
||||||
}
|
|
||||||
d_bold_fms=new QFontMetrics(d_bold_font);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int LogModel::columnCount(const QModelIndex &parent) const
|
|
||||||
{
|
|
||||||
return d_headers.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int LogModel::rowCount(const QModelIndex &parent) const
|
|
||||||
{
|
|
||||||
if(d_log==NULL) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return d_log->size();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QVariant LogModel::headerData(int section,Qt::Orientation orient,int role) const
|
|
||||||
{
|
|
||||||
if((orient==Qt::Horizontal)&&(role==Qt::DisplayRole)) {
|
|
||||||
return d_headers.at(section);
|
|
||||||
}
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QVariant LogModel::data(const QModelIndex &index,int role) const
|
|
||||||
{
|
|
||||||
QString str;
|
|
||||||
RDLogLine *ll=NULL;
|
|
||||||
int col=index.column();
|
|
||||||
int row=index.row();
|
|
||||||
|
|
||||||
if((ll=d_log->logLine(row))!=NULL) {
|
|
||||||
switch((Qt::ItemDataRole)role) {
|
|
||||||
case Qt::DisplayRole:
|
|
||||||
switch(index.column()) {
|
|
||||||
case 0: // Start Time
|
|
||||||
return ll->startTimeText();
|
|
||||||
|
|
||||||
case 1: // Transition
|
|
||||||
return RDLogLine::transText(ll->transType());
|
|
||||||
|
|
||||||
case 2: // Cart Number
|
|
||||||
return ll->cartNumberText();
|
|
||||||
|
|
||||||
case 3: // Group
|
|
||||||
return ll->groupName();
|
|
||||||
|
|
||||||
case 4: // Length
|
|
||||||
return ll->forcedLengthText();
|
|
||||||
|
|
||||||
case 5: // Title
|
|
||||||
return ll->titleText();
|
|
||||||
|
|
||||||
case 6: // Artist
|
|
||||||
return ll->artist();
|
|
||||||
|
|
||||||
case 7: // Client
|
|
||||||
return ll->client();
|
|
||||||
|
|
||||||
case 8: // Agency
|
|
||||||
return ll->agency();
|
|
||||||
|
|
||||||
case 9: // Label
|
|
||||||
return ll->markerLabel();
|
|
||||||
|
|
||||||
case 10: // Source
|
|
||||||
return RDLogLine::sourceText(ll->source());
|
|
||||||
|
|
||||||
case 11: // Ext Data
|
|
||||||
return ll->extData();
|
|
||||||
|
|
||||||
case 12: // Line ID
|
|
||||||
return QString().sprintf("%d",ll->id());
|
|
||||||
|
|
||||||
case 13: // Count
|
|
||||||
return QString().sprintf("%d",row);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Qt::DecorationRole:
|
|
||||||
if(col==0) {
|
|
||||||
return d_log_icons->typeIcon(ll->type(),ll->source());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Qt::FontRole:
|
|
||||||
if(col==3) {
|
|
||||||
return d_bold_font;
|
|
||||||
}
|
|
||||||
return d_font;
|
|
||||||
|
|
||||||
case Qt::TextColorRole:
|
|
||||||
switch(col) {
|
|
||||||
case 0:
|
|
||||||
if(ll->timeType()==RDLogLine::Hard) {
|
|
||||||
return Qt::blue;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
return ll->groupColor();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Qt::TextAlignmentRole:
|
|
||||||
return d_alignments.at(col);
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
@ -1,59 +0,0 @@
|
|||||||
// logmodel.h
|
|
||||||
//
|
|
||||||
// Read-only data model for Rivendell logs
|
|
||||||
//
|
|
||||||
// (C) Copyright 2020 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 LOGMODEL_H
|
|
||||||
#define LOGMODEL_H
|
|
||||||
|
|
||||||
#include <QAbstractTableModel>
|
|
||||||
#include <qfont.h>
|
|
||||||
#include <qfontmetrics.h>
|
|
||||||
#include <qlist.h>
|
|
||||||
|
|
||||||
#include <rdlog_event.h>
|
|
||||||
#include <rdlog_icons.h>
|
|
||||||
|
|
||||||
class LogModel : public QAbstractTableModel
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
LogModel(QObject *parent=0);
|
|
||||||
~LogModel();
|
|
||||||
void setLogEvent(RDLogEvent *log);
|
|
||||||
void clearLogEvent();
|
|
||||||
void setFont(const QFont &font);
|
|
||||||
int columnCount(const QModelIndex &parent=QModelIndex()) const;
|
|
||||||
int rowCount(const QModelIndex &parent=QModelIndex()) const;
|
|
||||||
QVariant headerData(int section,Qt::Orientation orient,
|
|
||||||
int role=Qt::DisplayRole) const;
|
|
||||||
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
RDLogEvent *d_log;
|
|
||||||
QFont d_font;
|
|
||||||
QFontMetrics *d_fms;
|
|
||||||
QFont d_bold_font;
|
|
||||||
QFontMetrics *d_bold_fms;
|
|
||||||
QList<QVariant> d_headers;
|
|
||||||
QList<QVariant> d_alignments;
|
|
||||||
RDLogIcons *d_log_icons;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // LOGMODEL_H
|
|
@ -27,7 +27,6 @@
|
|||||||
SOURCES += edit_cast.cpp
|
SOURCES += edit_cast.cpp
|
||||||
SOURCES += list_casts.cpp
|
SOURCES += list_casts.cpp
|
||||||
SOURCES += logdialog.cpp
|
SOURCES += logdialog.cpp
|
||||||
SOURCES += logmodel.cpp
|
|
||||||
SOURCES += pick_report_dates.cpp
|
SOURCES += pick_report_dates.cpp
|
||||||
SOURCES += rdcastmanager.cpp
|
SOURCES += rdcastmanager.cpp
|
||||||
SOURCES += render_dialog.cpp
|
SOURCES += render_dialog.cpp
|
||||||
@ -35,7 +34,6 @@ SOURCES += render_dialog.cpp
|
|||||||
HEADERS += edit_cast.h
|
HEADERS += edit_cast.h
|
||||||
HEADERS += list_casts.h
|
HEADERS += list_casts.h
|
||||||
HEADERS += logdialog.h
|
HEADERS += logdialog.h
|
||||||
HEADERS += logmodel.h
|
|
||||||
HEADERS += pick_report_dates.h
|
HEADERS += pick_report_dates.h
|
||||||
HEADERS += rdcastmanager.h
|
HEADERS += rdcastmanager.h
|
||||||
HEADERS += render_dialog.h
|
HEADERS += render_dialog.h
|
||||||
|
@ -448,61 +448,13 @@ Log</source>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LogModel</name>
|
<name>LogModel</name>
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Trans</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Název</translation>
|
<translation type="obsolete">Název</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Artist</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Group</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation type="unfinished">Délka</translation>
|
<translation type="obsolete">Délka</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Client</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Agency</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Label</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Source</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Ext Data</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Count</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -433,61 +433,13 @@ Log</source>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LogModel</name>
|
<name>LogModel</name>
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Trans</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Titel</translation>
|
<translation type="obsolete">Titel</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Artist</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Group</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation type="unfinished">Länge</translation>
|
<translation type="obsolete">Länge</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Client</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Agency</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Label</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Source</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Ext Data</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Count</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -388,61 +388,13 @@ Log</source>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LogModel</name>
|
<name>LogModel</name>
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Trans</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Título</translation>
|
<translation type="obsolete">Título</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Artist</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Group</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation type="unfinished">Longitud</translation>
|
<translation type="obsolete">Longitud</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Client</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Agency</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Label</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Source</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Ext Data</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Count</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -282,65 +282,6 @@ Log</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>LogModel</name>
|
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Trans</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Title</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Artist</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Group</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Length</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Client</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Agency</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Label</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Source</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Ext Data</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Count</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>MainWidget</name>
|
<name>MainWidget</name>
|
||||||
<message>
|
<message>
|
||||||
|
@ -415,61 +415,13 @@ Log</source>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LogModel</name>
|
<name>LogModel</name>
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Trans</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Tittel</translation>
|
<translation type="obsolete">Tittel</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Artist</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Group</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation type="unfinished">Lengd</translation>
|
<translation type="obsolete">Lengd</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Client</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Agency</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Label</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Source</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Ext Data</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Count</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -415,61 +415,13 @@ Log</source>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LogModel</name>
|
<name>LogModel</name>
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Trans</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Tittel</translation>
|
<translation type="obsolete">Tittel</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Artist</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Group</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation type="unfinished">Lengd</translation>
|
<translation type="obsolete">Lengd</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Client</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Agency</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Label</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Source</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Ext Data</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Count</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -393,61 +393,13 @@ Log</source>
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LogModel</name>
|
<name>LogModel</name>
|
||||||
<message>
|
|
||||||
<source>Start Time</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Trans</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<translation type="unfinished">Título</translation>
|
<translation type="obsolete">Título</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Artist</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Cart</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Group</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Length</source>
|
<source>Length</source>
|
||||||
<translation type="unfinished">Duração</translation>
|
<translation type="obsolete">Duração</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Client</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Agency</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Label</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Source</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Ext Data</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Line ID</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Count</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -120,10 +120,10 @@ QSize RenderDialog::sizeHint() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int RenderDialog::exec(RDLogEvent *log,QTime *start_time,
|
int RenderDialog::exec(RDLogModel *model,QTime *start_time,
|
||||||
bool *ignore_stops,int *start_line,int *end_line)
|
bool *ignore_stops,int *start_line,int *end_line)
|
||||||
{
|
{
|
||||||
d_log=log;
|
d_model=model;
|
||||||
d_start_time=start_time;
|
d_start_time=start_time;
|
||||||
d_start_time_edit->setDisabled(start_time->isNull());
|
d_start_time_edit->setDisabled(start_time->isNull());
|
||||||
d_start_time_box->setCurrentIndex(0);
|
d_start_time_box->setCurrentIndex(0);
|
||||||
@ -152,7 +152,8 @@ void RenderDialog::startTimeActivatedData(int n)
|
|||||||
|
|
||||||
void RenderDialog::selectData()
|
void RenderDialog::selectData()
|
||||||
{
|
{
|
||||||
if(d_log_dialog->exec(d_log,&d_modified_start_line,&d_modified_end_line)) {
|
if(d_log_dialog->
|
||||||
|
exec(d_model,&d_modified_start_line,&d_modified_end_line)) {
|
||||||
UpdateLogEventsSelection();
|
UpdateLogEventsSelection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -206,7 +207,8 @@ void RenderDialog::resizeEvent(QResizeEvent *e)
|
|||||||
|
|
||||||
void RenderDialog::UpdateLogEventsSelection()
|
void RenderDialog::UpdateLogEventsSelection()
|
||||||
{
|
{
|
||||||
if((d_modified_start_line==0)&&(d_modified_end_line==(d_log->size()-1))) {
|
if((d_modified_start_line==0)&&(d_modified_end_line==
|
||||||
|
(d_model->lineCount()-1))) {
|
||||||
d_select_label->setText(tr("All lines"));
|
d_select_label->setText(tr("All lines"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <rdcut_dialog.h>
|
#include <rdcut_dialog.h>
|
||||||
#include <rddialog.h>
|
#include <rddialog.h>
|
||||||
#include <rdlog_event.h>
|
#include <rdlogmodel.h>
|
||||||
|
|
||||||
#include "logdialog.h"
|
#include "logdialog.h"
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ class RenderDialog : public RDDialog
|
|||||||
QSize sizeHint() const;
|
QSize sizeHint() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
int exec(RDLogEvent *log,QTime *start_time,bool *ignore_stops,
|
int exec(RDLogModel *model,QTime *start_time,bool *ignore_stops,
|
||||||
int *start_line,int *end_line);
|
int *start_line,int *end_line);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@ -70,17 +70,14 @@ class RenderDialog : public RDDialog
|
|||||||
QPushButton *d_select_button;
|
QPushButton *d_select_button;
|
||||||
QPushButton *d_ok_button;
|
QPushButton *d_ok_button;
|
||||||
QPushButton *d_cancel_button;
|
QPushButton *d_cancel_button;
|
||||||
|
|
||||||
LogDialog *d_log_dialog;
|
LogDialog *d_log_dialog;
|
||||||
|
|
||||||
int d_modified_start_line;
|
int d_modified_start_line;
|
||||||
int d_modified_end_line;
|
int d_modified_end_line;
|
||||||
|
|
||||||
QTime *d_start_time;
|
QTime *d_start_time;
|
||||||
bool *d_ignore_stops;
|
bool *d_ignore_stops;
|
||||||
int *d_start_line;
|
int *d_start_line;
|
||||||
int *d_end_line;
|
int *d_end_line;
|
||||||
RDLogEvent *d_log;
|
RDLogModel *d_model;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "logmodel.h"
|
#include "logmodel.h"
|
||||||
|
|
||||||
LogModel::LogModel(const QString &logname,QObject *parent)
|
LogModel::LogModel(const QString &logname,QObject *parent)
|
||||||
: RDLogModel(logname,parent)
|
: RDLogModel(logname,false,parent)
|
||||||
{
|
{
|
||||||
d_group_list=new RDGroupList();
|
d_group_list=new RDGroupList();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user