修复虚拟相机打开图像卡顿问题

master
bobpan 5 years ago
parent 4c079d612a
commit 03daf66f62

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -24,7 +24,7 @@ QLoginDlg::QLoginDlg(QUserDB* pUserDB)
{
ui.setupUi(this);
setWindowFlags(Qt::WindowCloseButtonHint);
setWindowIcon(QIcon(":/userinfo"));
//setWindowIcon(QIcon(":/userinfo"));
_UserNameComboBox = ui.login_UserName;
_PasswdLineEdit = ui.login_Passwd;
_UserNameComboBox->setEditable(true);

@ -5,7 +5,7 @@ QUserAddNew::QUserAddNew(QWidget *parent): QDialog(parent)
{
ui.setupUi(this);
setWindowFlags(Qt::WindowCloseButtonHint);
setWindowIcon(QIcon(":/userinfo"));
// setWindowIcon(QIcon(":/userinfo"));
ui.m_UserName_lineEdit->clear();
ui.m_Passwd_lineEdit->clear();
ui.m_Passwd2_lineEdit->clear();

@ -40,8 +40,8 @@ class IUserCtrl:public QObject {
public:
IUserCtrl() {};
~IUserCtrl() {};
virtual void CheckLogin() =0;
virtual void ShowUserMgrDlg() = 0;
virtual void CheckLogin(QWidget* parent = nullptr) =0;
virtual void ShowUserMgrDlg(QWidget* parent = nullptr) = 0;
virtual void LogOutUser() =0;
virtual QString CurUser() = 0;
virtual int CurUserLevel() = 0;

@ -61,17 +61,20 @@ QUserCtrl::~QUserCtrl()
}
}
void QUserCtrl::CheckLogin()
void QUserCtrl::CheckLogin(QWidget* parent)
{
QStringList strList = _pUserDBSqlite->Users(-1);
_LoginDlg->AddItems2List(strList);
_LoginDlg->setParent(parent);
_LoginDlg->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
_LoginDlg->show();
}
void QUserCtrl::ShowUserMgrDlg()
void QUserCtrl::ShowUserMgrDlg(QWidget* parent)
{
QDesktopWidget* desktop = QApplication::desktop();//
_pDlgUsersMgr->setParent(parent);
_pDlgUsersMgr->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
_pDlgUsersMgr->move((desktop->width() - _pDlgUsersMgr->width()) / 2, (desktop->height() - _pDlgUsersMgr->height()) / 2);
_pDlgUsersMgr->SetUserAndLevel(_CurrentUserName, m_nLevel);
_pDlgUsersMgr->OnUpdateUserList();

@ -13,8 +13,8 @@ public:
QUserCtrl(QWidget* parent = 0);
~QUserCtrl();
void CheckLogin();
void ShowUserMgrDlg();
void CheckLogin(QWidget* parent = nullptr);
void ShowUserMgrDlg(QWidget* parent = nullptr);
void LogOutUser();
QString CurUser() { return _CurrentUserName; } //当前登录用户的用户名
int CurUserLevel() { return m_nLevel; } //当前登录用户的等级

@ -17,7 +17,7 @@ QUserManagerDlg::QUserManagerDlg(QUserDB* pLogic)
{
ui.setupUi(this);
setWindowFlags(Qt::WindowCloseButtonHint);
setWindowIcon(QIcon(":/userinfo"));
//setWindowIcon(QIcon(":/userinfo"));
QStringList headerList;
headerList << QObject::tr("用户名") << QObject::tr("等级");
plistModel = QSharedPointer<QStandardItemModel>(new QStandardItemModel);
@ -58,7 +58,8 @@ void QUserManagerDlg::onAddUser()
QMessageBox::warning(this, QObject::tr("错误警告"), QObject::tr("你当前没有权限添加用户,请登录!"));
return;
}
QUserAddNew dlg;
QUserAddNew dlg(this);
dlg.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
dlg.setTitle(QObject::tr("添加新用户"));
UserInfo info;
info.mLevel = m_level;
@ -132,7 +133,8 @@ void QUserManagerDlg::onModifyUser()
QMessageBox::warning(this, QObject::tr("错误警告"), QObject::tr("你没有选中需要修改的用户,请联系管理员!"));
return;
}
QUserAddNew dlg;
QUserAddNew dlg(this);
dlg.setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
dlg.setTitle(QObject::tr("修改用户信息"));
UserInfo info;
info.mLevel = m_level;

@ -582,7 +582,7 @@ Q_SLOT void CMainWin::onActionClicked()
}
}
else
m_pUserCtrl->CheckLogin();
m_pUserCtrl->CheckLogin(this);
}
else
{
@ -594,7 +594,7 @@ Q_SLOT void CMainWin::onActionClicked()
}
else if ("main_action_userManager" == strObj) {//用户管理
if (m_pUserCtrl) {
m_pUserCtrl->ShowUserMgrDlg();
m_pUserCtrl->ShowUserMgrDlg(this);
}
else
{
@ -945,7 +945,7 @@ Q_SLOT void CMainWin::onShowImage(int ID, QImage img)
}
else
{
QRect rt = ui.wf_lb_image_show_1->rect();
QRect rt = pLab->rect();
int h = img.height();
int w = img.width();
float d = w * 1.0 / h;

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1022</width>
<height>705</height>
<height>723</height>
</rect>
</property>
<property name="windowTitle">
@ -143,6 +143,12 @@
</item>
<item>
<widget class="QLabel" name="wf_lb_image_show_1">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>492</width>
@ -167,19 +173,6 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
@ -211,6 +204,12 @@
</item>
<item>
<widget class="QLabel" name="wf_lb_image_show_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>492</width>
@ -235,19 +234,6 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>516</width>
<width>442</width>
<height>195</height>
</rect>
</property>

Loading…
Cancel
Save