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
03e7bfab
Commit
03e7bfab
authored
Aug 15, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed QT reordering dialog buttons.
parent
d1b52cf9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
36 deletions
+54
-36
wb/lib/wb/qt/wb_wnav_qt.cqt
wb/lib/wb/qt/wb_wnav_qt.cqt
+1
-1
wb/lib/wb/qt/wb_wtt_qt.cqt
wb/lib/wb/qt/wb_wtt_qt.cqt
+10
-10
xtt/lib/cow/qt/cow_style_qt.cqt
xtt/lib/cow/qt/cow_style_qt.cqt
+23
-10
xtt/lib/cow/qt/cow_style_qt.h
xtt/lib/cow/qt/cow_style_qt.h
+9
-6
xtt/lib/cow/qt/cow_wow_qt.cqt
xtt/lib/cow/qt/cow_wow_qt.cqt
+11
-9
No files found.
wb/lib/wb/qt/wb_wnav_qt.cqt
View file @
03e7bfab
...
...
@@ -466,7 +466,7 @@ int WNavQt::confirm_dialog(
char* title, char* text, int display_cancel, int* cancel)
{
QMessageBox::StandardButton reply = QMessageBox::question(
form_widget, translate_utf8(title), translate_utf8(text));
form_widget, translate_utf8(title), translate_utf8(text)
, QMessageBox::Yes | QMessageBox::No
);
if (reply == QMessageBox::Yes) {
return 1;
...
...
wb/lib/wb/qt/wb_wtt_qt.cqt
View file @
03e7bfab
...
...
@@ -810,8 +810,7 @@ void WttQt::open_change_value()
return;
}
sts = wnav->check_attr_value(
sellist[0], &multiline, &value, &input_size);
sts = wnav->check_attr_value(sellist[0], &multiline, &value, &input_size);
if (EVEN(sts)) {
message('E', wnav_get_message(sts));
return;
...
...
@@ -948,8 +947,8 @@ void WttQt::open_change_name()
cmd_entry->set_recall_buffer(&name_recall);
cmd_entry->setFocus();
sts = ldh_ObjidToName(
ldhses, input_objid, ldh_eName_Object, name,
sizeof(name), &size);
sts = ldh_ObjidToName(
ldhses, input_objid, ldh_eName_Object, name,
sizeof(name), &size);
cmd_entry->setText(QString::fromLatin1(name));
...
...
@@ -1374,16 +1373,16 @@ void WttQtWidget::valchanged_cmd_entry()
switch (wtt->input_mode) {
case wtt_eInputMode_Attribute:
wtt->input_wnav->select_object(wtt->input_node);
sts = wtt->input_wnav->set_attr_value(
wtt->input_node, wtt->input_objid,
qPrintableLatin1(wtt->cmd_entry->text()));
sts = wtt->input_wnav->set_attr_value(
wtt->input_node, wtt->input_objid,
qPrintableLatin1(wtt->cmd_entry->text()));
if (EVEN(sts)) {
wtt->message('E', wnav_get_message(sts));
}
break;
case wtt_eInputMode_ObjectName:
wtt->input_wnav->select_object(wtt->input_node);
sts = wtt->input_wnav->set_object_name(
wtt->input_node, wtt->input_objid,
qPrintableLatin1(wtt->cmd_entry->text()));
sts = wtt->input_wnav->set_object_name(
wtt->input_node, wtt->input_objid,
qPrintableLatin1(wtt->cmd_entry->text()));
if (EVEN(sts)) {
wtt->message('E', wnav_get_message(sts));
}
...
...
@@ -1451,8 +1450,9 @@ void WttQt::open_confirm(const char* text, const char* title,
confirm_no_cb = no_cb;
QMessageBox::StandardButton reply = QMessageBox::question(toplevel,
translate_utf8(title), translate_utf8(text),
QMessageBox::Ok | QMessageBox::No | QMessageBox::Cancel);
if (reply == QMessageBox::Ok) {
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
if (reply == QMessageBox::Yes) {
if (ok_cb) {
(ok_cb)(this);
}
...
...
xtt/lib/cow/qt/cow_style_qt.cqt
View file @
03e7bfab
...
...
@@ -36,9 +36,12 @@
#include "cow_style_qt.h"
int PwrStyle::pixelMetric(PixelMetric which, const QStyleOption *option, const QWidget *widget) const
#include <QDialogButtonBox>
int PwrStyle::pixelMetric(
PixelMetric which, const QStyleOption* option, const QWidget* widget) const
{
switch
(which) {
switch
(which) {
case PM_LayoutLeftMargin:
case PM_LayoutTopMargin:
case PM_LayoutRightMargin:
...
...
@@ -48,3 +51,13 @@ int PwrStyle::pixelMetric(PixelMetric which, const QStyleOption *option, const Q
return QGtkStyle::pixelMetric(which, option, widget);
}
}
int PwrStyle::styleHint(StyleHint hint, const QStyleOption* option,
const QWidget* widget, QStyleHintReturn* returnData) const
{
if (hint == SH_DialogButtonLayout) {
return QDialogButtonBox::WinLayout;
}
return QGtkStyle::styleHint(hint, option, widget, returnData);
}
xtt/lib/cow/qt/cow_style_qt.h
View file @
03e7bfab
...
...
@@ -39,15 +39,18 @@
#include <QGtkStyle>
class
PwrStyle
:
public
QGtkStyle
{
class
PwrStyle
:
public
QGtkStyle
{
Q_OBJECT
public:
PwrStyle
()
:
QGtkStyle
()
{}
PwrStyle
()
:
QGtkStyle
()
{
}
int
pixelMetric
(
PixelMetric
which
,
const
QStyleOption
*
option
,
const
QWidget
*
widget
=
0
)
const
;
int
pixelMetric
(
PixelMetric
which
,
const
QStyleOption
*
option
,
const
QWidget
*
widget
=
0
)
const
;
int
styleHint
(
StyleHint
hint
,
const
QStyleOption
*
option
,
const
QWidget
*
widget
,
QStyleHintReturn
*
returnData
=
0
)
const
;
};
#endif
\ No newline at end of file
xtt/lib/cow/qt/cow_wow_qt.cqt
View file @
03e7bfab
...
...
@@ -99,8 +99,9 @@ void CoWowQt::DisplayQuestion(void* ctx, const char* title, const char* text,
void (*questionbox_ok)(void*, void*),
void (*questionbox_cancel)(void*, void*), void* data)
{
QMessageBox::StandardButton reply = QMessageBox::question(
object->parent_wid, translate_utf8(title), translate_utf8(text));
QMessageBox::StandardButton reply
= QMessageBox::question(object->parent_wid, translate_utf8(title),
translate_utf8(text), QMessageBox::Yes | QMessageBox::No);
if (reply == QMessageBox::Yes) {
if (questionbox_ok) {
...
...
@@ -393,9 +394,9 @@ CoWowWarrantQt::CoWowWarrantQt(CoWowQtObject* parent)
QPushButton* reject = buttons->addButton(
translate_utf8("Quit"), QDialogButtonBox::RejectRole);
QPushButton* accept = buttons->addButton(
translate_utf8("I Accept"), QDialogButtonBox::
Help
Role);
translate_utf8("I Accept"), QDialogButtonBox::
Reset
Role);
QPushButton* help = buttons->addButton(
translate_utf8("Show License"), QDialogButtonBox::
Accept
Role);
translate_utf8("Show License"), QDialogButtonBox::
Help
Role);
connect(accept, SIGNAL(clicked()), this, SLOT(accept()));
connect(reject, SIGNAL(clicked()), this, SLOT(reject()));
...
...
@@ -661,7 +662,7 @@ void CoWowEntryQt::keyPressEvent(QKeyEvent* event)
break;
}
case Qt::Key_Up: {
const char
*
prev = m_re->popUp(qPrintable(text()));
const char
*
prev = m_re->popUp(qPrintable(text()));
if (strcmp(prev, "") != 0) {
setText(fl(prev));
}
...
...
@@ -669,7 +670,7 @@ void CoWowEntryQt::keyPressEvent(QKeyEvent* event)
break;
}
case Qt::Key_Down: {
const char
*
next = m_re->popDown(qPrintable(text()));
const char
*
next = m_re->popDown(qPrintable(text()));
if (strcmp(next, "") != 0) {
setText(fl(next));
}
...
...
@@ -836,7 +837,8 @@ wow_sModalInputDialog* CoWowQt::CreateModalInputDialog(const char* title,
wow_sModalInputDialog* ret = new wow_sModalInputDialog();
ret->status = status;
strncpy(ret->input_str, qPrintableLatin1(dialog_w->text()), sizeof(ret->input_str));
strncpy(ret->input_str, qPrintableLatin1(dialog_w->text()),
sizeof(ret->input_str));
return ret;
}
...
...
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