-
Notifications
You must be signed in to change notification settings - Fork 0
/
drill_size_selector.h
49 lines (39 loc) · 1.16 KB
/
drill_size_selector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef DRILL_SIZE_SELECTOR_H
#define DRILL_SIZE_SELECTOR_H
#include <QWidget>
//#include <QMainWindow>
#include <QFile>
#include <QDebug>
#include <QTableWidget>
#include <QVBoxLayout>
#include <QSizePolicy>
#include <QHeaderView>
#include <algorithm>
#include <QClipboard>
#include "SendKeys.h"
#include <QKeyEvent>
class drill_size_selector : public QWidget
{
Q_OBJECT
public:
explicit drill_size_selector(QClipboard &clipboard, QWidget *parent = nullptr);
virtual void keyPressEvent(QKeyEvent *event) override;
double INPUT_VALUE = 35.7188;
bool using_inches = true;
QBrush *row_highlight = new QBrush( QColor(0x5f4d29) );
QTableWidget *drill_table;
int GetBestMatch(std::vector<double> array, double INPUT_VALUE); //Returns and index
QClipboard *clipboard = nullptr;
void setInputValue(double value);
void useInches();
void useMillis();
void reCalc();
std::vector<double> Diameter_Inches;
std::vector<double> Diameter_Millis;
void setLocation(QPoint point);
void clearRowHighlight();
QPoint *location;
public slots:
void print_cell_data(int row, int column);
};
#endif // DRILL_SIZE_SELECTOR_H