File tree 3 files changed +14
-8
lines changed
3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 22
22
#define _CONFIG_H
23
23
24
24
#define PROGRAM_NAME "PICO SST39sf0x0 Programmer"
25
- #define PROGRAM_VERSION "1.5.0 "
25
+ #define PROGRAM_VERSION "1.5.1 "
26
26
#define UNUSED (x ) (void)(x)
27
27
28
28
#endif // _CONFIG_H
Original file line number Diff line number Diff line change @@ -28,20 +28,30 @@ HexViewWidget::HexViewWidget(QWidget *parent)
28
28
: QAbstractScrollArea{parent} {
29
29
}
30
30
31
+ /* *
32
+ * @brief set data for the HexView class to display
33
+ * @param _data data to display
34
+ */
35
+ void HexViewWidget::set_data (const QByteArray& _data) {
36
+ QMutexLocker locker (&this ->lock );
37
+ this ->data = _data;
38
+ this ->viewport ()->update ();
39
+ }
40
+
31
41
/* *
32
42
* @brief Draw the contents of the HexViewer widget
33
43
* @param event
34
44
*/
35
45
void HexViewWidget::paintEvent (QPaintEvent *event) {
36
- QMutexLocker (&this ->lock );
46
+ QMutexLocker locker (&this ->lock );
37
47
38
48
this ->update_positions ();
39
49
40
50
QPainter painter (viewport ());
41
51
QSize area_size = viewport ()->size ();
42
52
QSize widget_size = this ->get_widget_size ();
43
53
this ->verticalScrollBar ()->setPageStep (area_size.height () / charheight);
44
- this ->verticalScrollBar ()->setRange (0 , (widget_size.height () - area_size.height ()) / charheight + 1 );
54
+ this ->verticalScrollBar ()->setRange (0 , (widget_size.height () - area_size.height ()) / charheight + 2 );
45
55
46
56
// grab colors
47
57
settings.sync ();
Original file line number Diff line number Diff line change @@ -70,11 +70,7 @@ class HexViewWidget : public QAbstractScrollArea
70
70
* @brief set data for the HexView class to display
71
71
* @param _data data to display
72
72
*/
73
- void set_data (const QByteArray& _data) {
74
- QMutexLocker (&this ->lock );
75
- this ->data = _data;
76
- this ->viewport ()->update ();
77
- }
73
+ void set_data (const QByteArray& _data);
78
74
79
75
/* *
80
76
* @brief Grab data from HexViewer class
You can’t perform that action at this time.
0 commit comments