MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
assistantConfigDialog.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "rtiMsConfig.h"
13 #include "assistantEnums.h"
14 #include <QDialog>
15 #include <vector>
16 #include <map>
17 
18 class QListWidget;
19 class QSignalMapper;
20 class QStackedWidget;
21 class QListWidgetItem;
22 class QDialogButtonBox;
24 
28 { Q_OBJECT;
29 public:
30 
32  DtAssistantConfigDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
33 
35  virtual ~DtAssistantConfigDialog();
36 
40  virtual void addConfigWidget( DtAssistantConfigWidget* widget, const QIcon& icon,
41  const QString& name, DtPreferencesPage pageId );
42 
45  virtual void completeDialogSetup();
46 
48  virtual QWidget* configWidget( DtPreferencesPage pageId );
49 
51  virtual void setPage( DtPreferencesPage pageId );
52 
53 signals:
54 
56  void applied();
57 
58 public slots:
59 
61  virtual void changePage( QListWidgetItem* current, QListWidgetItem* previous );
62 
64  virtual void enableAccept( int );
65 
67  virtual void disableAccept( int );
68 
69 protected:
70 
72  virtual void enableOrDisableAccept();
73 
76  virtual void showEvent( QShowEvent* event );
77 
78 private:
79 
82 
84  DtAssistantConfigDialog& operator = ( const DtAssistantConfigDialog& );
85 
86 protected:
87 
90 
93  QListWidget* myContentsWidget;
94 
97  QStackedWidget* myPagesWidget;
98 
100  std::map<DtPreferencesPage,unsigned int> myPageNumbers;
101 
103  QDialogButtonBox* myButtonBox;
104 
106  std::vector<DtAssistantConfigWidget*> myConfigWidgets;
107 
110  std::vector<bool> myEnableAccept;
111 
114  std::vector<QString> myDisableAcceptReasons;
115 
118  QSignalMapper* myEnableAcceptMapper;
119 
121  QSignalMapper* myDisableAcceptMapper;
122 
125 
128 
129 };
QDialogButtonBox * myButtonBox
The dialogs button box.
Definition: assistantConfigDialog.h:103
DtPreferencesPage
Definition: assistantEnums.h:17
QSignalMapper * myDisableAcceptMapper
Maps signals from configuration widgets to disable the accept button.
Definition: assistantConfigDialog.h:121
int myCurrentPage
The current page.
Definition: assistantConfigDialog.h:124
bool myFirstShowing
The first time the dialog is shown, do some additional configuration.
Definition: assistantConfigDialog.h:127
std::vector< QString > myDisableAcceptReasons
The current reasons for each widget why acceptance of the dialog should not be allowed.
Definition: assistantConfigDialog.h:114
std::vector< DtAssistantConfigWidget * > myConfigWidgets
Widgets for each configuration page in the dialog.
Definition: assistantConfigDialog.h:106
QSignalMapper * myEnableAcceptMapper
Maps signals from configuration widgets to enable the accept button button.
Definition: assistantConfigDialog.h:118
bool myWasAccepted
Stores the acceptance state of the last execution.
Definition: assistantConfigDialog.h:89
Qt dialog which allows a user to change the Assistant configuration.
Definition: assistantConfigDialog.h:27
QListWidget * myContentsWidget
The contents panel which allows the user to select the configuration page they would like to view...
Definition: assistantConfigDialog.h:93
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:122
std::map< DtPreferencesPage, unsigned int > myPageNumbers
Mapping of page IDs to page numbers.
Definition: assistantConfigDialog.h:100
QStackedWidget * myPagesWidget
The stacked widget which holds all of the configuration pages and displays the currently selected one...
Definition: assistantConfigDialog.h:97
std::vector< bool > myEnableAccept
The current settings for each widget on whether or not acceptance of the dialog should be allowed...
Definition: assistantConfigDialog.h:110
Widget which can be added as a configuration page to the DtAssistantConfigDialog. ...
Definition: assistantConfigWidget.h:18

Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)