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(QWidget* aParent,
int sizeX,
int sizeY);
82 void paintEvent ( QPaintEvent * event );
83 inline void setTabSelected(
bool a) { fTabSelected =
a; };
84 inline void setLastTabCreated(
int a) { fLastCreated =
a; };
85 inline bool isTabSelected() {
return fTabSelected; };
90 inline void setPreferredSize(QSize
s) {
91 fPreferedSizeX = s.width() + 6;
92 fPreferedSizeY = s.height() + 58;
94 inline QSize sizeHint ()
const {
95 return QSize(fPreferedSizeX, fPreferedSizeY);
107 void AddMenu(
const char*,
const char*);
112 void AddButton(
const char*,
const char*,
const char*);
118 void AddIcon(
const char* userLabel,
const char* iconFile,
const char* command,
const char* file_name=
"");
126 bool AddTabWidget(QWidget*,QString,
int,
int);
129 QTabWidget* GetSceneTreeComponentsTBWidget();
132 bool IsSplitterReleased();
134 inline bool IsIconMoveSelected() {
135 return fMoveSelected;
137 inline bool IsIconRotateSelected() {
138 return fRotateSelected;
140 inline bool IsIconPickSelected() {
141 return fPickSelected;
143 inline bool IsIconZoomInSelected() {
144 return fZoomInSelected;
146 inline bool IsIconZoomOutSelected() {
147 return fZoomOutSelected;
150 void SetIconMoveSelected();
151 void SetIconRotateSelected();
152 void SetIconPickSelected();
153 void SetIconZoomInSelected();
154 void SetIconZoomOutSelected();
155 void SetIconHLHSRSelected();
156 void SetIconHLRSelected();
157 void SetIconSolidSelected();
158 void SetIconWireframeSelected();
159 void SetIconPerspectiveSelected();
160 void SetIconOrthoSelected();
162 inline QMainWindow * GetMainWindow() {
169 void SessionTerminate();
177 void CreateHelpWidget();
178 void InitHelpTreeAndVisParametersWidget();
183 QTreeWidgetItem* FindTreeItem(QTreeWidgetItem *,
const QString&);
188 bool eventFilter(QObject*,QEvent*);
190 QMap<int,QString> LookForHelpStringInChildTree(
G4UIcommandTree *,
const QString&);
192 QWidget* CreateVisParametersTBWidget();
193 QWidget* CreateHelpTBWidget();
194 QWidget* CreateCoutTBWidget();
195 QWidget* CreateHistoryTBWidget();
196 QWidget* CreateUITabWidget();
197 QWidget* CreateSceneTreeComponentsTBWidget();
198 QWidget* CreateRightSplitterWidget();
199 QWidget* CreateLeftSplitterWidget();
200 void OpenHelpTreeOnCommand(
const QString &);
201 QString GetShortCommandPath(QString);
202 QString GetLongCommandPath(QTreeWidgetItem*);
204 bool CreateVisCommandGroupAndToolBox(
G4UIcommand*, QWidget*,
int,
bool isDialog);
205 bool CreateCommandWidget(
G4UIcommand* command, QWidget* parent,
bool isDialog);
209 QMainWindow * fMainWindow;
210 QLabel *fCommandLabel;
211 QLineEdit * fCommandArea;
212 QTextEdit *fCoutTBTextArea;
213 QTextEdit *fHelpArea;
214 QTabWidget* fUITabWidget;
216 QLineEdit * fCoutFilter;
218 QListWidget *fHistoryTBTableList;
219 QTreeWidget *fHelpTreeWidget;
220 QWidget* fHelpTBWidget;
221 QWidget* fHistoryTBWidget;
222 QWidget* fCoutTBWidget;
223 QTabWidget* fSceneTreeComponentsTBWidget;
224 QLineEdit* fHelpLine;
225 G4QTabWidget* fViewerTabWidget;
227 QLabel *fEmptyViewerTabLabel;
228 QSplitter * fMainSplitterWidget;
229 QSplitter* fRightSplitterWidget;
230 QWidget* fLeftSplitterWidget;
231 QSplitter * fHelpVSplitter;
232 QWidget* fViewerTabHandleWidget;
234 QToolBar *fToolbarApp;
235 QToolBar *fToolbarUser;
236 QString fStringSeparator;
238 QString fLastOpenPath;
241 bool fRotateSelected;
243 bool fZoomInSelected;
244 bool fZoomOutSelected;
248 void ClearButtonCallback();
249 void CommandEnteredCallback();
250 void CommandEditedCallback(
const QString & text);
251 void ButtonCallback(
const QString&);
252 void HelpTreeClicCallback();
253 void HelpTreeDoubleClicCallback();
254 void ShowHelpCallback();
255 void CommandHistoryCallback();
256 void LookForHelpStringCallback();
257 void UpdateTabWidget(
int);
258 void ResizeTabWidget( QResizeEvent* );
259 void CoutFilterCallback(
const QString&);
260 void TabCloseCallback(
int);
261 void ToolBoxActivated(
int);
262 void VisParameterCallback(QWidget*);
263 void ChangeColorCallback(QWidget*);
264 void ChangeCursorStyle(
const QString&);
265 void ChangeSurfaceStyle(
const QString&);
266 void OpenIconCallback(
const QString&);
267 void SaveIconCallback(
const QString&);
268 void ChangePerspectiveOrtho(
const QString&);
virtual G4bool GetHelpChoice(G4int &)=0
virtual void ExitHelp() const =0
virtual G4int ReceiveG4cout(const G4String &coutString)
virtual void AddMenu(const char *, const char *)
virtual void PauseSessionStart(const G4String &Prompt)=0
virtual G4UIsession * SessionStart()=0
virtual void AddButton(const char *, const char *, const char *)
virtual G4int ReceiveG4cerr(const G4String &cerrString)
virtual void AddIcon(const char *, const char *, const char *, const char *)