MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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/lgrGui.h>
11 #include <QWidget>
12 #include <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 
virtual DtPage * create(QWidget *parent=0, Qt::WindowFlags f=0)
Simple implementation of the create call to make a PageClass.
Definition: preferencesPage.h:111
The DtPreferencesPageCollection is an abstract class which implements the page collection interface...
Definition: preferencesPageCollection.h:22
The page is a single widget component which is viewed in a page collection.
Definition: preferencesPage.h:19
A generic creator template that most page creators can be implemented with.
Definition: preferencesPage.h:89
virtual ~DtPageCreatorTemplate()
Virtual DTOR allows subclasses to clean up resources.
Definition: preferencesPage.h:99
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
Defines INPORT/EXPORT macros for lgrGui library.
virtual std::string pageClassName() const
get the name of the PageClass.
Definition: preferencesPage.h:105
DtPageCreatorTemplate()
CTOR takes a reference to the DtDe object.
Definition: preferencesPage.h:94
The page creator.
Definition: preferencesPage.h:65

Document ID: Generated on Mon Mar 22 15:30:17 EDT 2021 from SVN revision 226440
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)