1.3.1
This commit is contained in:
parent
798259cb9d
commit
b05feeedcb
|
@ -80,6 +80,7 @@ CConfigDialog::CConfigDialog(QWidget* parent)
|
|||
: QDialog(parent)
|
||||
{
|
||||
m_pStack = NULL;
|
||||
m_pSearch = NULL;
|
||||
m_pTree = NULL;
|
||||
}
|
||||
|
||||
|
@ -94,12 +95,12 @@ QWidget* CConfigDialog::ConvertToTree(QTabWidget* pTabWidget)
|
|||
QStyle* pStyle = QStyleFactory::create("windows"); // show lines
|
||||
m_pTree->setStyle(pStyle);
|
||||
connect(m_pTree, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(OnItemClicked(QTreeWidgetItem*, int)));
|
||||
QLineEdit* pSearch = new QLineEdit();
|
||||
pSearch->setPlaceholderText(tr("Search Option"));
|
||||
QObject::connect(pSearch, SIGNAL(returnPressed()), this, SLOT(OnSearchOption()));
|
||||
m_pSearch = new QLineEdit();
|
||||
m_pSearch->setPlaceholderText(tr("Search Option"));
|
||||
QObject::connect(m_pSearch, SIGNAL(returnPressed()), this, SLOT(OnSearchOption()));
|
||||
m_SearchI = m_SearchJ = m_SearchP = 0;
|
||||
m_LastFound = NULL;
|
||||
pLayout->addWidget(pSearch, 0, 0);
|
||||
pLayout->addWidget(m_pSearch, 0, 0);
|
||||
pLayout->addWidget(m_pTree, 1, 0);
|
||||
m_pStack = new QStackedLayout();
|
||||
m_pStack->setContentsMargins(0, 0, 0, 0);
|
||||
|
@ -189,8 +190,7 @@ QWidget* CConfigDialog__SearchOption(QTreeWidget* pTree, QStackedLayout* pStack,
|
|||
|
||||
void CConfigDialog::OnSearchOption()
|
||||
{
|
||||
QLineEdit* pSearch = (QLineEdit*)sender();
|
||||
QString Text = pSearch->text().toLower();
|
||||
QString Text = m_pSearch->text().toLower();
|
||||
|
||||
if (m_LastFound) {
|
||||
//m_LastFound->setPalette(QApplication::palette());
|
||||
|
|
|
@ -446,6 +446,7 @@ protected:
|
|||
virtual void OnTab(int iTabID) = 0;
|
||||
|
||||
QStackedLayout* m_pStack;
|
||||
QLineEdit* m_pSearch;
|
||||
QTreeWidget* m_pTree;
|
||||
int m_iCurrentTab;
|
||||
int m_SearchI;
|
||||
|
|
|
@ -316,7 +316,6 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
|
|||
ui.treeAccess->viewport()->installEventFilter(this);
|
||||
ui.treeINet->viewport()->installEventFilter(this);
|
||||
ui.treeNetFw->viewport()->installEventFilter(this);
|
||||
ui.treeOptions->viewport()->installEventFilter(this);
|
||||
this->installEventFilter(this); // prevent enter from closing the dialog
|
||||
|
||||
restoreGeometry(theConf->GetBlob("OptionsWindow/Window_Geometry"));
|
||||
|
|
Loading…
Reference in New Issue