예제 #1
0
 unsigned int PushString(const std::string& content)
 {
     return PushString(GetMaxID()+1, content);
 }
예제 #2
0
        // tcc update parkinfo
        // kzp update roadconerinfo
        if ( TCC == data.strDevType ) {
            strSql = QString( "Update parkinfo Set parkname = '%1', parknum = %2 Where shebeiid = %3" ).arg(
                               data.strDevName, data.strParkNum, data.strDevID );
        } else if ( KZQ == data.strDevType ) {
            strSql = QString( "Update roadconerinfo Set shebeiname = '%1', shebeiadr = %2, \
                              video1ip = '%3', video2ip = '%4' Where shebeiid = %5" ).arg(
                               data.strDevName, data.strParkNum, data.strHostIP, data.strIPCIP, data.strDevID );
        }

        tvCurNode.setText( 0, data.strDevName );
    }

    CLogicInterface::GetInterface( )->ExecuteSql( strSql );
    data.strDevID = GetMaxID( );
    qDebug( ) << strSql << endl;
}

CDeviceConfig::NodeData& CDeviceConfig::GetUserData( QTreeWidgetItem &node )
{
    quint32 nData = node.data( 0, Qt::UserRole ).toUInt( );

    NodeData& data = *( ( PNodeData ) nData );

    return data;
}

void CDeviceConfig::BuildTree( int nID, QTreeWidgetItem& tvNode )
{
    // select distinct level from treeview