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.

77 lines
2.2KB

  1. /***************************************************************************
  2. numberdialog.h - description
  3. -------------------
  4. begin : Don Apr 24 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. #ifndef NUMBERDIALOG_H
  17. #define NUMBERDIALOG_H
  18. #include <tqwidget.h>
  19. #include <kdialogbase.h>
  20. #include <tqvaluelist.h>
  21. // KDE includes
  22. #include <knuminput.h>
  23. class KMyIntSpinBox : public KIntSpinBox
  24. {
  25. Q_OBJECT
  26. TQ_OBJECT
  27. public:
  28. KMyIntSpinBox( TQWidget* parent )
  29. : KIntSpinBox( parent )
  30. { };
  31. ~KMyIntSpinBox() { };
  32. private:
  33. void keyPressEvent( TQKeyEvent* e );
  34. signals:
  35. void returnPressed();
  36. };
  37. class TQCheckBox;
  38. class KIntNumInput;
  39. class KListBox;
  40. class KPushButton;
  41. class NumberDialog : public KDialogBase {
  42. Q_OBJECT
  43. TQ_OBJECT
  44. public:
  45. NumberDialog(TQValueList<int> & n,TQWidget *parent=0);
  46. ~NumberDialog();
  47. // TODO: bad object oriented design!!!
  48. // make them accessible by members
  49. KIntNumInput* spinIndex;
  50. KIntNumInput* spinStep;
  51. TQCheckBox* checkResetCounter;
  52. TQValueList<int> getList();
  53. private slots:
  54. void addNumber();
  55. void removeNumber();
  56. private:
  57. void sort();
  58. KListBox* listNumbers;
  59. KPushButton* buttonAdd;
  60. KPushButton* buttonRemove;
  61. KMyIntSpinBox* spinNumber;
  62. };
  63. #endif