diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /src/pmchart/tab.h | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'src/pmchart/tab.h')
-rw-r--r-- | src/pmchart/tab.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/pmchart/tab.h b/src/pmchart/tab.h new file mode 100644 index 0000000..a9bc0f5 --- /dev/null +++ b/src/pmchart/tab.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2006-2008, Aconex. All Rights Reserved. + * Copyright (c) 2006, Ken McDonell. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * 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. + */ +#ifndef TAB_H +#define TAB_H + +#include <QtCore/QList> +#include <QtGui/QSplitter> +#include <QtGui/QTabWidget> +#include "groupcontrol.h" +#include "gadget.h" + +class PmLogger; + +class Tab : public QWidget +{ + Q_OBJECT + +public: + Tab(); + void init(QTabWidget *, GroupControl *, QString); + QWidget *splitter() { return my.splitter; } + GroupControl *group() { return my.group; } + bool isArchiveSource(); // query if tab is for archives + + void addGadget(Gadget *); // append gadget to the Tab, make it current + int deleteCurrent(); // remove current gadget, return new current + int deleteGadget(Gadget *); // remove given gadget, return current index + int deleteGadget(int); // remove 'N'th gadget, return current index + + int gadgetCount(); // count of entries in the list of gadgets + Gadget *gadget(int); // gadget at specified list position + Gadget *currentGadget(); // current gadget (can be NULL) + void setCurrent(Gadget *); + int currentGadgetIndex(); // current gadget index (can be -1) + void setCurrentGadget(int); + + void showGadgets(); + + void addFolio(QString, QString); + void addLogger(PmLogger *, QString); + + bool isRecording(); + bool startRecording(); + void queryRecording(); + void stopRecording(); + void detachLoggers(); + +private: + void cleanupRecording(); + + struct { + QSplitter *splitter; // dynamically divides charts + + GroupControl *group; + QList<Gadget*> gadgetsList; + int currentGadget; + + bool recording; // running any pmlogger's? + QString view; + QString folio; + QList<QString> archiveList; // list of archive names + QList<PmLogger*> loggerList; // list of pmloggers for our Tab + } my; +}; + +#endif // TAB_H |