Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
41214c9d
Commit
41214c9d
authored
Dec 21, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: ge_curve should not be modal.
parent
6679d23c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
31 deletions
+15
-31
xtt/lib/ge/qt/ge_curve_qt.cqt
xtt/lib/ge/qt/ge_curve_qt.cqt
+12
-27
xtt/lib/ge/qt/ge_curve_qt.h
xtt/lib/ge/qt/ge_curve_qt.h
+3
-4
No files found.
xtt/lib/ge/qt/ge_curve_qt.cqt
View file @
41214c9d
...
...
@@ -693,11 +693,7 @@ void GeCurveQt::reset_cursor()
void* GeCurveQt::get_widget()
{
if (options & curve_mOptions_Embedded) {
return vbox;
} else {
return this;
}
return toplevel;
}
GeCurveQt::~GeCurveQt()
...
...
@@ -731,26 +727,22 @@ GeCurveQt::GeCurveQt(void* gc_parent_ctx, QWidget* parent_widget,
gc_width, gc_height, gc_options, gc_color_theme),
disable_timecombo_callback(0)
{
int window_width = 900;
int window_height = 700;
if (cd == NULL) {
// Error from GeCurve constructor
return;
}
int window_width = gc_width ? gc_width : 900;
int window_height = gc_height ? gc_height : 700;
const int names_height = 150;
const int nav_height = 120;
float height_scale = 1;
if (gc_width != 0) {
window_width = gc_width;
}
if (gc_height != 0) {
height_scale = (float)gc_height / window_height;
window_height = gc_height;
}
str_StrncpyCutOff(title, curve_name, sizeof(title), 1);
// Qt
toplevel = new GeCurveQtWidget(this, parent_widget);
toplevel = new GeCurveQtWidget(this);
toplevel->setMinimumSize(window_width, window_height);
if (!(options & curve_mOptions_Embedded)) {
toplevel->setMinimumSize(window_width, window_height);
toplevel->setWindowTitle(convert_utf8(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
...
...
@@ -904,16 +896,13 @@ GeCurveQt::GeCurveQt(void* gc_parent_ctx, QWidget* parent_widget,
vbox_layout->addWidget(timetools);
add_expanding(vbox_layout, vpaned);
toplevel->setLayout(vbox_layout);
if (!(options & curve_mOptions_Embedded)) {
toplevel->setLayout(vbox_layout);
toplevel->show();
} else {
vbox = layout_to_widget(vbox_layout);
vbox->setMinimumSize(window_width, window_height);
}
QList<int> sizes;
float height_scale = gc_height ? (gc_height / 700) : 1;
sizes << names_height * height_scale;
sizes << (window_height - names_height - nav_height) * height_scale;
sizes << nav_height * height_scale;
...
...
@@ -950,9 +939,5 @@ GeCurveQt::GeCurveQt(void* gc_parent_ctx, QWidget* parent_widget,
} else if (options & curve_mOptions_Invisible) {
toplevel->setVisible(false);
}
if (basewidget) {
toplevel->setModal(true);
}
}
}
xtt/lib/ge/qt/ge_curve_qt.h
View file @
41214c9d
...
...
@@ -57,7 +57,6 @@ public:
~
GeCurveQt
();
GeCurveQtWidget
*
toplevel
;
QWidget
*
vbox
;
QWidget
*
growcurve_main_widget
;
QWidget
*
growaxis_main_widget
;
QWidget
*
grownames_main_widget
;
...
...
@@ -103,12 +102,12 @@ public:
void
*
get_widget
();
};
class
GeCurveQtWidget
:
public
Q
Dialog
{
class
GeCurveQtWidget
:
public
Q
Widget
{
Q_OBJECT
public:
GeCurveQtWidget
(
GeCurveQt
*
parent
_ctx
,
QWidget
*
parent
)
:
Q
Dialog
(
parent
),
curve
(
parent_ctx
)
GeCurveQtWidget
(
GeCurveQt
*
parent
)
:
Q
Widget
(),
curve
(
parent
)
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment