Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mon_gui] Change font for new topics in mon_gui #1879

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

albrechtdennis
Copy link

Description

When new topics appear in the gui, the font is set to bolt.
A variable named "tree_item_counter" is assigned to the new topic, which increases by 2 every monitor update.
The font stays bolt until the value of the variable exceeds 20, after which the font will return to normal.

@albrechtdennis albrechtdennis force-pushed the feature/mon_font_new_topics branch from 0fa0d18 to bb01fec Compare January 8, 2025 12:25
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

}
else
{
auto& tree_entry = topic_tree_item_map_.at(topic_id);
auto topic_tree_item = tree_entry.tree_item;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'auto topic_tree_item' can be declared as 'auto *topic_tree_item' [readability-qualified-auto]

Suggested change
auto topic_tree_item = tree_entry.tree_item;
auto *topic_tree_item = tree_entry.tree_item;


for (int i = 0; i < columnCount(); i++)
{
int column = mapColumnToItem(i, (int)TreeItemType::Topic);
if (column >= 0)
{
QString name = headerData(i, Qt::Orientation::Horizontal, Qt::ItemDataRole::DisplayRole).toString();
column_name_mapping.push_back(QPair<int, QString>(column, name));
QVariant name = headerData(i, Qt::Orientation::Horizontal, Qt::ItemDataRole::DisplayRole);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'name' of type 'QVariant' can be declared 'const' [misc-const-correctness]

Suggested change
QVariant name = headerData(i, Qt::Orientation::Horizontal, Qt::ItemDataRole::DisplayRole);
QVariant const name = headerData(i, Qt::Orientation::Horizontal, Qt::ItemDataRole::DisplayRole);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant