Skip to content

Commit b0bc209

Browse files
committed
update
1 parent 7d8da22 commit b0bc209

52 files changed

Lines changed: 1283 additions & 542 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1212
- updated code to be qt6 comaptible
1313
- greately improved dark mode
1414
- improved driver statis information on startup
15+
- updated MiscHelpers.dll, improved finder
1516

1617
### Fixed
1718
- fixed Closing System Info closes also the TaskExplorer [#34](https://github.com/DavidXanatos/TaskExplorer/issues/34)

MiscHelpers/Common/ComboInputDialog.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class CComboInputDialogPrivate
3737

3838
combo = new QComboBox(q);
3939

40+
infoLabel = new QLabel(q);
41+
infoLabel->setVisible(false);
42+
infoLabel->setWordWrap(true);
4043

4144
buttonBox = new QDialogButtonBox(q);
4245
buttonBox->setOrientation(Qt::Horizontal);
@@ -53,15 +56,18 @@ class CComboInputDialogPrivate
5356
QVBoxLayout *verticalLayout_2 = new QVBoxLayout(q);
5457
verticalLayout_2->addLayout(horizontalLayout_2);
5558
verticalLayout_2->addWidget(combo);
59+
verticalLayout_2->addWidget(infoLabel);
5660
verticalLayout_2->addItem(buttonSpacer);
5761
verticalLayout_2->addWidget(buttonBox);
5862
}
5963

6064
QLabel *pixmapLabel;
6165
QLabel *messageLabel;
66+
QLabel *infoLabel;
6267
QComboBox* combo;
6368
QDialogButtonBox *buttonBox;
6469
QAbstractButton *clickedButton;
70+
QMap<int, QString> infos;
6571
};
6672

6773
CComboInputDialog::CComboInputDialog(QWidget *parent) :
@@ -71,6 +77,7 @@ CComboInputDialog::CComboInputDialog(QWidget *parent) :
7177
setModal(true);
7278
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
7379
d->combo->setFocus();
80+
connect(d->combo, SIGNAL(currentIndexChanged(int)), SLOT(onCmbIndex(int)));
7481
connect(d->buttonBox, SIGNAL(accepted()), SLOT(accept()));
7582
connect(d->buttonBox, SIGNAL(rejected()), SLOT(reject()));
7683
connect(d->buttonBox, SIGNAL(clicked(QAbstractButton*)),
@@ -82,6 +89,14 @@ CComboInputDialog::~CComboInputDialog()
8289
delete d;
8390
}
8491

92+
void CComboInputDialog::onCmbIndex(int index)
93+
{
94+
QString info = d->infos[index];
95+
if (!info.isEmpty())
96+
d->infoLabel->setVisible(true);
97+
d->infoLabel->setText(info);
98+
}
99+
85100
void CComboInputDialog::slotClicked(QAbstractButton *b)
86101
{
87102
d->clickedButton = b;
@@ -109,9 +124,11 @@ void CComboInputDialog::setText(const QString &t)
109124
d->messageLabel->setText(t);
110125
}
111126

112-
void CComboInputDialog::addItem(const QString& t, const QVariant & v)
127+
void CComboInputDialog::addItem(const QString& t, const QVariant & v, const QString& info)
113128
{
114129
d->combo->addItem(t, v);
130+
if (!info.isEmpty())
131+
d->infos[d->combo->count() - 1] = info;
115132
}
116133

117134
void CComboInputDialog::setEditable(bool b)

MiscHelpers/Common/ComboInputDialog.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MISCHELPERS_EXPORT CComboInputDialog: public QDialog
2323
QString text() const;
2424
void setText(const QString &);
2525

26-
void addItem(const QString&, const QVariant & = QVariant());
26+
void addItem(const QString&, const QVariant & = QVariant(), const QString& info = QString());
2727
void setEditable(bool);
2828

2929
QString value() const;
@@ -52,6 +52,7 @@ class MISCHELPERS_EXPORT CComboInputDialog: public QDialog
5252

5353
private slots:
5454
void slotClicked(QAbstractButton *b);
55+
void onCmbIndex(int index);
5556

5657
private:
5758
CComboInputDialogPrivate *d;

0 commit comments

Comments
 (0)