KRename – powerful batch renamer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

guimodeselector.cpp 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /***************************************************************************
  2. guimodeselector.cpp - description
  3. -------------------
  4. begin : Fre Jun 6 2003
  5. copyright : (C) 2003 by Dominik Seichter
  6. email : domseichter@web.de
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #include "guimodeselector.h"
  17. // TQt includes
  18. #include <tqbuttongroup.h>
  19. #include <tqframe.h>
  20. #include <tqlabel.h>
  21. #include <tqlayout.h>
  22. #include <tqradiobutton.h>
  23. // KDE includes
  24. #include <tdelocale.h>
  25. GUIModeSelector::GUIModeSelector()
  26. {
  27. optionWizard = optionTabs = 0;
  28. }
  29. GUIModeSelector::~GUIModeSelector()
  30. {
  31. }
  32. bool GUIModeSelector::useWizard() const
  33. {
  34. return optionWizard->isChecked();
  35. }
  36. void GUIModeSelector::setUseWizard( bool b )
  37. {
  38. optionWizard->setChecked( b );
  39. optionTabs->setChecked( !b );
  40. }
  41. const TQString GUIModeSelector::guiModeCaption() const
  42. {
  43. return i18n("Look and Feel");
  44. }
  45. void GUIModeSelector::createFrame( TQFrame* frame )
  46. {
  47. TQVBoxLayout* layout = new TQVBoxLayout( frame );
  48. TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
  49. TQButtonGroup* group = new TQButtonGroup( frame );
  50. group->setColumnLayout(0, Qt::Vertical );
  51. TQVBoxLayout* lgroup = new TQVBoxLayout( group->layout() );
  52. optionWizard = new TQRadioButton( group );
  53. optionWizard->setText( i18n("Use &wizard style GUI (beginners)") );
  54. optionTabs = new TQRadioButton( group );
  55. optionTabs->setText( i18n("Use &tabbed GUI (advanced users)") );
  56. lgroup->addWidget( new TQLabel( i18n("Configure the look and feel of the KRename GUI:<br>"), group ) );
  57. lgroup->addWidget( optionWizard );
  58. lgroup->addWidget( optionTabs );
  59. lgroup->addItem( spacer );
  60. layout->addWidget( group );
  61. layout->addItem( spacer );
  62. }