검색시 출처 기능 추가
git-svn-id: svn://192.168.0.12/source@7 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
@@ -82,6 +82,7 @@ QGroupBox *Widget::setKeywordWidgets()
|
||||
m_pcbRealTime->addItems(QStringList() << "false" << "true");
|
||||
|
||||
m_pleKeyword = new QLineEdit;
|
||||
m_pleAuthorship = new QLineEdit;
|
||||
}
|
||||
{
|
||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||
@@ -92,6 +93,8 @@ QGroupBox *Widget::setKeywordWidgets()
|
||||
hlayout->addWidget(m_pdeStart);
|
||||
hlayout->addWidget(new QLabel("End:"));
|
||||
hlayout->addWidget(m_pdeEnd);
|
||||
hlayout->addWidget(new QLabel("Authorship:"));
|
||||
hlayout->addWidget(m_pleAuthorship);
|
||||
vlayout->addLayout(hlayout);
|
||||
}
|
||||
{
|
||||
@@ -223,12 +226,15 @@ void Widget::on_keyword_button_insert()
|
||||
"start = STR_TO_DATE('%1', '%Y-%m-%d'),"
|
||||
"end = STR_TO_DATE('%2', '%Y-%m-%d'),"
|
||||
"searches = '%3',"
|
||||
"realtime = %4")
|
||||
"realtime = %4,"
|
||||
"authorship = '%5'")
|
||||
.arg(m_pdeStart->date().toString("yyyy-MM-dd"))
|
||||
.arg(m_pdeEnd->date().toString("yyyy-MM-dd"))
|
||||
.arg(m_pleKeyword->text())
|
||||
.arg(m_pcbRealTime->currentIndex());
|
||||
.arg(m_pcbRealTime->currentIndex())
|
||||
.arg(m_pleAuthorship->text());
|
||||
|
||||
//qDebug() << strQuery;
|
||||
m_pmodelKeyword->setQuery(QString(strQuery.toUtf8()));
|
||||
m_pmodelKeyword->setQuery("SELECT * FROM keyword where state is null");
|
||||
}
|
||||
@@ -253,12 +259,14 @@ void Widget::on_keyword_button_modify()
|
||||
"start = STR_TO_DATE('%1', '%Y-%m-%d'),"
|
||||
"end = STR_TO_DATE('%2', '%Y-%m-%d'),"
|
||||
"searches = '%3',"
|
||||
"realtime = %4 "
|
||||
"where id = '%5'")
|
||||
"realtime = %4,"
|
||||
"searches = '%5' "
|
||||
"where id = '%6'")
|
||||
.arg(m_pdeStart->date().toString("yyyy-MM-dd"))
|
||||
.arg(m_pdeEnd->date().toString("yyyy-MM-dd"))
|
||||
.arg(m_pleKeyword->text())
|
||||
.arg(m_pcbRealTime->currentIndex())
|
||||
.arg(m_pleAuthorship->text())
|
||||
.arg(rec.value("id").toString());
|
||||
m_pmodelKeyword->setQuery(QString(strQuery.toUtf8()));
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ private:
|
||||
QSqlQueryModel *m_pmodelKeyword,*m_pmodelGroup,*m_pmodelCrawling;
|
||||
QDateEdit *m_pdeStart,*m_pdeEnd;
|
||||
QComboBox *m_pcbRealTime;
|
||||
QLineEdit *m_pleKeyword,*m_pleGroup;
|
||||
QLineEdit *m_pleKeyword,*m_pleAuthorship,*m_pleGroup;
|
||||
private:
|
||||
QGroupBox *setKeywordWidgets();
|
||||
QGroupBox *setGroupWidgets();
|
||||
|
||||
Reference in New Issue
Block a user