TDE graphics utilities
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.

kptoolflip.h 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. Copyright (c) 2003,2004,2005 Clarence Dang <dang@kde.org>
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions
  6. are met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  13. IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  14. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  16. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  17. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  18. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  19. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  20. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  21. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. */
  23. #ifndef __kptoolflip_h__
  24. #define __kptoolflip_h__
  25. #include <kpcommandhistory.h>
  26. #include <kdialogbase.h>
  27. class TQRadioButton;
  28. class TQString;
  29. class kpDocument;
  30. class kpMainWindow;
  31. class kpToolFlipCommand : public kpCommand
  32. {
  33. public:
  34. kpToolFlipCommand (bool actOnSelection,
  35. bool horiz, bool vert,
  36. kpMainWindow *mainWindow);
  37. virtual ~kpToolFlipCommand ();
  38. virtual TQString name () const;
  39. virtual int size () const;
  40. virtual void execute ();
  41. virtual void unexecute ();
  42. private:
  43. void flip ();
  44. bool m_actOnSelection;
  45. bool m_horiz, m_vert;
  46. };
  47. class kpToolFlipDialog : public KDialogBase
  48. {
  49. Q_OBJECT
  50. public:
  51. kpToolFlipDialog (bool actOnSelection, TQWidget *parent);
  52. ~kpToolFlipDialog ();
  53. private:
  54. static bool s_lastIsVerticalFlip;
  55. public slots:
  56. void slotIsVerticalFlipChanged ();
  57. public:
  58. bool getHorizontalFlip () const;
  59. bool getVerticalFlip () const;
  60. bool isNoOp () const;
  61. private:
  62. TQRadioButton *m_horizontalFlipRadioButton, *m_verticalFlipRadioButton;
  63. };
  64. #endif // __kptoolflip_h__