pans
2016-12-15 87e3ee273b2f84081ac45926be9d8e5be3166eaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
#include "cuserparams.h"
#include "publicfuc.h"
 
#include <QMessageBox>
 
CUserParams::CUserParams(QWidget *parent)
    : QDialog(parent)
{
    ui.setupUi(this);
 
    m_lUserID = -1;
    m_iStartChan = 0;
    m_iSimChannelNum = 0;
 
    int i;
    for (i = 0; i < MAX_CHANNUM_V30; i++)
    {
        m_iArryChannel[i] = -1;
        m_pcheckLocalChannel[i] = NULL;
        m_pcheckRemoteChannel[i] = NULL;
    }
 
    for (i = 0; i < MAX_RIGHT; i++)
    {
        m_pcheckLocalRight[i] = NULL;
        m_pcheckRemoteRight[i] = NULL;
    }
    ui.checkRemoteRight11->hide();
 
    QStringList strings;
    strings<<"Local playback"<<"Local record"<<"PTZ local control"<<"Local backup";
    ui.comboLocalRight->addItems(strings);
 
    strings.clear();
    strings<<"Remote preview"<<"Remote playback"<<"Remote record"<<"PTZ remote control";
    ui.comboNetRight->addItems(strings);
 
    //Óû§
    strings.clear();
    strings<<"Administrator";
    strings<<"User1"<<"User2"<<"User3"<<"User4"<<"User5"<<"User6"<<"User7";
    strings<<"User8"<<"User9"<<"User10"<<"User11"<<"User12"<<"User13"<<"User14";
    strings<<"User15"<<"User16"<<"User17"<<"User18"<<"User19"<<"User20"<<"User21";
    strings<<"User22"<<"User23"<<"User24"<<"User25"<<"User26"<<"User27"<<"User28";
    strings<<"User29"<<"User30"<<"User31";
    ui.comboUserNo->addItems(strings);
 
    ui.tableLocalChannel->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
    ui.tableLocalChannel->setColumnCount(1);
    ui.tableRemoteChannel->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
    ui.tableRemoteChannel->setColumnCount(1);
 
    connect(ui.comboUserNo, SIGNAL(activated(int)), this, SLOT( userIDChanged(int )));
    connect(ui.comboLocalRight, SIGNAL(activated(int)), this, SLOT(localRightTypeChanged(int)));
    connect(ui.comboNetRight, SIGNAL(activated(int)), this, SLOT(remoteRightTypeChanged(int)));
    //ÓÅÏȼ¶
    connectArrayAndWidget();
}
 
CUserParams::~CUserParams()
{
 
}
 
//Óû§ID±ä»¯
void CUserParams::userIDChanged(int iUserID)
{
    if(m_lUserID < 0)
    {
        return ;
    }
 
    NET_DVR_USER_V30 struUser;
    int iRet;
    DWORD uiReturnLen;
 
    //»ñÈ¡É豸µÄ²ÎÊýÖµ
    iRet = NET_DVR_GetDVRConfig(m_lUserID, NET_DVR_GET_USERCFG_V30, -1, &struUser, sizeof(NET_DVR_USER_V30), &uiReturnLen);
    if(iRet == 0)
    {
        iRet = NET_DVR_GetLastError();
        QMessageBox::information(this, tr("Please check!"), tr("Get User parameters error! \"%1\"").arg(iRet));
        return ;
    }
 
    //ÉèÖÃÓû§²ÎÊýµ½¿Ø¼þÖÐÈ¥
        ui.editUserName->setText((char*)struUser.struUser[iUserID].sUserName);
        ui.editPassword->setText((char*)struUser.struUser[iUserID].sPassword);
        ui.editPassword2->setText((char*)struUser.struUser[iUserID].sPassword);
 
    //ÓÅÏȼ¶
    QStringList strings;
    if(struUser.struUser[iUserID].byPriority == (BYTE)0xff)
    {
        ui.comboPriority->setEnabled(FALSE);
    }
    else
    {
        ui.comboPriority->setEnabled(TRUE);
        ui.comboPriority->clear();
        if(struUser.struUser[iUserID].byPriority == 2)
        {
            strings<<"Administrator";
            ui.comboPriority->addItems(strings);
            ui.comboPriority->setCurrentIndex(0);
        }
        else
        {
            strings<<"Normal user"<<"Operator";
            ui.comboPriority->addItems(strings);
            ui.comboPriority->setCurrentIndex((int)(unsigned int)(struUser.struUser[iUserID].byPriority));
        }
     }
 
    //±¾µØºÍÔ¶³Ì²Ù×÷ȨÏÞ
    int i;
    for(i = 0; i < MAX_RIGHT; i++)
    {
        if(m_pcheckLocalRight[i] != NULL)
        {
            m_pcheckLocalRight[i]->setChecked(struUser.struUser[iUserID].byLocalRight[i]);
        }
        if(m_pcheckRemoteRight[i] != NULL)
        {
            m_pcheckRemoteRight[i]->setChecked(struUser.struUser[iUserID].byRemoteRight[i]);
        }
    }
 
    //±¾µØºÍÔ¶³ÌͨµÀȨÏÞ
    localRightTypeChanged(0);
    remoteRightTypeChanged(0);
 
    //IPµØÖ·
    ui.editUserIP->setText(struUser.struUser[iUserID].struUserIP.sIpV4);
    //MACµØÖ·
    char strMAC[100] = {0};
    for(i = 0; i < MACADDR_LEN; i++)
    {
        sprintf(strMAC, "%02x", struUser.struUser[iUserID].byMACAddr[i]);
        m_pEditMAC[i]->setText(strMAC);
    }
}
 
//±¾µØÍ¨µÀȨÏÞ·½Ê½¸Ä±ä
void CUserParams::localRightTypeChanged(int iLocalRightType)
{
    if(m_lUserID < 0)
    {
        return ;
    }
    //QMessageBox::information(this, tr("Please check!"), tr("Changed error!"));
 
    int iUserNo;//Óû§µÄÐòºÅ
    iUserNo = ui.comboUserNo->currentIndex();
 
    NET_DVR_USER_V30 struUser;
    int iRet;
    DWORD uiReturnLen;
 
    //»ñÈ¡É豸µÄ²ÎÊýÖµ
    iRet = NET_DVR_GetDVRConfig(m_lUserID, NET_DVR_GET_USERCFG_V30, -1, &struUser, sizeof(NET_DVR_USER_V30), &uiReturnLen);
    if(iRet == 0)
    {
        iRet = NET_DVR_GetLastError();
        QMessageBox::information(this, tr("Please check!"), tr("Get User parameters error! \"%1\"").arg(iRet));
        return ;
    }
 
    //ÉèÖÃȨÏÞµÄͨµÀ
    int i;
    BYTE *pRight;
    //ÒÀ¾ÝȨÏÞ²ÎÊýÔڽṹÌåÖÐλÖÃÆ«ÒÆ
    pRight = struUser.struUser[iUserNo].byLocalPlaybackRight + iLocalRightType*2*MAX_CHANNUM_V30;
    for(i = 0; i < MAX_CHANNUM_V30; i++)
    {
        if(m_pcheckLocalChannel[i] != NULL)
        {
            if(pRight[i] == (BYTE)0xff) //µÍ°æ±¾É豸²»Ö§³Ö¸Ã²ÎÊý()£¬¸ÃÖµSDKÉèΪ-1
            {
                m_pcheckLocalChannel[i]->setChecked(FALSE);
            }
            else //Õý³£Çé¿öÏÂλ0£¬1
            {
                m_pcheckLocalChannel[i]->setChecked(pRight[i]);
            }
        }
    }
}
 
//±¾µØÍ¨µÀȨÏÞ·½Ê½¸Ä±ä
void CUserParams::remoteRightTypeChanged(int iRemoteRightType)
{
    if(m_lUserID < 0)
    {
        return ;
    }
    //QMessageBox::information(this, tr("Please check!"), tr("Changed error!"));
 
    int iUserNo;//Óû§µÄÐòºÅ
    iUserNo = ui.comboUserNo->currentIndex();
 
    NET_DVR_USER_V30 struUser;
    int iRet;
    DWORD uiReturnLen;
 
    //»ñÈ¡É豸µÄ²ÎÊýÖµ
    iRet = NET_DVR_GetDVRConfig(m_lUserID, NET_DVR_GET_USERCFG_V30, -1, &struUser, sizeof(NET_DVR_USER_V30), &uiReturnLen);
    if(iRet == 0)
    {
        iRet = NET_DVR_GetLastError();
        QMessageBox::information(this, tr("Please check!"), tr("Get User parameters error! \"%1\"").arg(iRet));
        return ;
    }
 
    //ÉèÖÃȨÏÞµÄͨµÀ
    int i;
    BYTE *pRight;
    //ÒÀ¾ÝȨÏÞ²ÎÊýÔڽṹÌåÖÐλÖÃÆ«ÒÆ
    pRight = struUser.struUser[iUserNo].byNetPreviewRight + iRemoteRightType*2*MAX_CHANNUM_V30;
    for(i = 0; i < MAX_CHANNUM_V30; i++)
    {
        if(m_pcheckRemoteChannel[i] != NULL)
        {
            if(pRight[i] == (BYTE)0xff) //µÍ°æ±¾É豸²»Ö§³Ö¸Ã²ÎÊý()£¬¸ÃÖµSDKÉèΪ-1
            {
                m_pcheckRemoteChannel[i]->setChecked(FALSE);
            }
            else //Õý³£Çé¿öÏÂλ0£¬1
            {
                m_pcheckRemoteChannel[i]->setChecked(pRight[i]);
            }
        }
    }
 
}
 
//»ñȡʵ¼Ê¿ÉÓÃͨµÀÁÐ±í£¬²¢Ð´ÈëtablewidgetÖÐ
int CUserParams::getChannelNum()
{
    if(m_lUserID < 0)
    {
        return HPR_ERROR;
    }
 
    NET_DVR_DEVICECFG struDeviceParams;
    DWORD paramsLen;
    int iRet;
 
    //***1.Get the channel number and IP channel number.***//
    iRet = NET_DVR_GetDVRConfig(m_lUserID, NET_DVR_GET_DEVICECFG, -1,
            &struDeviceParams, sizeof(NET_DVR_DEVICECFG), &paramsLen);
    if (iRet == 0) {
        iRet = NET_DVR_GetLastError();
        QMessageBox::information(this, tr("Please check!"), tr("Get device parameters error!"));
        return HPR_ERROR;
    }
    m_iStartChan = (int) (struDeviceParams.byStartChan);
 
    //***2.Get the channel which is enabled.***//
    //iRetµÄÖµÓÃÓÚÅжÏÊÇ·ñÖ§³ÖIPͨµÀ
    NET_DVR_IPPARACFG struIPParams;
    iRet = NET_DVR_GetDVRConfig(m_lUserID, NET_DVR_GET_IPPARACFG, -1, &struIPParams, sizeof(NET_DVR_IPPARACFG), &paramsLen);
 
    int i, j;
    j = 0;
    if (iRet != 0)//if support ip channel
    {
        //Ä£ÄâͨµÀ
        for (i = 0; i < MAX_ANALOG_CHANNUM; i++)
        {
            if (struIPParams.byAnalogChanEnable[i])
            {
                m_iArryChannel[j] = i + m_iStartChan;
                j++;
            }
        }
        m_iSimChannelNum = j;
 
        //IPͨµÀ
        for (i = 0; i < MAX_IP_CHANNEL; i++)
        {
            if (struIPParams.struIPChanInfo[i].byIPID != 0)
            {
                m_iArryChannel[j] = i + m_iStartChan + MAX_ANALOG_CHANNUM;
                j++;
            }
        }
    }
    else//if not support ip channel
    {
        //simulate channel
        for (i = 0; (i < MAX_ANALOG_CHANNUM)
                && (i < struDeviceParams.byChanNum); i++)
        {
            m_iArryChannel[j] = i + m_iStartChan;
            j++;
        }
        m_iSimChannelNum = j;
    }
 
    //ʵ¼Ê¿ÉÓõÄ×î´óͨµÀÊýÄ¿
    int iMaxChannelNo;
    for(i = 0; i < MAX_CHANNUM_V30; i++)
    {
        if(m_iArryChannel[i] < 0)
        {
            break;
        }
    }
    iMaxChannelNo = i;
 
    int iRow = 0; //±í¸ñµÄÐÐ
    //ɾ³ýÉϴεÄÐÐÊý
    iRow = ui.tableLocalChannel->rowCount();
    for(i = 0; i < iRow; i++)
    {
        ui.tableLocalChannel->removeRow(i);
        ui.tableRemoteChannel->removeRow(i);
    }
 
    //Çå³ýÉϴμÓÈëµÄÄÚÈÝ£¬×¢Òâtablewidget»á×Ô¼ºÊͷŵôÄڴ棬¼´Ê¹²»ÊÇnew³öÀ´µÄ
    ui.tableLocalChannel->clear();
    ui.tableRemoteChannel->clear();
    for (i = 0; i < MAX_CHANNUM_V30; i++)
    {
        m_pcheckLocalChannel[i] = NULL;
        m_pcheckRemoteChannel[i] = NULL;
    }
 
    //ÉèÖÃеĺ¯ÊýºÍtableÍ·
    ui.tableLocalChannel->setRowCount(iMaxChannelNo);
    ui.tableRemoteChannel->setRowCount(iMaxChannelNo);
    QStringList strings;
    strings<<"Local channel";
    ui.tableLocalChannel->setHorizontalHeaderLabels(strings);
    strings.clear();
    strings<<"Remote channel";
    ui.tableRemoteChannel->setHorizontalHeaderLabels(strings);
 
    //***3. Add check items to table.***//
    char strTemp[100] = { 0 };
    iRow = 0;
    for (i = 0; i < MAX_CHANNUM_V30; i++)
    {
        if (m_iArryChannel[i] >= 0)//·¢ÏÖÒ»¸öͨµÀ
        {
            if (m_iArryChannel[i] < MAX_ANALOG_CHANNUM) //Ä£ÄâͨµÀ
            {
                sprintf(strTemp, "Camora%d", m_iArryChannel[i]);
            }
            else//IP channel
            {
                if (iRet != 0)//supprot IP channel
                {
                    sprintf(strTemp, "IPCamora%d", (m_iArryChannel[i] - MAX_ANALOG_CHANNUM));
                }
            }
            //new³öÀ´Ò»¸öеıäÁ¿
            m_pcheckLocalChannel[m_iArryChannel[i] - m_iStartChan] = new QCheckBox();
            m_pcheckRemoteChannel[m_iArryChannel[i] - m_iStartChan] = new QCheckBox();
 
            m_pcheckLocalChannel[m_iArryChannel[i] - m_iStartChan]->setText(strTemp);
            m_pcheckRemoteChannel[m_iArryChannel[i] - m_iStartChan]->setText(strTemp);
 
            ui.tableLocalChannel->setCellWidget(iRow, 0, (m_pcheckLocalChannel[m_iArryChannel[i] - m_iStartChan]));
            ui.tableRemoteChannel->setCellWidget(iRow, 0, (m_pcheckRemoteChannel[m_iArryChannel[i] - m_iStartChan]));
            iRow++;
        }
    }
 
    return HPR_OK;
}
 
//ÉèÖþä±úÖµ
int CUserParams::setUserID(long lUserID)
{
    if(lUserID < 0)
    {
        return HPR_ERROR;
    }
    m_lUserID = lUserID;
 
    return HPR_OK;
}
 
//»ñÈ¡²ÎÊý£¬Ð´Èë¿Ø¼þÖÐÈ¥
int CUserParams::getAllInfo()
{
    if(m_lUserID < 0)
    {
        return HPR_ERROR;
    }
    //ÉèÖõ±Ç°µÄÓû§ÎªNOΪ0
    ui.comboUserNo->setCurrentIndex(0);
    //ÉèÖÃÓû§²ÎÊýµ½¿Ø¼þÖÐÈ¥
    userIDChanged(0);
 
    return HPR_OK;
}
 
int CUserParams::setAllInfo()
{
    if(m_lUserID < 0)
    {
        return HPR_ERROR;
    }
 
    NET_DVR_USER_V30 struUser;
    int iRet;
    DWORD uiReturnLen;
 
    //»ñÈ¡Óû§µÄ²ÎÊýÖµ
    iRet = NET_DVR_GetDVRConfig(m_lUserID, NET_DVR_GET_USERCFG_V30, -1, &struUser, sizeof(NET_DVR_USER_V30), &uiReturnLen);
    if(iRet == 0)
    {
        iRet = NET_DVR_GetLastError();
        QMessageBox::information(this, tr("Please check!"), tr("Get User parameters error! \"%1\"").arg(iRet));
        return HPR_ERROR;
    }
 
    //ÉèÖÃÓû§Ãû:ÏȱȽÏÃÜÂëÊÇ·ñÏàͬ
    if(ui.editPassword->text() != ui.editPassword2->text())
    {
        QMessageBox::information(this, tr("Please check!"), tr("password is not equal error! "));
        return HPR_ERROR;
    }
    //»ñÈ¡µ±Ç°Óû§ºÅ
    int iUserNo;
    iUserNo = ui.comboUserNo->currentIndex();
 
 
    //IPµØÖ·
        iRet = KIT_editToIP(ui.editUserIP, (BYTE *)struUser.struUser[iUserNo].struUserIP.sIpV4, 16);
    if(iRet == HPR_ERROR)
    {
        QMessageBox::information(this, tr("Please check!"), tr("ip is error! "));
        return HPR_ERROR;
    }
    //MACµØÖ·
    char strMAC[100] = {0};
    int iMAC;
    int i;
    for(i = 0; i < MACADDR_LEN; i++)
    {
        memset(strMAC, 0, 100);
                KIT_editToStr(m_pEditMAC[i], (BYTE *)strMAC, 3);
        sscanf(strMAC, "%02x", &iMAC);
        struUser.struUser[iUserNo].byMACAddr[i] = (BYTE)iMAC;
    }
 
    KIT_editToStr(ui.editUserName, struUser.struUser[iUserNo].sUserName, NAME_LEN);
    //ÉèÖÃÃÜÂë
    KIT_editToStr(ui.editPassword, struUser.struUser[iUserNo].sPassword, PASSWD_LEN);
 
    //ÉèÖÃÔ¶³ÌºÍ±¾µØÈ¨ÏÞ
    for(i = 0; i < MAX_RIGHT; i++)
    {
        if(m_pcheckLocalRight[i] != NULL)//±¾µØÈ¨ÏÞ
        {
            struUser.struUser[iUserNo].byLocalRight[i] = (BYTE)m_pcheckLocalRight[i]->isChecked();
        }
        if(m_pcheckRemoteRight[i] != NULL)
        {
            struUser.struUser[iUserNo].byRemoteRight[i] = (BYTE)m_pcheckRemoteRight[i]->isChecked();
        }
    }
 
    //ÓÅÏȼ¶
    if(ui.comboPriority->isEnabled())
    {
        if(ui.comboPriority->count() == 2)
        {
            struUser.struUser[iUserNo].byPriority = ui.comboPriority->currentIndex();
        }
        else
        {
            struUser.struUser[iUserNo].byPriority = 2;
        }
    }
    else
    {
        struUser.struUser[iUserNo].byPriority = (BYTE)0xff;
    }
 
    //ͨµÀȨÏÞ
    //µÃµ½µ±Ç°Í¨µÀȨÏÞÀàÐÍ
    int iLocalRightType;
    int iRemoteRightType;
    iLocalRightType = ui.comboLocalRight->currentIndex();
    iRemoteRightType = ui.comboNetRight->currentIndex();
    BYTE *pLocalRight;
    BYTE *pRemoteRight;
    //ÒÀ¾ÝȨÏÞ²ÎÊýÔڽṹÌåÖÐλÖÃÆ«ÒÆ
    pLocalRight = struUser.struUser[iUserNo].byLocalPlaybackRight + iLocalRightType*2*MAX_CHANNUM_V30;
    pRemoteRight = struUser.struUser[iUserNo].byNetPreviewRight + iRemoteRightType*2*MAX_CHANNUM_V30;
    for(i = 0; i < MAX_CHANNUM_V30; i++)
    {
        //±¾µØÍ¨µÀ
        if(m_pcheckLocalChannel[i] != NULL)
        {
            if(pLocalRight[i] != (BYTE)0xff) //¸ÃÉ豸°æ±¾²»µÍʱ
            {
                pLocalRight[i] = m_pcheckLocalChannel[i]->isChecked();
            }
        }
        //Ô¶³ÌͨµÀ
        if(m_pcheckRemoteChannel[i] != NULL)//¸ÃÉ豸°æ±¾²»µÍʱ
        {
            if(pRemoteRight[i] != (BYTE)0xff)
            {
                pRemoteRight[i] = m_pcheckRemoteChannel[i]->isChecked();
            }
        }
    }
 
    //±£´æµ½É豸
    iRet = NET_DVR_SetDVRConfig(m_lUserID, NET_DVR_SET_USERCFG_V30, -1, &struUser, sizeof(NET_DVR_USER_V30));
    if(0 == iRet)
    {
        iRet = NET_DVR_GetLastError();
        QMessageBox::information(this, tr("Please check!"), tr("Set User parameters error! \"%1\"").arg(iRet));
        return HPR_ERROR;
    }
 
    return HPR_OK;
}
 
void CUserParams::connectArrayAndWidget()
{
    //±¾µØÈ¨ÏÞ
    m_pcheckLocalRight[0] = ui.checkLocalRight0;
    m_pcheckLocalRight[1] = ui.checkLocalRight1;
    m_pcheckLocalRight[2] = ui.checkLocalRight2;
    m_pcheckLocalRight[3] = ui.checkLocalRight3;
    m_pcheckLocalRight[4] = ui.checkLocalRight4;
    m_pcheckLocalRight[5] = ui.checkLocalRight5;
    m_pcheckLocalRight[6] = ui.checkLocalRight6;
    m_pcheckLocalRight[7] = ui.checkLocalRight7;
    m_pcheckLocalRight[8] = ui.checkLocalRight8;
    m_pcheckLocalRight[9] = ui.checkLocalRight9;
 
    //Ô¶³ÌȨÏÞ
    m_pcheckRemoteRight[0] = ui.checkRemoteRight0;
    m_pcheckRemoteRight[1] = ui.checkRemoteRight1;
    m_pcheckRemoteRight[2] = ui.checkRemoteRight2;
    m_pcheckRemoteRight[3] = ui.checkRemoteRight3;
    m_pcheckRemoteRight[4] = ui.checkRemoteRight4;
    m_pcheckRemoteRight[5] = ui.checkRemoteRight5;
    m_pcheckRemoteRight[6] = ui.checkRemoteRight6;
    m_pcheckRemoteRight[7] = ui.checkRemoteRight7;
    m_pcheckRemoteRight[8] = ui.checkRemoteRight8;
    m_pcheckRemoteRight[9] = ui.checkRemoteRight9;
    m_pcheckRemoteRight[10] = ui.checkRemoteRight10;
    m_pcheckRemoteRight[11] = ui.checkRemoteRight11;
    m_pcheckRemoteRight[12] = ui.checkRemoteRight12;
    m_pcheckRemoteRight[13] = ui.checkRemoteRight13;
 
    //MACµØÖ·
    m_pEditMAC[0] = ui.editMACAddr1;
    m_pEditMAC[1] = ui.editMACAddr2;
    m_pEditMAC[2] = ui.editMACAddr3;
    m_pEditMAC[3] = ui.editMACAddr4;
    m_pEditMAC[4] = ui.editMACAddr5;
    m_pEditMAC[5] = ui.editMACAddr6;
}
 
//event
void CUserParams::showEvent ( QShowEvent * event )
{
    if(NULL == event)
    {
    }
 
    getChannelNum(); //»ñȡͨµÀºÅ
    getAllInfo();
 
}