LineEditForm.h 854 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * ImageDescriptionForm.h
  3. *
  4. * Created on: Oct 6, 2011
  5. * Author: Gapchich Vlad
  6. */
  7. #ifndef __LINEEDITFORM_H__
  8. #define __LINEEDITFORM_H__
  9. #include <QWidget>
  10. class QLineEdit;
  11. class QPushButton;
  12. class QVBoxLayout;
  13. class QHBoxLayout;
  14. class QKeyEvent;
  15. enum FormPurpose {
  16. NoPurpose,
  17. ImageDescriptionPurpose,
  18. TaggingPurpose
  19. };
  20. class LineEditForm : public QWidget {
  21. Q_OBJECT
  22. protected:
  23. void keyPressEvent(QKeyEvent *anEvent);
  24. public:
  25. LineEditForm(QWidget *aParent = 0);
  26. virtual ~LineEditForm();
  27. FormPurpose purpose();
  28. public slots:
  29. void setData();
  30. void setDescription();
  31. void setTags();
  32. signals:
  33. void dataSet(QString aData);
  34. private:
  35. QLineEdit *data_;
  36. QPushButton *button_ok_;
  37. QPushButton *button_cancel_;
  38. QVBoxLayout *layout_v_;
  39. QHBoxLayout *layout_h_;
  40. FormPurpose purpose_;
  41. };
  42. #endif /* __LINEEDITFORM_H__ */
  43. /*
  44. *
  45. */