MagicSmoke  $VERSION$
barcodeline.h
Go to the documentation of this file.
1 //
2 // C++ Interface: barcode line edit
3 //
4 // Description:
5 //
6 //
7 // Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2014
8 //
9 // Copyright: See README/COPYING.GPL files that come with this distribution
10 //
11 //
12 
13 #ifndef MAGICSMOKE_BARCODELINE_H
14 #define MAGICSMOKE_BARCODELINE_H
15 
16 #include <QLineEdit>
17 
18 #include "commonexport.h"
19 
20 class MAGICSMOKE_COMMON_EXPORT MBarcodeLine:public QLineEdit
21 {
22  Q_OBJECT
23  public:
24  explicit MBarcodeLine(QWidget* parent = 0);
25  explicit MBarcodeLine(const QString& , QWidget* parent = 0);
26 
27  enum class ScanMode{
28  InFocus,
29  InBackground,
30  ForceFocus,
31  };
32 
33  ScanMode scanMode()const{return mscanmode;}
34 
35  private slots:
36  void setBarcode(QString);
37 
38  public slots:
39  void setScanMode(ScanMode mode){mscanmode=mode;}
40 
41  signals:
42  void askForFocus();
43 
44  private:
45  ScanMode mscanmode=ScanMode::InFocus;
46 };
47 
48 #endif
Definition: barcodeline.h:20
#define MAGICSMOKE_COMMON_EXPORT
Definition: commonexport.h:7
ScanMode scanMode() const
Definition: barcodeline.h:33
ScanMode
Definition: barcodeline.h:27
void setScanMode(ScanMode mode)
Definition: barcodeline.h:39