MAK Data Logger API Documentation for HLA
preferencesPage.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 #include "lgrGui.h"
11 #include <QtGui/QWidget>
12 #include <QtGui/QIcon>
13 
14 namespace MAKLogger
15 {
16 
19  class DT_DLL_LGRGUI DtPage : public QWidget
20  {
21  public:
25  DtPage(QWidget* parent = 0, Qt::WindowFlags f = 0);
26 
28  virtual ~DtPage();
29 
31  virtual QIcon icon() = 0;
32 
34  virtual QString title() = 0;
35 
37  virtual const std::string& pageClassName() const = 0;
38 
40  virtual void load() = 0;
41 
43  virtual void accept() = 0;
44 
46  virtual void reject() = 0;
47 
48  protected:
49 
51 
53  virtual void activate() = 0;
54 
56  virtual void deactivate() = 0;
57 
59  void addPageHeader(const QString& title, QLayout* layout);
60 
61  };
62 
66  {
67  public:
69  DtPageCreator();
70 
72  virtual ~DtPageCreator();
73 
77  virtual std::string pageClassName() const = 0;
78 
80  virtual DtPage* create(QWidget* parent = 0, Qt::WindowFlags f = 0) = 0;
81 
82 
83  };
84 
85 
88  template <typename PageClass>
90  {
91  public:
92 
95  {
96  }
97 
100  {
101  }
102 
105  virtual std::string pageClassName() const
106  {
107  return PageClass::thePageClassName();
108  }
109 
111  virtual DtPage* create(QWidget* parent = 0, Qt::WindowFlags f = 0)
112  {
113  return new PageClass(parent, f);
114  }
115  };
116 }
117 

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)