32 #if defined(G4UI_BUILD_QT_SESSION) || defined(G4UI_USE_QT)
41 #include <qstringlist.h>
42 #include <qtabwidget.h>
49 class QTreeWidgetItem;
78 class G4QTabWidget :
public QTabWidget {
81 G4QTabWidget(QSplitter*&);
82 void paintEvent ( QPaintEvent * event );
83 inline void setTabSelected(
bool a) { tabSelected =
a; };
84 inline void setLastTabCreated(
int a) { lastCreated =
a; };
85 inline bool isTabSelected() {
return tabSelected; };
98 void AddMenu(
const char*,
const char*);
103 void AddButton(
const char*,
const char*,
const char*);
109 void AddIcon(
const char* userLabel,
const char* iconFile,
const char* command,
const char* file_name=
"");
116 bool AddTabWidget(QWidget*,QString,
int,
int);
119 QTabWidget* GetSceneTreeComponentsTBWidget();
122 bool IsSplitterReleased();
124 inline bool IsIconMoveSelected() {
125 return fMoveSelected;
127 inline bool IsIconRotateSelected() {
128 return fRotateSelected;
130 inline bool IsIconPickSelected() {
131 return fPickSelected;
133 inline bool IsIconZoomInSelected() {
134 return fZoomInSelected;
136 inline bool IsIconZoomOutSelected() {
137 return fZoomOutSelected;
140 void SetIconMoveSelected();
141 void SetIconRotateSelected();
142 void SetIconPickSelected();
143 void SetIconZoomInSelected();
144 void SetIconZoomOutSelected();
145 void SetIconHLHSRSelected();
146 void SetIconHLRSelected();
147 void SetIconSolidSelected();
148 void SetIconWireframeSelected();
149 void SetIconPerspectiveSelected();
150 void SetIconOrthoSelected();
155 void SessionTerminate();
163 void CreateHelpWidget();
164 void InitHelpTreeAndVisParametersWidget();
169 QTreeWidgetItem* FindTreeItem(QTreeWidgetItem *,
const QString&);
174 bool eventFilter(QObject*,QEvent*);
176 QMap<int,QString> LookForHelpStringInChildTree(
G4UIcommandTree *,
const QString&);
178 void CreateVisParametersTBWidget();
179 void CreateHelpTBWidget();
180 void CreateCoutTBWidget();
181 void CreateHistoryTBWidget();
182 void OpenHelpTreeOnCommand(
const QString &);
183 QString GetShortCommandPath(QString);
184 QString GetLongCommandPath(QTreeWidgetItem*);
186 bool CreateVisCommandGroupAndToolBox(
G4UIcommand*, QWidget*,
int,
bool isDialog);
187 bool CreateCommandWidget(
G4UIcommand* command, QWidget* parent,
bool isDialog);
191 QMainWindow * fMainWindow;
192 QLabel *fCommandLabel;
193 QLineEdit * fCommandArea;
194 QTextEdit *fCoutTBTextArea;
195 QTextEdit *fHelpArea;
196 QTabWidget* fUITabWidget;
198 QLineEdit * fCoutFilter;
200 QListWidget *fHistoryTBTableList;
201 QTreeWidget *fHelpTreeWidget;
202 QWidget* fHelpTBWidget;
203 QWidget* fHistoryTBWidget;
204 QWidget* fCoutTBWidget;
205 QTabWidget* fSceneTreeComponentsTBWidget;
206 QLineEdit* fHelpLine;
207 G4QTabWidget* fViewerTabWidget;
209 QLabel *fEmptyViewerTabLabel;
210 QSplitter * fMainSplitterWidget;
211 QSplitter* fRightSplitterWidget;
212 QSplitter * fHelpVSplitter;
216 QToolBar *fToolbarApp;
217 QToolBar *fToolbarUser;
220 bool fRotateSelected;
222 bool fZoomInSelected;
223 bool fZoomOutSelected;
227 void ClearButtonCallback();
228 void CommandEnteredCallback();
229 void ButtonCallback(
const QString&);
230 void HelpTreeClicCallback();
231 void HelpTreeDoubleClicCallback();
232 void ShowHelpCallback();
233 void CommandHistoryCallback();
234 void LookForHelpStringCallback();
235 void UpdateTabWidget(
int);
236 void ResizeTabWidget( QResizeEvent* );
237 void CoutFilterCallback(
const QString&);
238 void TabCloseCallback(
int);
239 void ToolBoxActivated(
int);
240 void VisParameterCallback(QWidget*);
241 void ChangeColorCallback(QWidget*);
242 void ChangeCursorStyle(
const QString&);
243 void ChangeSurfaceStyle(
const QString&);
244 void OpenIconCallback(
const QString&);
245 void SaveIconCallback(
const QString&);
246 void ChangePerspectiveOrtho(
const QString&);