필터 업데이트
애널저 숫자 정렬 추가 git-svn-id: svn://192.168.0.12/source@280 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
#include <QFileDialog>
|
||||
#include "stable.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
||||
{
|
||||
@@ -141,7 +142,7 @@ void MainWindow::FileNew()
|
||||
{
|
||||
for(int j = 0; j < column.size(); j++)
|
||||
{
|
||||
pTable->setItem(i, j, new QTableWidgetItem(QString(" ")));
|
||||
pTable->setItem(i, j, new STableWidgetItem(QString(" ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void SBatchRun::ViewResult()
|
||||
for (int k = 0; k < pTable->columnCount() ; k++)
|
||||
{
|
||||
QString str = m_vecData[i][j][k].replace("\n"," ");
|
||||
pTable->setItem(nCount,k,new QTableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
pTable->setItem(nCount,k,new STableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
}
|
||||
nCount++;
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
@@ -319,7 +319,7 @@ void SBatchRun::ViewRawResult()
|
||||
for (int k = 0; k < pTable->columnCount() ; k++)
|
||||
{
|
||||
QString str = m_vecData[i][j][k].replace("\n"," ");
|
||||
pTable->setItem(nCount,k,new QTableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
pTable->setItem(nCount,k,new STableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
}
|
||||
nCount++;
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
@@ -503,13 +503,13 @@ bool SBatchRun::loadData()
|
||||
for(int j = 0; j < GetColumn().data().size(); j++)
|
||||
//strList << " " + query.value(j).toString() + " ";
|
||||
strList.append(query.value(j).toString());
|
||||
|
||||
/*
|
||||
if(strList[m_anData[E_DATA_platform_form]].trimmed() == "post" || strList[m_anData[E_DATA_platform_form]].trimmed() == "story" || strList[m_anData[E_DATA_platform_form]].trimmed() == "channel")
|
||||
strList[m_anData[E_DATA_platform_form]] = "sns";
|
||||
|
||||
if(strList[m_anData[E_DATA_platform_form]].trimmed() == "group")
|
||||
strList[m_anData[E_DATA_platform_form]] = "community";
|
||||
|
||||
*/
|
||||
|
||||
if(i == E_ARTICLE_BODY)
|
||||
{
|
||||
|
||||
@@ -104,7 +104,7 @@ void SCountDlg::choose_1()
|
||||
{
|
||||
int nCol = 0;
|
||||
QString str = now.toString("yyyy-MM-dd").trimmed();
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(str));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(str));
|
||||
if (mapCount.contains(now))
|
||||
m_pTable->setItem(nCount,nCol,new STableNumberItem(QString::number(mapCount[now])));
|
||||
else
|
||||
@@ -131,7 +131,7 @@ void SCountDlg::choose_1()
|
||||
for (QMap<QString,int> ::iterator i = mapCount.begin(); i != mapCount.end(); ++i)
|
||||
{
|
||||
int nCol = 0;
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(i.key()));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(i.key()));
|
||||
m_pTable->setItem(nCount,nCol++,new STableNumberItem(QString::number(i.value())));
|
||||
nCount++;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ void SCountDlg::choose_2()
|
||||
{
|
||||
int nCol = 0;
|
||||
QString str = now.toString("yyyy-MM-dd").trimmed();
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(str));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(str));
|
||||
if (mapCount.contains(str))
|
||||
{
|
||||
for (QSet<QString>::iterator j = setList.begin(); j != setList.end(); ++j)
|
||||
@@ -225,7 +225,7 @@ void SCountDlg::choose_2()
|
||||
for (QMap<QString,QMap<QString,int> >::iterator i = mapCount.begin(); i != mapCount.end(); ++i)
|
||||
{
|
||||
int nCol = 0;
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(i.key()));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(i.key()));
|
||||
for (QSet<QString>::iterator j = setList.begin(); j != setList.end(); ++j)
|
||||
{
|
||||
if (i->contains(*j))
|
||||
|
||||
@@ -86,11 +86,13 @@ void SDataDlg::DataReload(QString _strTableName,int _nSelect)
|
||||
for (int i = 0; i < pTable->columnCount() ; i++)
|
||||
{
|
||||
QString str = query.value(i).toString().replace("\n"," ");
|
||||
/*
|
||||
if((i == GetColumn().getColumnIndex("platform_form")) && (str.trimmed() == "post" || str.trimmed() == "channel" || str.trimmed() == "story"))
|
||||
str = "sns";
|
||||
if((i == GetColumn().getColumnIndex("platform_form")) && (str.trimmed() == "group"))
|
||||
str = "community";
|
||||
pTable->setItem(nCount,i,new QTableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
*/
|
||||
pTable->setItem(nCount,i,new STableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
}
|
||||
nCount++;
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
@@ -102,7 +104,7 @@ void SDataDlg::InsertCopyRow(int _nRow,QTableWidget *_pCurrent,QTableWidget *_pN
|
||||
{
|
||||
_pNew->setRowCount(_pNew->rowCount()+1);
|
||||
for (int nCount = 0;nCount < _pCurrent->columnCount() ;nCount++ )
|
||||
_pNew->setItem(_pNew->rowCount()-1,nCount,new QTableWidgetItem(*_pCurrent->item(_nRow,nCount)));
|
||||
_pNew->setItem(_pNew->rowCount()-1,nCount,new STableWidgetItem(*_pCurrent->item(_nRow,nCount)));
|
||||
}
|
||||
|
||||
void SDataDlg::SearchDate(QDate _dtStart,QDate _dtEnd)
|
||||
@@ -327,10 +329,10 @@ void SDataDlg::SearchReplace(int _nCatalogIndex,int _nReplaceFindIndex,int _nRep
|
||||
strOut = strMiddle;
|
||||
break;
|
||||
}
|
||||
pNew->setItem(nCount,nColumnCount,new QTableWidgetItem(strOut));
|
||||
pNew->setItem(nCount,nColumnCount,new STableWidgetItem(strOut));
|
||||
}
|
||||
else
|
||||
pNew->setItem(nCount,nColumnCount,new QTableWidgetItem(*pCurrent->item(nCount,nColumnCount)));
|
||||
pNew->setItem(nCount,nColumnCount,new STableWidgetItem(*pCurrent->item(nCount,nColumnCount)));
|
||||
}
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
GetMainWindow()->m_progress.repaint();
|
||||
@@ -432,7 +434,7 @@ void SDataDlg::Import(QVector <QByteArray> _vecImport )
|
||||
if(column.at(j).at(SColumn::E_DATABASE).compare(strings.at(i)) == 0)
|
||||
strings[i] = column.at(j).at(SColumn::E_NAME);
|
||||
}
|
||||
pNew->setHorizontalHeaderItem(i-1,new QTableWidgetItem(strings.at(i)));
|
||||
pNew->setHorizontalHeaderItem(i-1,new STableWidgetItem(strings.at(i)));
|
||||
}
|
||||
bFirst = false;
|
||||
pNew->setRowCount(_vecImport.size()-1);
|
||||
@@ -446,7 +448,7 @@ void SDataDlg::Import(QVector <QByteArray> _vecImport )
|
||||
QStringList strings = strLine.split(",");
|
||||
int ncCol=0;
|
||||
foreach(QString str,strings)
|
||||
pNew->setItem(ncRow,ncCol++,new QTableWidgetItem(QString(" " + str + " ")));
|
||||
pNew->setItem(ncRow,ncCol++,new STableWidgetItem(QString(" " + str + " ")));
|
||||
GetMainWindow()->m_progress.setValue(ncRow++);
|
||||
GetMainWindow()->m_progress.repaint();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ void STable::SetHeaderList(QVector <QStringList>* _pvecHead,int _nColumn)
|
||||
setColumnCount(_pvecHead->size());
|
||||
int i = 0;
|
||||
foreach(QStringList strList, *_pvecHead )
|
||||
setHorizontalHeaderItem(i++,new QTableWidgetItem(strList.at(_nColumn)));
|
||||
setHorizontalHeaderItem(i++,new STableWidgetItem(strList.at(_nColumn)));
|
||||
}
|
||||
|
||||
void STable::SetHeaderList(QStringList _Head)
|
||||
@@ -30,7 +30,7 @@ void STable::SetHeaderList(QStringList _Head)
|
||||
setColumnCount(_Head.size());
|
||||
int i = 0;
|
||||
foreach(QString str,_Head )
|
||||
setHorizontalHeaderItem(i++,new QTableWidgetItem(str));
|
||||
setHorizontalHeaderItem(i++,new STableWidgetItem(str));
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ void STable::menuInsert()
|
||||
int nRow = currentRow();
|
||||
insertRow(nRow);
|
||||
for (int i = 0; i < columnCount() ; i++)
|
||||
setItem(nRow,i,new QTableWidgetItem(" "));
|
||||
setItem(nRow,i,new STableWidgetItem(" "));
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ void STable::Paste()
|
||||
{
|
||||
for(int j = 0; j < columnCount(); j++)
|
||||
{
|
||||
setItem(i, j, new QTableWidgetItem(QString(" ")));
|
||||
setItem(i, j, new STableWidgetItem(QString(" ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ void STable::Paste()
|
||||
if (nCol >= columnCount()) continue;
|
||||
QTableWidgetItem *pItem;
|
||||
if (nRows >= nRows)
|
||||
pItem = new QTableWidgetItem;
|
||||
pItem = new STableWidgetItem;
|
||||
else
|
||||
pItem = item(nRow,nCol);
|
||||
pItem->setText(" "+strCol.trimmed()+" ");
|
||||
|
||||
@@ -23,6 +23,31 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class STableWidgetItem : public QTableWidgetItem
|
||||
{
|
||||
public:
|
||||
STableWidgetItem(int type=Type):QTableWidgetItem(type){}
|
||||
STableWidgetItem(const QString& text, int type=Type):QTableWidgetItem(text, type){}
|
||||
STableWidgetItem(const QIcon& icon, const QString& text, int type = Type):QTableWidgetItem(icon, text, type){}
|
||||
STableWidgetItem(const QTableWidgetItem& other):QTableWidgetItem(other){}
|
||||
|
||||
bool operator <(const QTableWidgetItem &other) const
|
||||
{
|
||||
bool tok = false;
|
||||
bool ook = false;
|
||||
int nThis = text().toInt(&tok);
|
||||
int nOther = other.text().toInt(&ook);
|
||||
|
||||
if (!(tok && ook))
|
||||
return text() < other.text();
|
||||
else
|
||||
return nThis < nOther;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class STable : public QTableWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -333,8 +333,10 @@ void Widget::CompanyItemChanged(QListWidgetItem* _current,QListWidgetItem*)
|
||||
{
|
||||
case E_SERVICE_INFLUENCER:
|
||||
{
|
||||
/*
|
||||
if (0 == nServiceCnt[E_SERVICE_INFLUENCER]++)
|
||||
continue;
|
||||
*/
|
||||
strService = "[Influencer]";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void SBatchRun::ViewResult()
|
||||
for (int k = 0; k < pTable->columnCount() ; k++)
|
||||
{
|
||||
QString str = m_vecData[i][j][k].replace("\n"," ");
|
||||
pTable->setItem(nCount,k,new QTableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
pTable->setItem(nCount,k,new STableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
}
|
||||
nCount++;
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
@@ -319,7 +319,7 @@ void SBatchRun::ViewRawResult()
|
||||
for (int k = 0; k < pTable->columnCount() ; k++)
|
||||
{
|
||||
QString str = m_vecData[i][j][k].replace("\n"," ");
|
||||
pTable->setItem(nCount,k,new QTableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
pTable->setItem(nCount,k,new STableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
}
|
||||
nCount++;
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
@@ -503,13 +503,13 @@ bool SBatchRun::loadData()
|
||||
for(int j = 0; j < GetColumn().data().size(); j++)
|
||||
//strList << " " + query.value(j).toString() + " ";
|
||||
strList.append(query.value(j).toString());
|
||||
|
||||
/*
|
||||
if(strList[m_anData[E_DATA_platform_form]].trimmed() == "post" || strList[m_anData[E_DATA_platform_form]].trimmed() == "story" || strList[m_anData[E_DATA_platform_form]].trimmed() == "channel")
|
||||
strList[m_anData[E_DATA_platform_form]] = "sns";
|
||||
|
||||
if(strList[m_anData[E_DATA_platform_form]].trimmed() == "group")
|
||||
strList[m_anData[E_DATA_platform_form]] = "community";
|
||||
|
||||
*/
|
||||
|
||||
if(i == E_ARTICLE_BODY)
|
||||
{
|
||||
|
||||
@@ -75,6 +75,7 @@ void SCountDlg::choose_1()
|
||||
}
|
||||
}
|
||||
if (nCatalog == D_NOT_SELECT) return;
|
||||
m_pTable->clear();
|
||||
m_pTable->SetHeaderList(QStringList() << GetColumn().data().at(nCatalog).at(SColumn::E_NAME) << "Count");
|
||||
QTableWidget *pCurrent = (QTableWidget *)GetMainWindow()->m_pDataDlg->GetCurrentWidget();
|
||||
GetMainWindow()->m_progress.setRange(0,pCurrent->rowCount());
|
||||
@@ -103,7 +104,7 @@ void SCountDlg::choose_1()
|
||||
{
|
||||
int nCol = 0;
|
||||
QString str = now.toString("yyyy-MM-dd").trimmed();
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(str));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(str));
|
||||
if (mapCount.contains(now))
|
||||
m_pTable->setItem(nCount,nCol,new STableNumberItem(QString::number(mapCount[now])));
|
||||
else
|
||||
@@ -130,7 +131,7 @@ void SCountDlg::choose_1()
|
||||
for (QMap<QString,int> ::iterator i = mapCount.begin(); i != mapCount.end(); ++i)
|
||||
{
|
||||
int nCol = 0;
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(i.key()));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(i.key()));
|
||||
m_pTable->setItem(nCount,nCol++,new STableNumberItem(QString::number(i.value())));
|
||||
nCount++;
|
||||
}
|
||||
@@ -199,7 +200,7 @@ void SCountDlg::choose_2()
|
||||
{
|
||||
int nCol = 0;
|
||||
QString str = now.toString("yyyy-MM-dd").trimmed();
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(str));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(str));
|
||||
if (mapCount.contains(str))
|
||||
{
|
||||
for (QSet<QString>::iterator j = setList.begin(); j != setList.end(); ++j)
|
||||
@@ -224,7 +225,7 @@ void SCountDlg::choose_2()
|
||||
for (QMap<QString,QMap<QString,int> >::iterator i = mapCount.begin(); i != mapCount.end(); ++i)
|
||||
{
|
||||
int nCol = 0;
|
||||
m_pTable->setItem(nCount,nCol++,new QTableWidgetItem(i.key()));
|
||||
m_pTable->setItem(nCount,nCol++,new STableWidgetItem(i.key()));
|
||||
for (QSet<QString>::iterator j = setList.begin(); j != setList.end(); ++j)
|
||||
{
|
||||
if (i->contains(*j))
|
||||
|
||||
@@ -86,11 +86,13 @@ void SDataDlg::DataReload(QString _strTableName,int _nSelect)
|
||||
for (int i = 0; i < pTable->columnCount() ; i++)
|
||||
{
|
||||
QString str = query.value(i).toString().replace("\n"," ");
|
||||
/*
|
||||
if((i == GetColumn().getColumnIndex("platform_form")) && (str.trimmed() == "post" || str.trimmed() == "channel" || str.trimmed() == "story"))
|
||||
str = "sns";
|
||||
if((i == GetColumn().getColumnIndex("platform_form")) && (str.trimmed() == "group"))
|
||||
str = "community";
|
||||
pTable->setItem(nCount,i,new QTableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
*/
|
||||
pTable->setItem(nCount,i,new STableWidgetItem(" "+str.replace("\t"," ")+" "));
|
||||
}
|
||||
nCount++;
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
@@ -102,7 +104,7 @@ void SDataDlg::InsertCopyRow(int _nRow,QTableWidget *_pCurrent,QTableWidget *_pN
|
||||
{
|
||||
_pNew->setRowCount(_pNew->rowCount()+1);
|
||||
for (int nCount = 0;nCount < _pCurrent->columnCount() ;nCount++ )
|
||||
_pNew->setItem(_pNew->rowCount()-1,nCount,new QTableWidgetItem(*_pCurrent->item(_nRow,nCount)));
|
||||
_pNew->setItem(_pNew->rowCount()-1,nCount,new STableWidgetItem(*_pCurrent->item(_nRow,nCount)));
|
||||
}
|
||||
|
||||
void SDataDlg::SearchDate(QDate _dtStart,QDate _dtEnd)
|
||||
@@ -327,10 +329,10 @@ void SDataDlg::SearchReplace(int _nCatalogIndex,int _nReplaceFindIndex,int _nRep
|
||||
strOut = strMiddle;
|
||||
break;
|
||||
}
|
||||
pNew->setItem(nCount,nColumnCount,new QTableWidgetItem(strOut));
|
||||
pNew->setItem(nCount,nColumnCount,new STableWidgetItem(strOut));
|
||||
}
|
||||
else
|
||||
pNew->setItem(nCount,nColumnCount,new QTableWidgetItem(*pCurrent->item(nCount,nColumnCount)));
|
||||
pNew->setItem(nCount,nColumnCount,new STableWidgetItem(*pCurrent->item(nCount,nColumnCount)));
|
||||
}
|
||||
GetMainWindow()->m_progress.setValue(nCount);
|
||||
GetMainWindow()->m_progress.repaint();
|
||||
@@ -432,7 +434,7 @@ void SDataDlg::Import(QVector <QByteArray> _vecImport )
|
||||
if(column.at(j).at(SColumn::E_DATABASE).compare(strings.at(i)) == 0)
|
||||
strings[i] = column.at(j).at(SColumn::E_NAME);
|
||||
}
|
||||
pNew->setHorizontalHeaderItem(i-1,new QTableWidgetItem(strings.at(i)));
|
||||
pNew->setHorizontalHeaderItem(i-1,new STableWidgetItem(strings.at(i)));
|
||||
}
|
||||
bFirst = false;
|
||||
pNew->setRowCount(_vecImport.size()-1);
|
||||
@@ -446,7 +448,7 @@ void SDataDlg::Import(QVector <QByteArray> _vecImport )
|
||||
QStringList strings = strLine.split(",");
|
||||
int ncCol=0;
|
||||
foreach(QString str,strings)
|
||||
pNew->setItem(ncRow,ncCol++,new QTableWidgetItem(QString(" " + str + " ")));
|
||||
pNew->setItem(ncRow,ncCol++,new STableWidgetItem(QString(" " + str + " ")));
|
||||
GetMainWindow()->m_progress.setValue(ncRow++);
|
||||
GetMainWindow()->m_progress.repaint();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ void STable::SetHeaderList(QVector <QStringList>* _pvecHead,int _nColumn)
|
||||
setColumnCount(_pvecHead->size());
|
||||
int i = 0;
|
||||
foreach(QStringList strList, *_pvecHead )
|
||||
setHorizontalHeaderItem(i++,new QTableWidgetItem(strList.at(_nColumn)));
|
||||
setHorizontalHeaderItem(i++,new STableWidgetItem(strList.at(_nColumn)));
|
||||
}
|
||||
|
||||
void STable::SetHeaderList(QStringList _Head)
|
||||
@@ -30,7 +30,7 @@ void STable::SetHeaderList(QStringList _Head)
|
||||
setColumnCount(_Head.size());
|
||||
int i = 0;
|
||||
foreach(QString str,_Head )
|
||||
setHorizontalHeaderItem(i++,new QTableWidgetItem(str));
|
||||
setHorizontalHeaderItem(i++,new STableWidgetItem(str));
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ void STable::menuInsert()
|
||||
int nRow = currentRow();
|
||||
insertRow(nRow);
|
||||
for (int i = 0; i < columnCount() ; i++)
|
||||
setItem(nRow,i,new QTableWidgetItem(" "));
|
||||
setItem(nRow,i,new STableWidgetItem(" "));
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ void STable::Paste()
|
||||
{
|
||||
for(int j = 0; j < columnCount(); j++)
|
||||
{
|
||||
setItem(i, j, new QTableWidgetItem(QString(" ")));
|
||||
setItem(i, j, new STableWidgetItem(QString(" ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ void STable::Paste()
|
||||
if (nCol >= columnCount()) continue;
|
||||
QTableWidgetItem *pItem;
|
||||
if (nRows >= nRows)
|
||||
pItem = new QTableWidgetItem;
|
||||
pItem = new STableWidgetItem;
|
||||
else
|
||||
pItem = item(nRow,nCol);
|
||||
pItem->setText(" "+strCol.trimmed()+" ");
|
||||
|
||||
@@ -23,6 +23,31 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class STableWidgetItem : public QTableWidgetItem
|
||||
{
|
||||
public:
|
||||
STableWidgetItem(int type=Type):QTableWidgetItem(type){}
|
||||
STableWidgetItem(const QString& text, int type=Type):QTableWidgetItem(text, type){}
|
||||
STableWidgetItem(const QIcon& icon, const QString& text, int type = Type):QTableWidgetItem(icon, text, type){}
|
||||
STableWidgetItem(const QTableWidgetItem& other):QTableWidgetItem(other){}
|
||||
|
||||
bool operator <(const QTableWidgetItem &other) const
|
||||
{
|
||||
bool tok = false;
|
||||
bool ook = false;
|
||||
int nThis = text().toInt(&tok);
|
||||
int nOther = other.text().toInt(&ook);
|
||||
|
||||
if (!(tok && ook))
|
||||
return text() < other.text();
|
||||
else
|
||||
return nThis < nOther;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class STable : public QTableWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.3.0, 2016-07-06T15:06:54. -->
|
||||
<!-- Written by QtCreator 3.3.0, 2016-07-08T16:55:53. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@@ -787,7 +787,7 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">sfilterprocess</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/source/sfilterprocess/sfilterprocess.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments">"510" "testall"</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments">"514" "testall"</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">sfilterprocess.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
|
||||
|
||||
Reference in New Issue
Block a user