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
9db688c8
Commit
9db688c8
authored
Jun 07, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fixed CoWowListWidget.
parent
0ff83e88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
19 deletions
+13
-19
xtt/lib/cow/qt/cow_wow_qt.cqt
xtt/lib/cow/qt/cow_wow_qt.cqt
+13
-19
No files found.
xtt/lib/cow/qt/cow_wow_qt.cqt
View file @
9db688c8
...
@@ -205,26 +205,22 @@ void CoWowListWidgetQt::list_row_activated_cb(QTreeWidgetItem* item, int i)
...
@@ -205,26 +205,22 @@ void CoWowListWidgetQt::list_row_activated_cb(QTreeWidgetItem* item, int i)
void CoWowListWidgetQt::list_apply_cb()
void CoWowListWidgetQt::list_apply_cb()
{
{
button_pressed = 0;
QString selected_text;
QList<QTreeWidgetItem*> selected_items = list->selectedItems();
QList<QTreeWidgetItem*> selected_items = list->selectedItems();
if (selected_items.size() > 0) {
if (selected_items.size() > 0 && action_cb) {
QTreeWidgetItem* item = selected_items[0];
if (button_pressed == -1)
selected_text = item->text(0);
button_pressed = 0;
action_cb(parent_ctx, qPrintableLatin1(selected_items[0]->text(0)),
button_pressed);
}
}
if (action_cb) {
(action_cb)(parent_ctx, qPrintableLatin1(selected_text), button_pressed);
}
close();
}
}
void CoWowListWidgetQt::list_ok_cb()
void CoWowListWidgetQt::list_ok_cb()
{
{
button_pressed = 1;
if (list->selectedItems().size() > 0) {
list_apply_cb();
button_pressed = 1;
close();
list_apply_cb();
close();
}
}
}
CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
...
@@ -298,15 +294,13 @@ void* CoWowQt::CreateList(const char* title, const char* texts, int textsize,
...
@@ -298,15 +294,13 @@ void* CoWowQt::CreateList(const char* title, const char* texts, int textsize,
void(action_cb)(void*, char*, int), void(cancel_cb)(void*),
void(action_cb)(void*, char*, int), void(cancel_cb)(void*),
void* parent_ctx, int show_apply_button)
void* parent_ctx, int show_apply_button)
{
{
CoWowListWidgetQt* tree = new CoWowListWidgetQt(object->parent_wid, title,
return new CoWowListWidgetQt(object->parent_wid, title, texts, textsize,
texts, textsize, action_cb, cancel_cb, parent_ctx, show_apply_button);
action_cb, cancel_cb, parent_ctx, show_apply_button);
return tree;
}
}
void CoWowQt::PopList(void* data)
void CoWowQt::PopList(void* data)
{
{
CoWowListWidgetQt* ctx = (CoWowListWidgetQt*)data;
pop((CoWowListWidgetQt*)data);
pop(ctx);
}
}
void CoWowWarrantQt::reject()
void CoWowWarrantQt::reject()
...
...
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