修改样式
This commit is contained in:
parent
f5c61d6940
commit
adc67aac77
BIN
bin/theme.rcc
BIN
bin/theme.rcc
Binary file not shown.
|
|
@ -9,10 +9,11 @@ BusyIndicator::BusyIndicator(QWidget* parent)
|
||||||
setAttribute(Qt::WA_TransparentForMouseEvents);
|
setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
|
|
||||||
QLabel* icon = new QLabel;
|
QLabel* icon = new QLabel;
|
||||||
icon->resize(80, 80);
|
// icon->setMaximumSize(80, 80);
|
||||||
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
// QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
icon->setSizePolicy(sizePolicy);
|
// icon->setSizePolicy(sizePolicy);
|
||||||
_busy_movie = new QMovie(":gif/BusyIndicator.gif"); // 转圈 GIF
|
_busy_movie = new QMovie(":gif/BusyIndicator.gif"); // 转圈 GIF
|
||||||
|
_busy_movie->setScaledSize(QSize(50, 50));
|
||||||
icon->setMovie(_busy_movie);
|
icon->setMovie(_busy_movie);
|
||||||
_busy_movie->start();
|
_busy_movie->start();
|
||||||
QLabel* text = new QLabel(QStringLiteral(u"加载数据中......"));
|
QLabel* text = new QLabel(QStringLiteral(u"加载数据中......"));
|
||||||
|
|
@ -26,14 +27,14 @@ BusyIndicator::BusyIndicator(QWidget* parent)
|
||||||
|
|
||||||
void BusyIndicator::Start()
|
void BusyIndicator::Start()
|
||||||
{
|
{
|
||||||
// _busy_movie->start();
|
_busy_movie->start();
|
||||||
this->setVisible(true);
|
this->setVisible(true);
|
||||||
this->update();
|
this->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BusyIndicator::Stop()
|
void BusyIndicator::Stop()
|
||||||
{
|
{
|
||||||
// _busy_movie->stop();
|
_busy_movie->stop();
|
||||||
this->setVisible(false);
|
this->setVisible(false);
|
||||||
this->update();
|
this->update();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -304,18 +304,15 @@ void MainWindow::initAction()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
connect(_tree_measure_analysis, &MeasureAnalysisTree::TreeWidget::newMeasureAnalysisProject, new_measurement_analysis_handler);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::applyStyleSheet()
|
void MainWindow::applyStyleSheet()
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_DEBUG
|
// #ifdef ENABLE_DEBUG
|
||||||
QString style_file_path = "D:/Workspace/EnergySpectrumAnalyerProject/EnergySpectrumAnalyer/style/stylesheet/";
|
// QString style_file_path = "D:/Workspace/EnergySpectrumAnalyerProject/EnergySpectrumAnalyer/style/stylesheet/";
|
||||||
#else
|
// #else
|
||||||
QString style_file_path = ":/stylesheet/";
|
QString style_file_path = ":/stylesheet/";
|
||||||
#endif
|
// #endif
|
||||||
QFile file_stylesheet_default(style_file_path + "default.qss");
|
QFile file_stylesheet_default(style_file_path + "default.qss");
|
||||||
if (file_stylesheet_default.open(QFile::ReadOnly)) {
|
if (file_stylesheet_default.open(QFile::ReadOnly)) {
|
||||||
const QString& str_stylesheet_default = file_stylesheet_default.readAll();
|
const QString& str_stylesheet_default = file_stylesheet_default.readAll();
|
||||||
|
|
@ -357,6 +354,12 @@ void MainWindow::closeProject(const QString& project_name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::showEvent(QShowEvent *event)
|
||||||
|
{
|
||||||
|
QMainWindow::showEvent(event);
|
||||||
|
this->applyStyleSheet();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent* event)
|
void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
{
|
{
|
||||||
QList<MeasureAnalysisProjectModel *> models = ProjectList::Instance()->GetProjectModels();
|
QList<MeasureAnalysisProjectModel *> models = ProjectList::Instance()->GetProjectModels();
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ signals:
|
||||||
void newProject(const QString &project_name);
|
void newProject(const QString &project_name);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void showEvent(QShowEvent* event) override;
|
||||||
virtual void closeEvent(QCloseEvent* event) override;
|
virtual void closeEvent(QCloseEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -155,9 +155,6 @@ void ParticleTimeDifferenceView::loadDataFromFile()
|
||||||
x_max = bin_max;
|
x_max = bin_max;
|
||||||
if ( y_max < count )
|
if ( y_max < count )
|
||||||
y_max = count;
|
y_max = count;
|
||||||
// if ( _max_diff <= bin ) {
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
_histogram->setData(new QwtIntervalSeriesData(samples));
|
_histogram->setData(new QwtIntervalSeriesData(samples));
|
||||||
_plot->SetAxisInitRange(QwtPlot::xBottom, 0.0f, _x_max);
|
_plot->SetAxisInitRange(QwtPlot::xBottom, 0.0f, _x_max);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
|
||||||
QwtPlot {
|
QwtPlot {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
@ -12,18 +12,18 @@ QPlainTextEdit {
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeView::item:selected:active{
|
QTreeView::item:selected:active{
|
||||||
color: black;
|
color: white;
|
||||||
background: #7bbfea;
|
background: #0078d4;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeView::item:selected:!active {
|
QTreeView::item:selected:!active {
|
||||||
color: black;
|
color: black;
|
||||||
background: #7bbfea;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTableView {
|
QTableView {
|
||||||
selection-color: black;
|
selection-color: white;
|
||||||
selection-background-color: #7bbfea;
|
selection-background-color: #0078d4;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTableView QTableCornerButton::section {
|
QTableView QTableCornerButton::section {
|
||||||
|
|
@ -44,8 +44,7 @@ QHeaderView::section {
|
||||||
border-top: 0px;
|
border-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QHeaderView::section:checked
|
QHeaderView::section {
|
||||||
{
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,21 +90,5 @@ QScrollBar::add-page {
|
||||||
QScrollBar::sub-page {
|
QScrollBar::sub-page {
|
||||||
background: rgba(0, 0, 0, 0);
|
background: rgba(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
QTreeView[Checkable="false"]::indicator:unchecked {
|
|
||||||
background: blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTreeView[Checkable="false"]::indicator:checked {
|
|
||||||
background: blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTreeView[Checkable="true"]::unchecked {
|
|
||||||
background: red; }
|
|
||||||
|
|
||||||
QTreeView[Checkable="true"]::checked {
|
|
||||||
background: green;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
|
||||||
ads--CDockContainerWidget ads--CDockSplitter::handle {
|
ads--CDockContainerWidget ads--CDockSplitter::handle {
|
||||||
background: #2a5caa;
|
background: #2a5caa;
|
||||||
}
|
}
|
||||||
|
|
@ -10,4 +10,3 @@ ads--CDockSplitter::handle:horizontal {
|
||||||
ads--CDockSplitter::handle:vertical {
|
ads--CDockSplitter::handle:vertical {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
Loading…
Reference in New Issue
Block a user