Typica is a free program for professional coffee roasters. https://typica.us
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.

qextwineventnotifier_p.h 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /****************************************************************************
  2. ** Copyright (c) 2000-2003 Wayne Roth
  3. ** Copyright (c) 2004-2007 Stefan Sander
  4. ** Copyright (c) 2007 Michal Policht
  5. ** Copyright (c) 2008 Brandon Fosdick
  6. ** Copyright (c) 2009-2010 Liam Staskawicz
  7. ** Copyright (c) 2011 Debao Zhang
  8. ** All right reserved.
  9. ** Web: http://code.google.com/p/qextserialport/
  10. **
  11. ** Permission is hereby granted, free of charge, to any person obtaining
  12. ** a copy of this software and associated documentation files (the
  13. ** "Software"), to deal in the Software without restriction, including
  14. ** without limitation the rights to use, copy, modify, merge, publish,
  15. ** distribute, sublicense, and/or sell copies of the Software, and to
  16. ** permit persons to whom the Software is furnished to do so, subject to
  17. ** the following conditions:
  18. **
  19. ** The above copyright notice and this permission notice shall be
  20. ** included in all copies or substantial portions of the Software.
  21. **
  22. ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  23. ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  24. ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25. ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  26. ** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  27. ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28. ** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29. **
  30. ****************************************************************************/
  31. #ifndef QEXTWINEVENTNOTIFIER_P_H_
  32. #define QEXTWINEVENTNOTIFIER_P_H_
  33. //
  34. // W A R N I N G
  35. // -------------
  36. //
  37. // This file is not part of the QESP API. It exists for the convenience
  38. // of other QESP classes. This header file may change from version to
  39. // version without notice, or even be removed.
  40. //
  41. // We mean it.
  42. //
  43. #include <QtCore/QObject>
  44. #include <QtCore/qt_windows.h>
  45. #include "qextserialport_global.h"
  46. class QextWinEventNotifierPrivate;
  47. class QEXTSERIALPORT_EXPORT QextWinEventNotifier : public QObject
  48. {
  49. Q_OBJECT
  50. Q_DECLARE_PRIVATE(QextWinEventNotifier)
  51. public:
  52. explicit QextWinEventNotifier(QObject *parent = 0);
  53. explicit QextWinEventNotifier(HANDLE hEvent, QObject *parent = 0);
  54. ~QextWinEventNotifier();
  55. void setHandle(HANDLE hEvent);
  56. HANDLE handle() const;
  57. bool isEnabled() const;
  58. public Q_SLOTS:
  59. void setEnabled(bool enable);
  60. Q_SIGNALS:
  61. void activated(HANDLE hEvent);
  62. protected:
  63. bool event(QEvent * e);
  64. private:
  65. Q_DISABLE_COPY(QextWinEventNotifier)
  66. QextWinEventNotifierPrivate * d_ptr;
  67. };
  68. #endif // QEXTWINEVENTNOTIFIER_P_H_