Commit dd129da5 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed ge_curve: the growcurve_main_widget did not respect the size of the...

QT: Fixed ge_curve: the growcurve_main_widget did not respect the size of the other widgets, and thus covered the whole window.
parent bba89bb4
This diff is collapsed.
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "ge_curve.h" #include "ge_curve.h"
#include <QComboBox> #include <QComboBox>
#include <QToolBar>
class GeCurveQtWidget; class GeCurveQtWidget;
...@@ -61,14 +62,13 @@ public: ...@@ -61,14 +62,13 @@ public:
QWidget* growaxis_main_widget; QWidget* growaxis_main_widget;
QWidget* grownames_main_widget; QWidget* grownames_main_widget;
QWidget* nav_widget; QWidget* nav_widget;
QWidget* minmax_widget; QLineEdit* export_filename_widget;
QLineEdit* minmax_textmin_widget; QAction* menu_add;
QLineEdit* minmax_textmax_widget; QAction* menu_new;
QWidget* menu_new; QAction* menu_save;
QWidget* menu_save; QAction* menu_open;
QWidget* menu_open; QAction* menu_snapshot;
QWidget* menu_snapshot; QAction* menu_export;
QWidget* menu_export;
QAction* tools_snapshot; QAction* tools_snapshot;
QAction* tools_add; QAction* tools_add;
QAction* tools_curvetype_line; QAction* tools_curvetype_line;
...@@ -77,13 +77,7 @@ public: ...@@ -77,13 +77,7 @@ public:
QAction* tools_curvetype_square; QAction* tools_curvetype_square;
QAction* tools_curve_fill; QAction* tools_curve_fill;
QAction* tools_curve_digsplit; QAction* tools_curve_digsplit;
QWidget* export_widget; QToolBar* timetools;
QComboBox* export_attrcombo_widget;
QLineEdit* export_fromtime_widget;
QLineEdit* export_totime_widget;
QLineEdit* export_rows_widget;
QLineEdit* export_filename_widget;
QWidget* sea_timebox;
QLineEdit* timebox_start_time; QLineEdit* timebox_start_time;
QLineEdit* timebox_stop_time; QLineEdit* timebox_stop_time;
QComboBox* timebox_timecombo; QComboBox* timebox_timecombo;
...@@ -96,8 +90,6 @@ public: ...@@ -96,8 +90,6 @@ public:
void open_minmax(int idx); void open_minmax(int idx);
void open_export(pwr_tTime* from, pwr_tTime* to, int rows, char* filename); void open_export(pwr_tTime* from, pwr_tTime* to, int rows, char* filename);
void axis_set_width(int width); void axis_set_width(int width);
void create_minmax_dialog();
void create_export_dialog();
void set_inputfocus(); void set_inputfocus();
void enable(unsigned int mask); void enable(unsigned int mask);
void setup(unsigned int mask); void setup(unsigned int mask);
...@@ -109,9 +101,6 @@ public: ...@@ -109,9 +101,6 @@ public:
void set_clock_cursor(); void set_clock_cursor();
void reset_cursor(); void reset_cursor();
void* get_widget(); void* get_widget();
static void export_file_selected_cb(
void* ctx, char* filename, wow_eFileSelType file_type);
}; };
class GeCurveQtWidget : public QDialog { class GeCurveQtWidget : public QDialog {
...@@ -158,11 +147,6 @@ public slots: ...@@ -158,11 +147,6 @@ public slots:
void activate_digsplit(); void activate_digsplit();
void activate_xlimits(); void activate_xlimits();
void activate_help(); void activate_help();
void activate_minmax_ok();
void activate_minmax_cancel();
void activate_minmax_save();
void activate_export_ok();
void activate_export_cancel();
void activate_export_browse(); void activate_export_browse();
private: private:
......
...@@ -1615,18 +1615,22 @@ int GeCurve::read_file(char* filename) ...@@ -1615,18 +1615,22 @@ int GeCurve::read_file(char* filename)
dcli_translate_filename(fname, filename); dcli_translate_filename(fname, filename);
fp = fopen(fname, "r"); fp = fopen(fname, "r");
if (!fp) if (!fp) {
fprintf(stderr, "Error! Cannot open curve file: '%s'!\n", fname);
return 0; return 0;
}
// Attribute names in first line // Attribute names in first line
if (!dcli_read_line(line, sizeof(line), fp)) { if (!dcli_read_line(line, sizeof(line), fp)) {
fclose(fp); fclose(fp);
fprintf(stderr, "Error! Cannot read curve file: '%s'!\n", fname);
return 0; return 0;
} }
nr = dcli_parse(line, " ", "", (char*)item_str, nr = dcli_parse(line, " ", "", (char*)item_str,
sizeof(item_str) / sizeof(item_str[0]), sizeof(item_str[0]), 0); sizeof(item_str) / sizeof(item_str[0]), sizeof(item_str[0]), 0);
if (nr == 0) { if (nr == 0) {
fclose(fp); fclose(fp);
fprintf(stderr, "Error! Cannot parse curve file: '%s'!\n", fname);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment