00001 /***************************************************************************** 00002 ** $Id: qts_table.h,v 1.1 2002/06/14 08:19:17 andrew23 Exp $ 00003 ** 00004 ** This is part of the QCad GUI 00005 ** Copyright (C) 2001 Andrew Mustun 00006 ** 00007 ** This program is free software; you can redistribute it and/or modify 00008 ** it under the terms of the GNU General Public License (version 2) as 00009 ** published by the Free Software Foundation. 00010 ** 00011 ** This program is distributed in the hope that it will be useful, 00012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 ** GNU General Public License for more details. 00015 ** 00016 ** You should have received a copy of the GNU General Public License 00017 ** along with this program; if not, write to the Free Software 00018 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 ******************************************************************************/ 00020 00021 #ifndef QTS_TABLE_H 00022 #define QTS_TABLE_H 00023 00024 #include <qobject.h> 00025 #include <qptrlist.h> 00026 00027 #include "qts_record.h" 00028 00033 class QTS_Table : public QPtrList<QTS_Record> { 00034 public: 00035 enum QTS_RecordPeriod { MINUTE_1, MINUTE_5, 00036 MINUTE_10, MINUTE_15, 00037 MINUTE_30, 00038 HOUR_1, DAY_1, 00039 WEEK_1, MONTH_1, YEAR_1 }; 00040 00041 QTS_Table(); 00042 ~QTS_Table(); 00043 00044 bool load(const QString& filename); 00045 bool save(const QString& filename); 00046 bool setRecordPeriod(const QString& info); 00047 00048 void complete(); 00049 int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2); 00050 00051 private: 00052 QTS_RecordPeriod recordPeriod; 00053 }; 00054 00055 #endif