完成Windows和Linux分支展示逻辑
This commit is contained in:
parent
3916dc5515
commit
3377b15069
|
|
@ -234,6 +234,10 @@ void ConnectionDialog::clearErrorInfo()
|
||||||
|
|
||||||
void ConnectionDialog::showMask()
|
void ConnectionDialog::showMask()
|
||||||
{
|
{
|
||||||
|
// QRect geometry = this->geometry();
|
||||||
|
// QRect frameGeometry = this->geometry();
|
||||||
|
// int nY = frameGeometry.height() - geometry.height();
|
||||||
|
// m_pMaskLayer->setGeometry(0, nY, frameGeometry.width(), frameGeometry.height());
|
||||||
m_pMaskLayer->setGeometry(0, 0, this->width(), this->height());
|
m_pMaskLayer->setGeometry(0, 0, this->width(), this->height());
|
||||||
m_pMaskLayer->show();
|
m_pMaskLayer->show();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ void CustomBorderContainer::updateBorder()
|
||||||
m_borderLeftBottom->setGeometry(0, m_contentWidget->height() - m_borderSize, m_borderSize, m_borderSize);
|
m_borderLeftBottom->setGeometry(0, m_contentWidget->height() - m_borderSize, m_borderSize, m_borderSize);
|
||||||
m_borderRightTop->setGeometry(m_contentWidget->width() - m_borderSize, 0, m_borderSize, m_borderSize);
|
m_borderRightTop->setGeometry(m_contentWidget->width() - m_borderSize, 0, m_borderSize, m_borderSize);
|
||||||
m_borderRightBottom->setGeometry(m_contentWidget->width() - m_borderSize, m_contentWidget->height() - m_borderSize, m_borderSize, m_borderSize);
|
m_borderRightBottom->setGeometry(m_contentWidget->width() - m_borderSize, m_contentWidget->height() - m_borderSize, m_borderSize, m_borderSize);
|
||||||
m_borderMove->setGeometry(m_borderSize, m_borderSize, m_contentWidget->width() - m_borderSize * 2, m_borderSize * 10);
|
m_borderMove->setGeometry(m_borderSize, m_borderSize, m_contentWidget->width() - m_borderSize * 2, m_borderSize * 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomBorderContainer::updateContentWidget()
|
void CustomBorderContainer::updateContentWidget()
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,8 @@ void MainWindow::showMessageDialog(MessageDialogType type,const QString& strTitl
|
||||||
int nY = this->geometry().y() + (this->height() - m_pMessageDialog->height()) * 0.5;
|
int nY = this->geometry().y() + (this->height() - m_pMessageDialog->height()) * 0.5;
|
||||||
m_pMessageDialog->move(nX, nY);
|
m_pMessageDialog->move(nX, nY);
|
||||||
|
|
||||||
MaskManager::instance()->showMask(m_pMessageDialog);
|
if(QSysInfo::kernelType() == "linux")
|
||||||
|
MaskManager::instance()->showMask(m_pMessageDialog);
|
||||||
// if(type == type_question)
|
// if(type == type_question)
|
||||||
// m_pMessageDialog->exec();
|
// m_pMessageDialog->exec();
|
||||||
// else
|
// else
|
||||||
|
|
@ -164,8 +165,13 @@ void MainWindow::onActionTrigger_connect()
|
||||||
// centerPos -= QPoint(m_pConnectionDialog->width()/2, m_pConnectionDialog->height()/2);
|
// centerPos -= QPoint(m_pConnectionDialog->width()/2, m_pConnectionDialog->height()/2);
|
||||||
// m_pConnectionDialog->move(centerPos);
|
// m_pConnectionDialog->move(centerPos);
|
||||||
|
|
||||||
MaskManager::instance()->showMask(m_pConnectionDialog);
|
if(QSysInfo::kernelType() == "linux")
|
||||||
m_pConnectionDialog->show();
|
{
|
||||||
|
MaskManager::instance()->showMask(m_pConnectionDialog);
|
||||||
|
m_pConnectionDialog->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_pConnectionDialog->exec();
|
||||||
}
|
}
|
||||||
void MainWindow::onActionTrigger_disconnect()
|
void MainWindow::onActionTrigger_disconnect()
|
||||||
{
|
{
|
||||||
|
|
@ -192,9 +198,13 @@ void MainWindow::onActionTrigger_addModel()
|
||||||
m_pModelInfoDialog->move(nX, nY);
|
m_pModelInfoDialog->move(nX, nY);
|
||||||
m_pModelInfoDialog->setState(DS_New);
|
m_pModelInfoDialog->setState(DS_New);
|
||||||
|
|
||||||
MaskManager::instance()->showMask(m_pModelInfoDialog);
|
if(QSysInfo::kernelType() == "linux")
|
||||||
m_pModelInfoDialog->show();
|
{
|
||||||
//MaskManager::instance()->hideMask(m_pModelInfoDialog);
|
MaskManager::instance()->showMask(m_pModelInfoDialog);
|
||||||
|
m_pModelInfoDialog->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_pModelInfoDialog->exec();
|
||||||
}
|
}
|
||||||
void MainWindow::onActionTrigger_removeModel()
|
void MainWindow::onActionTrigger_removeModel()
|
||||||
{
|
{
|
||||||
|
|
@ -234,8 +244,13 @@ void MainWindow::onActionTrigger_addGroup(int modelID)
|
||||||
m_pGroupSelectionDialog->move(nX, nY);
|
m_pGroupSelectionDialog->move(nX, nY);
|
||||||
m_pGroupSelectionDialog->setModel(modelID);
|
m_pGroupSelectionDialog->setModel(modelID);
|
||||||
|
|
||||||
MaskManager::instance()->showMask(m_pGroupSelectionDialog);
|
if(QSysInfo::kernelType() == "linux")
|
||||||
m_pGroupSelectionDialog->show();
|
{
|
||||||
|
MaskManager::instance()->showMask(m_pGroupSelectionDialog);
|
||||||
|
m_pGroupSelectionDialog->show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_pGroupSelectionDialog->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onSIG_errorFromDBManger(const QString& strConnectionName, const QString& error)
|
void MainWindow::onSIG_errorFromDBManger(const QString& strConnectionName, const QString& error)
|
||||||
|
|
|
||||||
|
|
@ -54,29 +54,18 @@ void MaskManager::showMask(QWidget* requester)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QWidget* widget = m_activeRequests.last();
|
QWidget* widget = m_activeRequests.last();
|
||||||
const QMetaObject* meta = widget->metaObject();
|
if(widget->windowFlags().testFlag(Qt::Dialog))
|
||||||
int methodIndex = meta->indexOfMethod("showMask()");
|
|
||||||
if(methodIndex != -1)
|
|
||||||
{
|
{
|
||||||
//QMetaMethod method = meta->method(methodIndex);
|
const QMetaObject* meta = widget->metaObject();
|
||||||
QMetaObject::invokeMethod(widget, "showMask", Qt::AutoConnection);
|
int methodIndex = meta->indexOfMethod("showMask()");
|
||||||
|
if(methodIndex != -1)
|
||||||
|
{
|
||||||
|
//QMetaMethod method = meta->method(methodIndex);
|
||||||
|
QMetaObject::invokeMethod(widget, "showMask", Qt::AutoConnection);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
/*if(widget->parentWidget() == m_mainWindow && widget->isVisible() && !widget->isModal())
|
widget->lower();
|
||||||
{
|
|
||||||
// qDebug() << "Child Dialog Order:";
|
|
||||||
// foreach (QObject* child, m_mainWindow->children())
|
|
||||||
// {
|
|
||||||
// if(qobject_cast<QDialog*>(child) || qobject_cast<QWidget*>(child))
|
|
||||||
// qDebug() << child->objectName();
|
|
||||||
// }
|
|
||||||
|
|
||||||
widget->stackUnder(m_maskLayer);
|
|
||||||
//widget->lower();
|
|
||||||
//强制刷新
|
|
||||||
//m_mainWindow->update();
|
|
||||||
//QApplication::processEvents();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_activeRequests.appendUnique(requester);
|
m_activeRequests.appendUnique(requester);
|
||||||
|
|
@ -91,11 +80,15 @@ void MaskManager::hideMask(QWidget* requester)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QWidget* widget = m_activeRequests.last();
|
QWidget* widget = m_activeRequests.last();
|
||||||
const QMetaObject* meta = widget->metaObject();
|
if(widget->windowFlags().testFlag(Qt::Dialog))
|
||||||
int methodIndex = meta->indexOfMethod("hideMask()");
|
{
|
||||||
if(methodIndex != -1)
|
const QMetaObject* meta = widget->metaObject();
|
||||||
QMetaObject::invokeMethod(widget, "hideMask", Qt::AutoConnection);
|
int methodIndex = meta->indexOfMethod("hideMask()");
|
||||||
widget->setFocus();
|
if(methodIndex != -1)
|
||||||
|
QMetaObject::invokeMethod(widget, "hideMask", Qt::AutoConnection);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
widget->raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
//qDebug() << "remove requester: " << requester->objectName() << "requester count: " << m_activeRequests.size();
|
//qDebug() << "remove requester: " << requester->objectName() << "requester count: " << m_activeRequests.size();
|
||||||
|
|
|
||||||
|
|
@ -18,29 +18,7 @@
|
||||||
<normaloff>:/img/images/icon_hierarchy.png</normaloff>:/img/images/icon_hierarchy.png</iconset>
|
<normaloff>:/img/images/icon_hierarchy.png</normaloff>:/img/images/icon_hierarchy.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QListView
|
<string notr="true"/>
|
||||||
{
|
|
||||||
outline:0px;
|
|
||||||
border-left:1px solid rgb(235,235,235);
|
|
||||||
border-right:1px solid rgb(235,235,235);
|
|
||||||
border-top:1px solid rgb(0,0,0);
|
|
||||||
border-bottom:1px solid rgb(0,0,0);
|
|
||||||
}
|
|
||||||
QListView::item
|
|
||||||
{
|
|
||||||
border:0px;
|
|
||||||
padding-left:5px;
|
|
||||||
padding-top:1px;
|
|
||||||
padding-bottom:1px;
|
|
||||||
}
|
|
||||||
QListView::item:hover
|
|
||||||
{
|
|
||||||
background-color: rgb(240, 248, 255);
|
|
||||||
}
|
|
||||||
QListView::item:selected
|
|
||||||
{
|
|
||||||
background-color:rgb(211, 241, 250);
|
|
||||||
}</string>
|
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
|
|
@ -96,7 +74,11 @@ background-color:rgb(211, 241, 250);
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="sourceList"/>
|
<widget class="QListWidget" name="sourceList">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -182,7 +164,11 @@ QPushButton:pressed
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="selectedList"/>
|
<widget class="QListWidget" name="selectedList">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,6 @@ QPushButton:pressed
|
||||||
background-color:rgba(70,130,180,50);
|
background-color:rgba(70,130,180,50);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPlainTextEdit
|
|
||||||
{
|
|
||||||
border:1px solid rgb(235,235,235);
|
|
||||||
border-bottom:1px solid rgb(0,0,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
QComboBox QAbstractItemView
|
QComboBox QAbstractItemView
|
||||||
{
|
{
|
||||||
outline: 0px; /* 去除选中虚线框 */
|
outline: 0px; /* 去除选中虚线框 */
|
||||||
|
|
@ -125,6 +119,26 @@ QTreeView::item:selected
|
||||||
color:rgb(0,0,0);
|
color:rgb(0,0,0);
|
||||||
background-color:rgb(211, 241, 250);
|
background-color:rgb(211, 241, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QListView
|
||||||
|
{
|
||||||
|
outline:0px;
|
||||||
|
}
|
||||||
|
QListView::item
|
||||||
|
{
|
||||||
|
border:0px;
|
||||||
|
padding-left:5px;
|
||||||
|
padding-top:1px;
|
||||||
|
padding-bottom:1px;
|
||||||
|
}
|
||||||
|
QListView::item:hover
|
||||||
|
{
|
||||||
|
background-color: rgb(240, 248, 255);
|
||||||
|
}
|
||||||
|
QListView::item:selected
|
||||||
|
{
|
||||||
|
background-color:rgb(211, 241, 250);
|
||||||
|
}
|
||||||
</string>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
|
|
||||||
|
|
@ -18,29 +18,7 @@
|
||||||
<normaloff>:/img/images/icon_addTable.png</normaloff>:/img/images/icon_addTable.png</iconset>
|
<normaloff>:/img/images/icon_addTable.png</normaloff>:/img/images/icon_addTable.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QListView
|
<string notr="true"/>
|
||||||
{
|
|
||||||
outline:0px;
|
|
||||||
border-left:1px solid rgb(235,235,235);
|
|
||||||
border-right:1px solid rgb(235,235,235);
|
|
||||||
border-top:1px solid rgb(0,0,0);
|
|
||||||
border-bottom:1px solid rgb(0,0,0);
|
|
||||||
}
|
|
||||||
QListView::item
|
|
||||||
{
|
|
||||||
border:0px;
|
|
||||||
padding-left:5px;
|
|
||||||
padding-top:1px;
|
|
||||||
padding-bottom:1px;
|
|
||||||
}
|
|
||||||
QListView::item:hover
|
|
||||||
{
|
|
||||||
background-color: rgb(240, 248, 255);
|
|
||||||
}
|
|
||||||
QListView::item:selected
|
|
||||||
{
|
|
||||||
background-color:rgb(211, 241, 250);
|
|
||||||
}</string>
|
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
|
|
@ -84,13 +62,13 @@ background-color:rgb(211, 241, 250);
|
||||||
<widget class="QLabel" name="label_modelType">
|
<widget class="QLabel" name="label_modelType">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>61</width>
|
<width>71</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>61</width>
|
<width>71</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -103,13 +81,13 @@ background-color:rgb(211, 241, 250);
|
||||||
<widget class="QLabel" name="label_modelName">
|
<widget class="QLabel" name="label_modelName">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>61</width>
|
<width>71</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>61</width>
|
<width>71</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -141,13 +119,13 @@ background-color:rgb(211, 241, 250);
|
||||||
<widget class="QLabel" name="label_modelComment">
|
<widget class="QLabel" name="label_modelComment">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>61</width>
|
<width>71</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>61</width>
|
<width>71</width>
|
||||||
<height>21</height>
|
<height>21</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue