修改工具的qss
This commit is contained in:
+59
-6
@@ -4,16 +4,69 @@
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
.QPushButton[state="0"]{
|
||||
font :15px "黑体";
|
||||
border-image:url(:/img/sub_rect.png);
|
||||
QScrollArea {
|
||||
background-color: #364860;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.QPushButton[state="2"]{
|
||||
QWidget#scrollAreaWidgetContents {
|
||||
background-color: #364860;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.QScrollArea QPushButton{
|
||||
color: #FCF9FB;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
.QScrollArea QPushButton[state="0"]{
|
||||
font :15px "黑体";
|
||||
background-color: #364860;
|
||||
}
|
||||
|
||||
.QScrollArea QPushButton[state="2"]{
|
||||
font :20px "黑体";
|
||||
font-weight:bold;
|
||||
border-image:url(:/img/sub_rect.png);
|
||||
border-left: 2px solid #16A4FA;
|
||||
background-color: #2A3950;
|
||||
|
||||
}
|
||||
|
||||
.QScrollArea QPushButton:hover{
|
||||
|
||||
color: #2EFEF7;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
QPushButton#pushButton_ShowExtern
|
||||
{
|
||||
background-color: #364860;
|
||||
border: none;
|
||||
background-image: url(:/img/pop-normal.png);
|
||||
background-repeat:no-repeat;
|
||||
background-position: left;
|
||||
font :20px "黑体";
|
||||
text-align: right;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton#pushButton_ShowExtern:hover
|
||||
{
|
||||
background-image: url(:/img/pop-hover.png);
|
||||
background-repeat:no-repeat;
|
||||
background-position: left;
|
||||
}
|
||||
|
||||
QPushButton#pushButton_ShowExtern:pressed
|
||||
{
|
||||
background-image: url(:/img/pop-normal.png);
|
||||
background-repeat:no-repeat;
|
||||
background-position: left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+45
-28
@@ -14,6 +14,41 @@
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_ShowExtern">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>弹出窗口</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="maximumSize">
|
||||
@@ -40,9 +75,15 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>198</width>
|
||||
<height>368</height>
|
||||
<height>388</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget#QScrollAreaWidgetContents {
|
||||
background-color: #364860;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
@@ -56,6 +97,9 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -76,33 +120,6 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_ShowExtern">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(107, 255, 246);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>弹出右侧窗口-></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" rowspan="2">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
||||
@@ -13,5 +13,7 @@
|
||||
<file>sub_rect1.png</file>
|
||||
<file>sub_rect1_sel.png</file>
|
||||
<file>sub_rect.png</file>
|
||||
<file>pop-hover.png</file>
|
||||
<file>pop-normal.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
Binary file not shown.
|
After Width: | Height: | Size: 498 B |
@@ -15,9 +15,16 @@ Tools_Index1::Tools_Index1(QWidget *parent) :
|
||||
this->setStyleSheet(stylesheet);
|
||||
file.close();
|
||||
|
||||
|
||||
QDateTime current = QDateTime::currentDateTime();
|
||||
log_file_name = QString("./log/other/%1.log").arg(current.toString("yyyyMMddHHmmss"));
|
||||
log_file_name = QString("./log/textlog/%1.log").arg(current.toString("yyyyMMddHHmmss"));
|
||||
|
||||
/*log_file = new QFile(log_file_name);
|
||||
if(log_file->open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
StringModel = new QStringListModel(ui->listView);
|
||||
@@ -36,6 +43,16 @@ Tools_Index1::Tools_Index1(QWidget *parent) :
|
||||
|
||||
Tools_Index1::~Tools_Index1()
|
||||
{
|
||||
if(log_file)
|
||||
{
|
||||
if(log_file->isOpen())
|
||||
{
|
||||
log_file->close();
|
||||
|
||||
}
|
||||
log_file->deleteLater();
|
||||
}
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -63,7 +80,20 @@ void Tools_Index1::setLog(const QString &message)
|
||||
count ++;
|
||||
|
||||
|
||||
//ui->listView->i
|
||||
QFile file(log_file_name);
|
||||
if(file.open(QIODevice::Append | QIODevice::Text) )
|
||||
{
|
||||
QString s;
|
||||
s.append(tr("[%1] %2 >> %3\n").arg(QString::number(count)).arg(time).arg(message));
|
||||
|
||||
QTextStream out(&file);
|
||||
|
||||
out << s;
|
||||
|
||||
file.flush();
|
||||
file.close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -15,16 +15,19 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="frame">
|
||||
@@ -50,27 +53,10 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_ExportLog">
|
||||
<property name="text">
|
||||
<string>导出记录</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<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>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QListView" name="listView">
|
||||
<property name="font">
|
||||
<font>
|
||||
|
||||
@@ -44,6 +44,9 @@ OPMapWidget::OPMapWidget(QWidget *parent, Configuration *config) : QGraphicsView
|
||||
core = new internals::Core;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QDir *MapDir = new QDir;
|
||||
if(!MapDir->exists("./maps"))
|
||||
MapDir->mkdir("./maps");//如果文件夹不存在就新建
|
||||
@@ -743,7 +746,10 @@ void OPMapWidget::mouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
|
||||
|
||||
QString string = QString(tr("zom:%1\nlat:%2\nlng:%3").arg(map->Zoom()).arg(QString::number(currentmouseposition.Lat(),'f',8)).arg(QString::number(currentmouseposition.Lng(),'f',8)));
|
||||
QString string = QString(tr("zom:%1\nlat:%2\nlng:%3")
|
||||
.arg(map->Zoom(),2)
|
||||
.arg(QString::number(currentmouseposition.Lat(),'f',8),12)
|
||||
.arg(QString::number(currentmouseposition.Lng(),'f',8),12));
|
||||
|
||||
|
||||
if(mouseInfo) {
|
||||
|
||||
Reference in New Issue
Block a user