datawindow.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. Zint Barcode Generator - the open source barcode generator
  3. Copyright (C) 2009-2022 Robin Stuart <rstuart114@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. /* SPDX-License-Identifier: GPL-3.0-or-later */
  17. #ifndef DATAWINDOW_H
  18. #define DATAWINDOW_H
  19. #include "ui_extData.h"
  20. class DataWindow : public QDialog, private Ui::DataDialog
  21. {
  22. Q_OBJECT
  23. public:
  24. DataWindow(const QString &input, bool isEscaped, int seg_no);
  25. ~DataWindow();
  26. bool Valid;
  27. bool Escaped;
  28. QString DataOutput;
  29. signals:
  30. void dataChanged(const QString& text, bool escaped, int seg_no);
  31. private slots:
  32. void clear_data();
  33. void text_changed();
  34. void okay();
  35. void from_file();
  36. private:
  37. QString escapedData(bool &escaped);
  38. bool m_isEscaped;
  39. int m_seg_no;
  40. };
  41. /* vim: set ts=4 sw=4 et : */
  42. #endif