MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrTapePreviewWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "ui_lgrTapePreviewWidgetUi.h"
12 #include <lgrGui/lgrGui.h>
13 #include <qdialog.h>
14 #include <qstring.h>
15 
16 class QWebView;
17 class QTextEdit;
18 
19 #define DtLgrPrvw_PROTOCOL_FLG 0x00000001
20 #define DtLgrPrvw_TIMEDATE_FLG 0x00000002
21 #define DtLgrPrvw_DURATION_FLG 0x00000004
22 #define DtLgrPrvw_FOMFILE_FLG 0x00000008
23 #define DtLgrPrvw_FOMMODS_FLG 0x00000010
24 #define DtLgrPrvw_DESCRIPT_FLG 0x00000020
25 #define DtLgrPrvw_DESCEDIT_FLG 0x00000040
26 #define DtLgrPrvw_ALL_FLG 0x0000003F
27 
28 namespace MAKLogger
29 {
30  class DtLgrGuiMetaDataInterface;
31  class DtPacket;
32 
34  {
35 
36  Q_OBJECT
37 
38  public:
39 
46  VALIDITY_VALID
47  };
48 
49  public:
50 
52  DtLoggerPreviewWidget(QWidget* parent, Qt::WindowFlags f = Qt::SubWindow);
53 
55  virtual ~DtLoggerPreviewWidget();
56 
62  virtual void setAppProtocol(const QString& protocol, bool display = false);
63 
65  virtual bool isEditMode();
66 
68  virtual void setSaveMode(bool save);
69 
72  virtual void setShowDescriptionOnly();
73 
76  virtual void setShowPreviewButton(bool show);
77 
79  virtual void setEnablePreviewButton(bool enable);
80 
85  virtual void setNeedUpgradeForDescription(bool current, int loadedVersion);
86 
88  virtual void setDescription(const QString& description);
89 
91  virtual QString description();
92 
94  virtual bool descriptionChanged();
95 
97  virtual PreviewValidity validSelection();
98 
100  virtual void clearContent();
101 
102  public slots:
106  virtual void toggleEditMode();
107 
110  virtual PreviewValidity previewInformation(const QString&);
111 
112  protected slots:
113 
114  virtual void onOK();
115  virtual void onCancel();
116  virtual void onDescriptionChanged();
117 
118  protected:
119 
121  virtual QString timeAndDateString(double time);
122 
126  virtual QString durationString(double time);
127 
129  virtual void displayFomFileWidgets(bool show);
130 
132  virtual void displayFomModuleWidgets(bool show);
133 
137  virtual void hideFomWidgets();
138 
141  virtual void setEditableBackground();
142 
145  virtual void setNonEditableBackground();
146 
149  virtual void setBgColor(QWidget* widget, QColor& color);
150 
153  virtual void setBgColor(QWebView* wview, QColor& color);
154 
157  virtual QString paddedDescription();
158 
160  virtual void trimRight(QString& description);
161 
162  public:
163  Ui_DtLgrTapePreviewWidgetUi myUiImpl;
164 
165  protected:
166 
167  QWebView* myDescriptionView;
168  QTextEdit* myDescriptionEdit;
169 
171 
172  QString myFilename;
173  QString myProtocol;
174 
177 
179 
181 
182  };
184 }

Document ID: Generated on Thu Apr 7 20:50:59 EDT 2016 from SVN revision 163818
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)