diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-02-10 15:10:13 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-02-13 11:44:42 +0900 |
commit | 8f8f84410cc591c85c5e83e0b3efdcda5fdbe42e (patch) | |
tree | f273a932ce048ef22ea9d9888b77ea8a2b8f3e33 /src/sq_helpwidget.ui.h | |
parent | 424635023ee423826de12514b2fec7834b8deb7b (diff) | |
download | ksquirrel-8f8f8441.tar.gz ksquirrel-8f8f8441.zip |
Rename 'ksquirrel' folder to 'src'
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 203fcb8d90752b546c672c625927a136b959fcfb)
Diffstat (limited to 'src/sq_helpwidget.ui.h')
-rw-r--r-- | src/sq_helpwidget.ui.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/sq_helpwidget.ui.h b/src/sq_helpwidget.ui.h new file mode 100644 index 0000000..c0f2673 --- /dev/null +++ b/src/sq_helpwidget.ui.h @@ -0,0 +1,45 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you want to add, delete, or rename functions or slots, use +** TQt Designer to update this file, preserving your code. +** +** You should not define a constructor or destructor in this file. +** Instead, write your code in functions called init() and destroy(). +** These will automatically be called by the form's constructor and +** destructor. +*****************************************************************************/ + +/* + * SQ_HelpWidget is a helper widget. It shows hotkeys, which + * are accepted by SQ_GLWidget. Called from SQ_GLWidget. + */ + +void SQ_HelpWidget::init() +{ + setPalette(TQToolTip::palette()); + SQ_Config::instance()->setGroup("GL view"); + + int pg = SQ_Config::instance()->readNumEntry("help_id", 0); + + buttonGroup->setButton(pg); + widgetStack1->raiseWidget(pg); +} + +void SQ_HelpWidget::destroy() +{ + SQ_Config::instance()->setGroup("GL view"); + SQ_Config::instance()->writeEntry("help_id", buttonGroup->selectedId()); +} + +bool SQ_HelpWidget::event(TQEvent *e) +{ + if(e->type() == TQEvent::WindowDeactivate + || e->type() == TQEvent::MouseButtonPress + || e->type() == TQEvent::KeyPress) + { + reject(); + } + + return TQDialog::event(e); +} |