Skip to content

Commit

Permalink
prefs UI redesign - more
Browse files Browse the repository at this point in the history
  • Loading branch information
psemiletov committed Aug 29, 2016
1 parent 817c91c commit 2079d02
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 260 deletions.
25 changes: 25 additions & 0 deletions gui_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,31 @@ QComboBox* new_combobox (QBoxLayout *layout,
return r;
}

QComboBox* new_combobox (QBoxLayout *layout,
const QString &label,
const QStringList &items,
int index)
{
QHBoxLayout *lt_h = new QHBoxLayout;
QLabel *l = new QLabel (label);

QComboBox *r = new QComboBox;

r->addItems (items);
r->setCurrentIndex (index);

//lt_h->addWidget (l, 1, Qt::AlignLeft);
//lt_h->addWidget (r);

lt_h->insertWidget (-1, l, 0, Qt::AlignLeft);
lt_h->insertWidget (-1, r, 1, Qt::AlignLeft);

layout->addLayout (lt_h);

return r;
}


/*
CTextListWindow::CTextListWindow (const QString &title, const QString &label_text): QDialog (0)
{
Expand Down
6 changes: 6 additions & 0 deletions gui_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@ QComboBox* new_combobox (QBoxLayout *layout,
const QString &def_value);


QComboBox* new_combobox (QBoxLayout *layout,
const QString &label,
const QStringList &items,
int index);


#endif // GUI_UTILS_H
Loading

0 comments on commit 2079d02

Please sign in to comment.