mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-19 08:39:57 +00:00
some work on configuration interface
correct file locations create configuration slots TODO сделать этот ебаный коннектор или выкинуть его нахуй
This commit is contained in:
@ -267,11 +267,13 @@ QString AWActions::selectDevices(const QStringList source, const QStringList cur
|
||||
QDialog *dialog = new QDialog(0);
|
||||
QListWidget *widget = new QListWidget(dialog);
|
||||
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
|
||||
Qt::Horizontal, dialog);
|
||||
Qt::Vertical, dialog);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dialog);
|
||||
layout->addWidget(widget);
|
||||
layout->addWidget(buttons);
|
||||
dialog->setLayout(layout);
|
||||
connect(buttons, SIGNAL(accepted()), dialog, SLOT(accept()));
|
||||
connect(buttons, SIGNAL(rejected()), dialog, SLOT(reject()));
|
||||
|
||||
// fill
|
||||
for (int i=0; i<source.count(); i++) {
|
||||
@ -286,6 +288,7 @@ QString AWActions::selectDevices(const QStringList source, const QStringList cur
|
||||
// exec
|
||||
QStringList selected;
|
||||
int ret = dialog->exec();
|
||||
if (debug) qDebug() << PDEBUG << ":" << "Dialog returns" << ret;
|
||||
if (ret == QDialog::Accepted) {
|
||||
for (int i=0; i<widget->count(); i++)
|
||||
if (widget->item(i)->checkState() == Qt::Checked)
|
||||
|
Reference in New Issue
Block a user