2016-03-25 Fred Gleason <fredg@paravelsystems.com>

* Added a 'Show Only Recent Logs' checkbox in 'rdlogedit/rdlogedit.cpp'
	and 'rdlogedit/rdlogedit.h'.
This commit is contained in:
Fred Gleason 2016-03-25 15:00:53 -04:00
parent 2a283a55eb
commit e656a4bb0a
13 changed files with 65 additions and 10 deletions

View File

@ -15028,3 +15028,6 @@
* Fixed a regression in 'rdlibrary/audio_cart.cpp' that caused
information to be corrupted in the cut list after editing a cut's
dayparting information.
2016-03-25 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Show Only Recent Logs' checkbox in 'rdlogedit/rdlogedit.cpp'
and 'rdlogedit/rdlogedit.h'.

View File

@ -561,6 +561,11 @@
#define RDCARTSLOTS_MAX_ROWS 16
#define RDCARTSLOTS_MAX_COLUMNS 4
/*
* RDLogEdit Log Listing Limit Quantity
*/
#define RDLOGEDIT_LIMIT_QUAN 14
/*
* Custom MIME Types (for Drag and Drop)
*/

View File

@ -2,9 +2,7 @@
//
// Edit a Rivendell Log
//
// (C) Copyright 2002-2008 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_log.cpp,v 1.91.6.10.2.2 2014/05/22 16:12:54 cvs Exp $
// (C) Copyright 2002-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

View File

@ -2,9 +2,7 @@
//
// Create a Rivendell Log
//
// (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: edit_log.h,v 1.36.8.2 2014/02/20 16:33:55 cvs Exp $
// (C) Copyright 2002-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

View File

@ -288,6 +288,15 @@ MainWidget::MainWidget(QWidget *parent,const char *name,WFlags f)
log_filter_button->setFont(button_font);
connect(log_filter_button,SIGNAL(clicked()),this,SLOT(filterClearedData()));
//
// Show Recent Checkbox
//
log_recent_check=new QCheckBox(this);
connect(log_recent_check,SIGNAL(toggled(bool)),this,SLOT(recentData(bool)));
log_recent_label=
new QLabel(log_recent_check,tr("Show Only Recent Logs"),this);
log_recent_label->setFont(button_font);
//
// Log List
//
@ -433,6 +442,12 @@ void MainWidget::userData()
}
void MainWidget::recentData(bool state)
{
RefreshList();
}
void MainWidget::addData()
{
QString logname;
@ -730,7 +745,9 @@ void MainWidget::resizeEvent(QResizeEvent *e)
log_filter_label->setGeometry(230,10,50,20);
log_filter_edit->setGeometry(285,10,size().width()-360,20);
log_filter_button->setGeometry(size().width()-60,8,50,25);
log_log_list->setGeometry(10,37,size().width()-20,size().height()-107);
log_recent_check->setGeometry(285,35,15,15);
log_recent_label->setGeometry(305,33,200,20);
log_log_list->setGeometry(10,57,size().width()-20,size().height()-127);
log_add_button->setGeometry(10,size().height()-55,80,50);
log_edit_button->setGeometry(100,size().height()-55,80,50);
log_delete_button->setGeometry(190,size().height()-55,80,50);
@ -832,6 +849,10 @@ void MainWidget::RefreshList()
sql+="(DESCRIPTION like \"%%"+RDEscapeString(filter)+"%%\")||";
sql+="(SERVICE like \"%%"+RDEscapeString(filter)+"%%\"))";
}
if(log_recent_check->isChecked()) {
sql+=QString().sprintf("order by ORIGIN_DATETIME desc limit %d",
RDLOGEDIT_LIMIT_QUAN);
}
if (rdstation_conf->broadcastSecurity() == RDStation::UserSec
&& rduser != NULL) {

View File

@ -2,9 +2,7 @@
//
// The Log Editor Utility for Rivendell.
//
// (C) Copyright 2002-2003 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: rdlogedit.h,v 1.28.4.1 2014/01/08 23:32:50 cvs Exp $
// (C) Copyright 2002-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
@ -30,6 +28,7 @@
#include <qsize.h>
#include <qsizepolicy.h>
#include <qsqldatabase.h>
#include <qcheckbox.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qpushbutton.h>
@ -56,6 +55,7 @@ class MainWidget : public QMainWindow
private slots:
void connectedData(bool state);
void userData();
void recentData(bool state);
void addData();
void editData();
void deleteData();
@ -83,6 +83,8 @@ class MainWidget : public QMainWindow
QLabel *log_filter_label;
QLineEdit *log_filter_edit;
QPushButton *log_filter_button;
QCheckBox *log_recent_check;
QLabel *log_recent_label;
QListView *log_log_list;
std::vector<RDLogLine> log_clipboard;
QPushButton *log_add_button;

View File

@ -875,6 +875,10 @@ Vyhledejte svého správce systému kvůli aktualizaci!</translation>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Only Recent Logs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceTracker</name>

View File

@ -874,6 +874,10 @@ See your system administrator for an update!</source>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Only Recent Logs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceTracker</name>

View File

@ -875,6 +875,10 @@ See your system administrator for an update!</source>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Only Recent Logs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceTracker</name>

View File

@ -852,6 +852,10 @@ See your system administrator for an update!</source>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Only Recent Logs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceTracker</name>

View File

@ -896,6 +896,10 @@ See your system administrator for an update!</source>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Only Recent Logs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceTracker</name>

View File

@ -896,6 +896,10 @@ See your system administrator for an update!</source>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Only Recent Logs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceTracker</name>

View File

@ -875,6 +875,10 @@ See your system administrator for an update!</source>
<source>Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Only Recent Logs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>VoiceTracker</name>