mirror of
				https://github.com/ElvishArtisan/rivendell.git
				synced 2025-11-04 08:04:12 +01:00 
			
		
		
		
	* Fixed bug where wrong ID was used for local maintenance * Updated ChangeLog * Added ability to run macros from cart list with "Run Macro" button * Updated ChangeLog * Updated translations * 2018-10-18 Fred Gleason <fredg@paravelsystems.com> * Tweaked the position of buttons on the bottom row of the main screen of rdlibrary(1). * Changed the minimum size of the main screen of rdlibrary to 850x600. * 2018-10-18 Fred Gleason <fredg@paravelsystems.com> * Fixed a regression in rdmaint(8) that broke cut rehashing. * 2018-10-19 Fred Gleason <fredg@paravelsystems.com> * Added code in the %post and %preun rules in 'rivendell.spec.in' to enable and disable the 'rivendell' service. * 2018-10-19 Fred Gleason <fredg@paravelsystems.com> * Modified rdservice(8) to log errors to syslog. * Added an rdservice(8) man page. * Modified 'systemd/rivendell.service.in' to enable automatic start retries. * 2018-10-19 Fred Gleason <fredg@paravelsystems.com> * Fixed a typo that broke generation of the rmlsend(1) man page. * 2018-10-19 Fred Gleason <fredg@paravelsystems.com> * Removed 'build_win32.bat'. * Removed all conditional compilation based on 'WIN32'. * 2018-10-19 Fred Gleason <fredg@paravelsystems.com> * Removed check for Win32 installer from 'configure.ac'. * Removed win32 clauses from '.pro' files.
		
			
				
	
	
		
			82 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			82 lines
		
	
	
		
			2.7 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
// rdgroup.h
 | 
						|
//
 | 
						|
// Abstract a Rivendell Service
 | 
						|
//
 | 
						|
//   (C) Copyright 2002-2018 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 <qsqldatabase.h>
 | 
						|
#include <qcolor.h>
 | 
						|
 | 
						|
#include <rdcart.h>
 | 
						|
 | 
						|
#ifndef RDGROUP_H
 | 
						|
#define RDGROUP_H
 | 
						|
 | 
						|
class RDGroup
 | 
						|
{
 | 
						|
 public:
 | 
						|
  enum ExportType {None=0,Traffic=1,Music=2};
 | 
						|
  RDGroup(QString name,bool create=false);
 | 
						|
  QString name() const;
 | 
						|
  bool exists() const;
 | 
						|
  QString description() const;
 | 
						|
  void setDescription(const QString &desc) const;
 | 
						|
  RDCart::Type defaultCartType() const;
 | 
						|
  void setDefaultCartType(RDCart::Type type) const;
 | 
						|
  unsigned defaultLowCart() const;
 | 
						|
  void setDefaultLowCart(unsigned cartnum) const;
 | 
						|
  unsigned defaultHighCart() const;
 | 
						|
  void setDefaultHighCart(unsigned cartnum) const;
 | 
						|
  int defaultCutLife() const;
 | 
						|
  void setDefaultCutLife(int days) const;
 | 
						|
  int cutShelflife() const;
 | 
						|
  void setCutShelflife(int days) const;
 | 
						|
  bool deleteEmptyCarts() const;
 | 
						|
  void setDeleteEmptyCarts(bool state) const;
 | 
						|
  QString defaultTitle() const;
 | 
						|
  void setDefaultTitle(const QString &str);
 | 
						|
  QString generateTitle(const QString &pathname);
 | 
						|
  bool enforceCartRange() const;
 | 
						|
  void setEnforceCartRange(bool state) const;
 | 
						|
  bool exportReport(ExportType type) const;
 | 
						|
  void setExportReport(ExportType type,bool state) const;
 | 
						|
  bool enableNowNext() const;
 | 
						|
  void setEnableNowNext(bool state) const;
 | 
						|
  QColor color() const;
 | 
						|
  void setColor(const QColor &color);
 | 
						|
  unsigned nextFreeCart(unsigned startcart=0) const;
 | 
						|
  int freeCartQuantity() const;
 | 
						|
  bool reserveCarts(std::vector<unsigned> *cart_nums,
 | 
						|
		    const QString &station_name,RDCart::Type type,
 | 
						|
		    unsigned quan) const;
 | 
						|
  bool cartNumberValid(unsigned cartnum) const;
 | 
						|
  QString xml() const;
 | 
						|
  
 | 
						|
 private:
 | 
						|
  unsigned GetNextFreeCart(unsigned startcart) const;
 | 
						|
  bool ReserveCart(const QString &station_name,RDCart::Type type,
 | 
						|
		   unsigned cart_num) const;
 | 
						|
  void SetRow(const QString ¶m,int value) const;
 | 
						|
  void SetRow(const QString ¶m,unsigned value) const;
 | 
						|
  void SetRow(const QString ¶m,const QString &value) const;
 | 
						|
  QString ReportField(ExportType type) const;
 | 
						|
  QString group_name;
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
#endif  // RDGROUP_H
 |