HAL  v4.5.0-299-g9ee015483
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
waveform_viewer.cpp
Go to the documentation of this file.
2 
8 
10 
15 #include "hal_core/netlist/gate.h"
16 #include "hal_core/netlist/net.h"
18 #include "hal_core/utilities/log.h"
20 #include "gui/gui_globals.h"
21 #include "gui/gui_utils/graphics.h"
22 #include "gui/toolbar/toolbar.h"
23 
24 #include <QFile>
25 #include <QDate>
26 #include <QColor>
27 #include <QFileDialog>
28 #include <QMessageBox>
29 #include <QStatusBar>
30 #include <QAction>
31 #include <QMenu>
32 #include <QDebug>
33 #include <QApplication>
34 #include <QScreen>
35 #include <QVBoxLayout>
36 #include <QProgressBar>
37 #include <QInputDialog>
38 #include <QTabBar>
40 
41 namespace hal
42 {
43 
45  {
46  return new WaveformViewer;
47  }
48 
50  {
51  NetlistSimulatorControllerPlugin* ctrlPlug = static_cast<NetlistSimulatorControllerPlugin*>(plugin_manager::get_plugin_instance("netlist_simulator_controller"));
52  if (!ctrlPlug || !ctrlPlug->sSimulatorSerializer)
53  {
54  return;
55  }
56  for (std::unique_ptr<NetlistSimulatorController>& ctrlRef : ctrlPlug->sSimulatorSerializer->restore())
57  {
58  if (!ctrlRef) continue;
59  takeControllerOwnership(ctrlRef, false); // already created by restore()
60  }
61  }
62 
64  : ExternalContentWidget("waveform_viewer","WaveformViewer",parent),
65  mVisualizeNetState(false), mOwnershipRequired(false), mCurrentWaveWidget(nullptr)
66  {
68  mCreateControlAction = new QAction(this);
69  mSimulSettingsAction = new QAction(this);
70  mOpenInputfileAction = new QAction(this);
71  mSaveWaveformsAction = new QAction(this);
72  mInvokeSWizardAction = new QAction(this);
73  mAddResultWaveAction = new QAction(this);
74  mToggleMaxZoomAction = new QAction(this);
75  mUndoZoomShiftAction = new QAction(this);
76 
77  mCreateControlAction->setIcon(gui_utility::getStyledSvgIcon("all->#FFFFFF",":/icons/plus"));
78  mAddResultWaveAction->setIcon(QIcon(":/icons/add_waveform"));
79  mToggleMaxZoomAction->setIcon(QIcon(":/icons/zoom_waveform"));
80  mUndoZoomShiftAction->setIcon(gui_utility::getStyledSvgIcon("all->#FFFFFF",":/icons/undo2"));
81 
82  mCreateControlAction->setToolTip("Create simulation controller");
83  mSimulSettingsAction->setToolTip("Simulation settings");
84  mOpenInputfileAction->setToolTip("Open input file");
85  mSaveWaveformsAction->setToolTip("Save waveform data to file");
86  mInvokeSWizardAction->setToolTip("Invoke simulation wizard");
87  mAddResultWaveAction->setToolTip("Add waveform net");
88  mToggleMaxZoomAction->setToolTip("Toggle max/min zoom");
89  mUndoZoomShiftAction->setToolTip("Undo last zoom or horizontal scroll");
90 
91  connect(mCreateControlAction, &QAction::triggered, this, &WaveformViewer::handleCreateControl);
92  connect(mSimulSettingsAction, &QAction::triggered, this, &WaveformViewer::handleSimulSettings);
93  connect(mOpenInputfileAction, &QAction::triggered, this, &WaveformViewer::handleOpenInputFile);
94  connect(mSaveWaveformsAction, &QAction::triggered, this, &WaveformViewer::handleSaveWaveforms);
95  connect(mInvokeSWizardAction, &QAction::triggered, this, &WaveformViewer::handleInvokeWizzard);
96  connect(mAddResultWaveAction, &QAction::triggered, this, &WaveformViewer::handleAddResultWave);
97  connect(mToggleMaxZoomAction, &QAction::triggered, this, &WaveformViewer::handleToggleMaxZoom);
98  connect(mUndoZoomShiftAction, &QAction::triggered, this, &WaveformViewer::handleUndoZoomShift);
99 
100  mTabWidget = new QTabWidget(this);
101  mTabWidget->setTabsClosable(true);
103  connect(mTabWidget,&QTabWidget::tabCloseRequested,this,&WaveformViewer::handleTabClosed);
105  mContentLayout->addWidget(mTabWidget);
106  mStatusBar = new QStatusBar(this);
107  mProgress = new QProgressBar(mStatusBar);
108  mProgress->setFormat("Import waveform data : %p%");
109  mProgress->setTextVisible(true);
110  mProgress->setRange(0,100);
111  mStatusBar->addWidget(mProgress,100);
112  mProgress->hide();
114  mContentLayout->addWidget(mStatusBar);
115  if (gSelectionRelay)
116  connect(gSelectionRelay,&SelectionRelay::selectionChanged,this,&WaveformViewer::handleSelectionChanged);
117 
124  }
125 
127  {
128  closeEvent(nullptr);
129  }
130 
132  {
133  Q_UNUSED(event);
137  }
138 
140  {
141  if (percent < 0)
142  {
143  mProgress->setValue(0);
144  mProgress->hide();
146  }
147  else if (percent != mProgress->value())
148  {
149  mStatusBar->clearMessage();
150  mProgress->show();
151  mProgress->setValue(percent);
152  }
153  }
154 
156  {
157  if (inx >= 0 && mCurrentWaveWidget == mTabWidget->widget(inx)) return;
158  if (mCurrentWaveWidget)
160  if (inx < 0)
161  {
162  mCurrentWaveWidget = nullptr;
164  return;
165  }
166  mCurrentWaveWidget = static_cast<WaveWidget*>(mTabWidget->widget(inx));
169  }
170 
172  {
173  if (!mCurrentWaveWidget) return;
174  mAddResultWaveAction->setEnabled(mCurrentWaveWidget->canImportWires());
175  }
176 
178  {
179  if (!mCurrentWaveWidget)
180  mUndoZoomShiftAction->setDisabled(true);
181  else
182  mUndoZoomShiftAction->setEnabled(mCurrentWaveWidget->graphicCanvas()->canUndoZoom());
183  mUndoZoomShiftAction->setIcon(gui_utility::getStyledSvgIcon(mUndoZoomShiftAction->isEnabled() ? "all->#FFFFFF" : "all->#808080",":/icons/undo2"));
184  }
185 
187  {
188  mOpenInputfileAction->setEnabled(true);
189  mInvokeSWizardAction->setEnabled(true);
190  mOpenInputfileAction->setIcon(gui_utility::getStyledSvgIcon("all->#3192C5",":/icons/folder"));
192  {
193  mSimulSettingsAction->setDisabled(true);
194  mSaveWaveformsAction->setDisabled(true);
195 
196  // TODO: das ganze muss anders gestartet werden sonst fehlen einpar ptr
197  mInvokeSWizardAction->setDisabled(true);
198  mAddResultWaveAction->setDisabled(true);
199  mToggleMaxZoomAction->setDisabled(true);
200  }
201  else
202 
203  {
204  mSimulSettingsAction->setEnabled(true);
206 
207  //mInvokeSWizardAction->setEnabled(state == NetlistSimulatorController::ParameterReady);
208  mToggleMaxZoomAction->setEnabled(!mCurrentWaveWidget->isEmpty());
209  }
210  mSimulSettingsAction->setIcon(gui_utility::getStyledSvgIcon(mSimulSettingsAction->isEnabled() ? "all->#FFFFFF" : "all->#808080",":/icons/preferences"));
211 
212  mSaveWaveformsAction->setIcon(gui_utility::getStyledSvgIcon(mSaveWaveformsAction->isEnabled() ? "all->#3192C5" : "all->#808080",":/icons/save"));
213  mInvokeSWizardAction->setIcon(gui_utility::getStyledSvgIcon(mInvokeSWizardAction->isEnabled() ? "all->#20FF80" : "all->#808080",":/icons/run"));
214  testUndoEnable();
215 
216  if (!mCurrentWaveWidget)
218  else
219  {
220  mAddResultWaveAction->setEnabled(mCurrentWaveWidget->canImportWires());
221  switch (state) {
222  case NetlistSimulatorController::NoGatesSelected: displayStatusMessage("Select gates to create (partial) netlist for simulation"); break;
223  case NetlistSimulatorController::ParameterSetup: displayStatusMessage("Setup parameter for simulation"); break;
224  case NetlistSimulatorController::ParameterReady: displayStatusMessage("Continue parameter setup or start simulation"); break;
225  case NetlistSimulatorController::SimulationRun: displayStatusMessage("Simulation engine running, please wait ..."); break;
226  case NetlistSimulatorController::ShowResults: displayStatusMessage("Simulation successful, add waveform data to visualize results"); break;
227  case NetlistSimulatorController::EngineFailed: displayStatusMessage("Simulation engine failed"); break;
228  }
229  }
230  }
231 
233  {
234  if (msg.isEmpty())
235  {
236  mStatusBar->showMessage("Create new simulation controller");
237  }
238  else
239  mStatusBar->showMessage(msg);
240  }
241 
243  {
244  toolbar->addAction(mCreateControlAction);
245  toolbar->addAction(mInvokeSWizardAction);
246  toolbar->addAction(mSimulSettingsAction);
247  toolbar->addAction(mOpenInputfileAction);
248  toolbar->addAction(mSaveWaveformsAction);
249  toolbar->addAction(mAddResultWaveAction);
250  toolbar->addAction(mToggleMaxZoomAction);
251  toolbar->addAction(mUndoZoomShiftAction);
252  }
253 
254  void WaveformViewer::handleTabClosed(int inx)
255  {
256  WaveWidget* ww = static_cast<WaveWidget*>(mTabWidget->widget(inx));
257  if (!ww->triggerClose())
258  log_warning(ww->controller()->get_name(), "Cannot close tab for externally owned controller.");
259  }
260 
261  void WaveformViewer::handleCreateControl()
262  {
263  NetlistSimulatorControllerPlugin* ctrlPlug = static_cast<NetlistSimulatorControllerPlugin*>(plugin_manager::get_plugin_instance("netlist_simulator_controller"));
264  if (!ctrlPlug)
265  {
266  log_warning("waveform_viewer", "Plugin 'netlist_simulator_controller' not found");
267  return;
268  }
269  std::unique_ptr<NetlistSimulatorController> ctrlRef = ctrlPlug->create_simulator_controller();
270  if (ctrlRef)
271  {
272  // show the new controller, otherwise the wizard and the toolbar act on the previous tab
273  WaveWidget* ww = takeControllerOwnership(ctrlRef, false);
274  if (ww) mTabWidget->setCurrentWidget(ww);
275  }
276  }
277 
278  void WaveformViewer::handleSimulSettings()
279  {
280  QMenu* settingMenu = new QMenu(this);
281  QAction* act;
282 
283  act = new QAction("Show output of engine");
284  connect(act, &QAction::triggered, this, &WaveformViewer::handleShowEngineOutput);
285  settingMenu->addAction(act);
286 
287  settingMenu->addSeparator();
288  act = new QAction("Refresh net names", settingMenu);
289  connect(act, &QAction::triggered, this, &WaveformViewer::handleRefreshNetNames);
290  settingMenu->addAction(act);
291 
292  act = new QAction("Visualize net state by color", settingMenu);
293  act->setCheckable(true);
294  act->setChecked(mVisualizeNetState);
295  connect (act, &QAction::triggered, this, &WaveformViewer::setVisualizeNetState);
296  settingMenu->addAction(act);
297 
298  act = new QAction("Settings ...");
299  connect(act, &QAction::triggered, this, &WaveformViewer::handleOpenSettingsDialog);
300  settingMenu->addAction(act);
301 
302  settingMenu->exec(mapToGlobal(QPoint(10,3)));
303  }
304 
305  void WaveformViewer::handleOpenSettingsDialog()
306  {
307  SimulationSettingDialog ssd(NetlistSimulatorControllerPlugin::sSimulationSettings,this);
308  ssd.exec();
309  }
310 
311  void WaveformViewer::handleShowEngineOutput()
312  {
313  if (!mCurrentWaveWidget) return;
315  QFile log(fname);
316  if (!log.open(QIODevice::ReadOnly)) return;
317  QTextEdit* browser = new QTextEdit;
318  browser->setReadOnly(true);
319  browser->setHtml(QString::fromUtf8(log.readAll()));
320  QSize scrSize = QGuiApplication::primaryScreen()->size();
321  browser->setGeometry(scrSize.width()/10,scrSize.height()/10,scrSize.width()*4/5,scrSize.height()*4/5);
322  browser->setWindowTitle("Simulation engine log <" + fname + ">");
323  browser->show();
324  }
325 
326  void WaveformViewer::handleRefreshNetNames()
327  {
328  for (int inx=0; inx<mTabWidget->count(); inx++)
329  {
330  WaveWidget* ww = static_cast<WaveWidget*>(mTabWidget->widget(inx));
331  ww->refreshNetNames();
332  }
333  }
334 
335  void WaveformViewer::setVisualizeNetState(bool state)
336  {
337  if (state == mVisualizeNetState) return;
338  mVisualizeNetState = state;
339  for (int inx=0; inx < mTabWidget->count(); inx++)
340  {
341  WaveWidget* ww = static_cast<WaveWidget*>(mTabWidget->widget(inx));
342  ww->setVisualizeNetState(mVisualizeNetState, inx==mTabWidget->currentIndex());
343  }
344  }
345 
347  {
348  // nothing to do here, viewer will open widget when taking over ownership
349  if (mOwnershipRequired) return;
350 
351  // check whether controller already added
352  for (int inx=0; inx<mTabWidget->count(); inx++)
353  {
354  WaveWidget* ww = static_cast<WaveWidget*>(mTabWidget->widget(inx));
355  if (controllerId == ww->controllerId()) return;
356  }
358  if (!nsc) return;
359  WaveWidget* ww = new WaveWidget(nsc, mTabWidget);
360  mTabWidget->addTab(ww,nsc->name());
361  showCloseButton();
362  }
363 
365  {
366  for (int inx=0; inx<mTabWidget->count(); inx++)
367  {
368  WaveWidget* ww = static_cast<WaveWidget*>(mTabWidget->widget(inx));
369  if (ww->controllerId() == controllerId || ww->controllerId() == 0)
370  {
371  mTabWidget->removeTab(inx);
372  ww->deleteLater();
373  }
374  }
375  }
376 
377  void WaveformViewer::handleOpenInputFile()
378  {
379  QString filter = QString("Saved data (%1)").arg(NetlistSimulatorController::sPersistFile);
380  if (mCurrentWaveWidget)
381  filter += ";; VCD files (*.vcd);; CSV files (*.csv)";
382 
383  QString filename =
384  QFileDialog::getOpenFileName(this, "Load input wave file", ".", filter);
385  if (filename.isEmpty()) return;
387  {
388  NetlistSimulatorControllerPlugin* ctrlPlug = static_cast<NetlistSimulatorControllerPlugin*>(plugin_manager::get_plugin_instance("netlist_simulator_controller"));
389  if (ctrlPlug)
390  {
391  mOwnershipRequired = true;
392  std::unique_ptr<NetlistSimulatorController> ctrlRef = ctrlPlug->restore_simulator_controller(gNetlist,filename.toStdString());
393  WaveWidget* ww = takeControllerOwnership(ctrlRef, true);
394  if (ww) mTabWidget->setCurrentWidget(ww);
395  mOwnershipRequired = false;
396  }
397  }
398  else if (mCurrentWaveWidget && mCurrentWaveWidget->controller()->can_import_data() && filename.toLower().endsWith(".vcd"))
400  else if (mCurrentWaveWidget && mCurrentWaveWidget->controller()->can_import_data() && filename.toLower().endsWith(".csv"))
402  else if (mCurrentWaveWidget)
403  log_warning(mCurrentWaveWidget->controller()->get_name(), "Cannot parse file '{}' (unknown extension ore wrong state).", filename.toStdString());
404  else
405  log_warning("simulation_plugin", "Unable to restore saved data from file '{}'.", filename.toStdString());
406  }
407 
408  void WaveformViewer::showCloseButton()
409  {
410  for (int i=0; i<mTabWidget->count(); i++)
411  {
412  bool own = static_cast<const WaveWidget*>(mTabWidget->widget(i))->hasOwnership();
413  for (int j=0; j<2; j++)
414  {
415  QWidget* closeBut = mTabWidget->tabBar()->tabButton(i,j?QTabBar::LeftSide:QTabBar::RightSide);
416  if (closeBut && closeBut->metaObject()->className() == QByteArray("CloseButton"))
417  {
418  if (own)
419  {
420  if (!closeBut->isVisible())
421  closeBut->show();
422  }
423  else
424  {
425  if (closeBut->isVisible())
426  closeBut->hide();
427  }
428  }
429  }
430  }
431  }
432 
433  WaveWidget* WaveformViewer::takeControllerOwnership(std::unique_ptr<NetlistSimulatorController> &ctrlRef, bool create)
434  {
435  NetlistSimulatorController* nsc = ctrlRef.get();
436 
437  WaveWidget* ww = nullptr;
438  if (create)
439  {
440  ww = new WaveWidget(nsc, mTabWidget);
441  mTabWidget->addTab(ww,nsc->name());
442  }
443  else
444  {
445  for (int inx=0; inx<mTabWidget->count(); inx++)
446  {
447  WaveWidget* wwTest = static_cast<WaveWidget*>(mTabWidget->widget(inx));
448  if (ctrlRef.get()->get_id() == wwTest->controllerId())
449  {
450  ww = wwTest;
451  break;
452  }
453  }
454 
455  }
456  Q_ASSERT(ww);
457  ww->takeOwnership(ctrlRef);
458  showCloseButton();
459  return ww;
460  }
461 
462  void WaveformViewer::handleSaveWaveforms()
463  {
464  if (!mCurrentWaveWidget) return;
465 
466  QString filename =
467  QFileDialog::getSaveFileName(this, "Save waveform data to file", ".", ("VCD Files (*.vcd)") );
468  if (filename.isEmpty()) return;
470  }
471 
472  void WaveformViewer::handleInvokeWizzard()
473  {
474  if (!mCurrentWaveWidget) return;
475  NetlistSimulatorController* ctrl = mCurrentWaveWidget->controller();
476  if (!ctrl) return;
477 
478  // the wizard resets the controller and deletes its waveform data
479  if (ctrl->get_state() != NetlistSimulatorController::NoGatesSelected || !ctrl->get_waves()->isEmpty())
480  {
481  QString msg = QString("The simulation wizard resets '%1' and deletes its simulation data. Continue?").arg(ctrl->name());
483  return;
484  }
485 
487  wizard.exec();
488  }
489 
490  void WaveformViewer::handleToggleMaxZoom()
491  {
492  if (!mCurrentWaveWidget) return;
494  }
495 
496  void WaveformViewer::handleUndoZoomShift()
497  {
498  if (!mCurrentWaveWidget) return;
500  }
501 
502  void WaveformViewer::handleAddResultWave()
503  {
504  if (!mCurrentWaveWidget) return;
506  mAddResultWaveAction->setEnabled(mCurrentWaveWidget->canImportWires());
507  }
508 
509  void WaveformViewer::setGates(std::vector<Gate*> gates)
510  {
511  if (!mCurrentWaveWidget) return;
513  }
514 
515  void WaveformViewer::handleSelectionChanged(void* sender)
516  {
517  Q_UNUSED(sender);
518  /*
519  for (u32 nid : gSelectionRelay->selectedNetsList())
520  {
521  Net* n = gNetlist->get_net_by_id(nid);
522  if (!n) continue;
523  const WaveData* wd = mResultMap.value(n->get_id());
524  if (!wd) continue;
525  WaveData* wdCopy = new WaveData(*wd);
526 // TODO mWaveWidget->addOrReplaceWave(wdCopy);
527  }
528  */
529  }
530 } // namespace hal
QVBoxLayout * mContentLayout
std::shared_ptr< spdlog::logger > add_channel(const std::string &channel_name, const std::vector< std::shared_ptr< log_sink >> &sinks, const std::string &level="info")
Definition: log.cpp:100
static std::shared_ptr< log_sink > create_gui_sink()
Definition: log.cpp:274
static std::shared_ptr< log_sink > create_file_sink(const std::filesystem::path &file_name="", const bool truncate=false)
Definition: log.cpp:247
static std::shared_ptr< log_sink > create_stdout_sink(const bool colored=true)
Definition: log.cpp:216
static LogManager * get_instance(const std::filesystem::path &file_name="")
Definition: log.cpp:61
bool import_vcd(const std::string &filename, FilterInputFlag filter)
bool generate_vcd(const std::filesystem::path &path, u32 start_time=0, u32 end_time=0, std::set< const Net * > nets={}) const
void import_csv(const std::string &filename, FilterInputFlag filter, u64 timescale=1000000000)
NetlistSimulatorController * controller(u32 id) const
static NetlistSimulatorControllerMap * instance()
std::unique_ptr< NetlistSimulatorController > restore_simulator_controller(Netlist *nl, const std::string &filename) const
void selectionChanged(void *sender)
std::vector< std::unique_ptr< NetlistSimulatorController > > restore()
Toolbar for all ContentFrames and ContentWidgets.
Definition: toolbar.h:39
WaveGraphicsCanvas * graphicCanvas()
Definition: wave_widget.h:79
NetlistSimulatorController * controller() const
Definition: wave_widget.h:64
void setGates(const std::vector< Gate * > &gats)
bool isEmpty() const
u32 controllerId() const
void stateChanged(hal::NetlistSimulatorController::SimulationState state)
NetlistSimulatorController::SimulationState state() const
bool canImportWires() const
ExternalContentWidget * contentFactory() const
void setGates(std::vector< Gate * > gates)
void showProgress(int percent)
WaveformViewer(QWidget *parent=nullptr)
void handleControllerAdded(u32 controllerId)
void restoreFromProject() override
virtual void setupToolbar(Toolbar *toolbar) override
void handleControllerRemoved(u32 controllerId)
void displayStatusMessage(const QString &msg=QString())
void currentStateChanged(NetlistSimulatorController::SimulationState state)
void closeEvent(QCloseEvent *event) override
void currentTabChanged(int inx)
WaveWidget * mCurrentWaveWidget
uint32_t u32
Definition: defines.h:41
#define log_warning(channel,...)
Definition: log.h:76
QIcon getStyledSvgIcon(const QString &from_to_colors_enabled, const QString &svg_path, QString from_to_colors_disabled=QString())
Definition: graphics.cpp:60
BasePluginInterface * get_plugin_instance(const std::string &plugin_name, bool initialize=true, bool silent=false)
Definition: defines.h:45
SelectionRelay * gSelectionRelay
Definition: plugin_gui.cpp:84
Netlist * gNetlist
Definition: gui_globals.h:69
void setCheckable(bool)
void setChecked(bool)
void setEnabled(bool)
void setIcon(const QIcon &icon)
void setDisabled(bool b)
void setToolTip(const QString &tip)
void triggered(bool checked)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QString absoluteFilePath(const QString &fileName) const const
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
QAction * addAction(const QString &text)
QAction * addSeparator()
QAction * exec()
QMessageBox::StandardButton question(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
const char * className() const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void deleteLater()
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual const QMetaObject * metaObject() const const
QObject * sender() const const
void setFormat(const QString &format)
void setRange(int minimum, int maximum)
void setTextVisible(bool visible)
void setValue(int value)
int height() const const
int width() const const
void addWidget(QWidget *widget, int stretch)
void clearMessage()
void showMessage(const QString &message, int timeout)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
QString fromStdString(const std::string &str)
QString fromUtf8(const char *str, int size)
bool isEmpty() const const
QString toLower() const const
std::string toStdString() const const
QueuedConnection
QWidget * tabButton(int index, QTabBar::ButtonPosition position) const const
int addTab(QWidget *page, const QString &label)
void currentChanged(int index)
void removeTab(int index)
void setCurrentWidget(QWidget *widget)
QTabBar * tabBar() const const
void tabCloseRequested(int index)
void setTabsClosable(bool closeable)
QWidget * widget(int index) const const
void setHtml(const QString &text)
void setReadOnly(bool ro)
QAction * addAction(const QString &text)
void create(WId window, bool initializeWindow, bool destroyOldWindow)
virtual bool event(QEvent *event) override
void hide()
QPoint mapToGlobal(const QPoint &pos) const const
void setGeometry(int x, int y, int w, int h)
void show()
void setSizePolicy(QSizePolicy)
bool isVisible() const const
void setWindowTitle(const QString &)