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/imageedit/sq_imageeditoptions.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/imageedit/sq_imageeditoptions.ui.h')
-rw-r--r-- | src/imageedit/sq_imageeditoptions.ui.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/imageedit/sq_imageeditoptions.ui.h b/src/imageedit/sq_imageeditoptions.ui.h new file mode 100644 index 0000000..7640ce0 --- /dev/null +++ b/src/imageedit/sq_imageeditoptions.ui.h @@ -0,0 +1,52 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename functions or slots use +** TQt Designer which will update this file, preserving your code. Create an +** init() function in place of a constructor, and a destroy() function in +** place of a destructor. +*****************************************************************************/ + +void SQ_ImageEditOptions::init() +{ + KFile::Mode mode = static_cast<KFile::Mode>(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly); + kurl->setMode(mode); +} + +int SQ_ImageEditOptions::exec(SQ_ImageOptions *o) +{ + kurl->setURL(o->putto); + + TQButton *b = buttonGroup1->find(o->where_to_put); + + if(b) + b->animateClick(); + else + { + tqWarning("SQ_ImageEditOptions::exec: wrong button Id"); + radioCurrentDir->animateClick(); + } + + checkClose->setChecked(o->close); + + int result = TQDialog::exec(); + + if(result == TQDialog::Accepted) + { + o->putto = (kurl->isEnabled()) ? kurl->url() : TQString(); + o->where_to_put = buttonGroup1->selectedId(); + o->close = checkClose->isChecked(); + + SQ_Config::instance()->setGroup("Image edit options"); + SQ_Config::instance()->writeEntry(prefix + "_putto", o->putto); + SQ_Config::instance()->writeEntry(prefix + "_where_to_put", o->where_to_put); + SQ_Config::instance()->writeEntry(prefix + "_close", o->close); + } + + return result; +} + +void SQ_ImageEditOptions::setConfigPrefix( const TQString &pr ) +{ + prefix = pr; +} |