Skip to content

Commit

Permalink
Add the icon
Browse files Browse the repository at this point in the history
  • Loading branch information
yhw605 committed Apr 7, 2024
1 parent a8cd4fe commit 1044ac2
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 9 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
tformdoc.h tformdoc.cc tformdoc.ui
textviewer.cc textviewer.h textviewer.ui
downloadfinished.h downloadfinished.cc downloadfinished.ui
other_resources.qrc



Expand Down
14 changes: 7 additions & 7 deletions CMakeLists.txt.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 12.0.2, 2024-04-05T23:16:44. -->
<!-- Written by QtCreator 12.0.2, 2024-04-07T20:43:45. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down Expand Up @@ -99,7 +99,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.5.3 MSVC2019 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.5.3 MSVC2019 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.653.win64_msvc2019_64_kit</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">2</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
Expand Down Expand Up @@ -412,7 +412,7 @@
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-RelWithDebInfo</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-Release</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
Expand All @@ -430,7 +430,7 @@
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-RelWithDebInfo/thirdparty/curl/src</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/thirdparty/curl/src</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.2">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
Expand All @@ -448,7 +448,7 @@
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-RelWithDebInfo/thirdparty/zlib</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/thirdparty/zlib</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.3">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
Expand All @@ -466,7 +466,7 @@
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-RelWithDebInfo/thirdparty/zlib</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/thirdparty/zlib</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.4">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
Expand All @@ -484,7 +484,7 @@
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-RelWithDebInfo/thirdparty/hatanaka/rnxcmp/source</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/Z-Non-ProgramFile/GnssNotes/QGOPDD/build-QGOPDD-Desktop_Qt_6_5_3_MSVC2019_64bit-Release/thirdparty/hatanaka/rnxcmp/source</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">5</value>
</valuemap>
Expand Down
Binary file added QGOPDD.ico
Binary file not shown.
Binary file added QGOPDD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#include "qgopdd.h"
#include "tformdoc.h"
// #include "tformdoc.h"

#include <QApplication>
#include <QIcon>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QGOPDD w;
QIcon icon(":/img/QGOPDD.png");
// w.setWindowIcon(icon);
w.show();
// TFormDoc t;
// t.LoadFromFile("");
Expand Down
6 changes: 6 additions & 0 deletions other_resources.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/icon">
<file>QGOPDD.png</file>
<file>QGOPDD.ico</file>
</qresource>
</RCC>
3 changes: 3 additions & 0 deletions qgopdd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <QWebEnginePage>
#include <QTimer>
#include <QtConcurrent/QtConcurrent>
#include <QIcon>

#include <thread>
#include <iostream>
Expand All @@ -23,6 +24,8 @@ QGOPDD::QGOPDD(QWidget *parent)
, ui(new Ui::QGOPDD)
{
ui->setupUi(this);
QIcon icon(":/icon/QGOPDD.ico");
this->setWindowIcon(icon);
// connect(this, QGOPDD::StartDownloading(QDate&, QDate, QProgressBar*, int), this->progress_caller, ProgressCaller::SetProgress);
// ui->TableWidgetAddedStas->horizontalHeader()->sectionResizeMode(QHeaderView::Stretch);
ui->ComboSeleSta->setEditable(true);
Expand Down
1 change: 1 addition & 0 deletions textviewer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TextViewer::TextViewer(QWidget *parent)
, ui(new Ui::TextViewer)
{
ui->setupUi(this);
this->setWindowIcon(QIcon(":/icon/QGOPDD.ico"));
ui->mdiArea->setTabsMovable(true);
this->setWindowTitle("Rinex Viewer");
// setCentralWidget(ui->mdiArea);
Expand Down
3 changes: 2 additions & 1 deletion tformdoc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ void TFormDoc::LoadFromFile(QString filename) {
QFile txtfile(filename);
if (txtfile.open(QIODevice::ReadWrite | QIODevice::Text)) {
QTextStream txt_stream(&txtfile);
// auto fptr = txtfile.map(0, txtfile.size() / 4);
ui->textEdit->clear();
ui->textEdit->setPlainText(txt_stream.readAll());
ui->textEdit->setPlainText(txtfile.readAll());
// const int chunkSize = 1024; // 例如,每次读取 1 KB
// QByteArray buffer(chunkSize, '\0');

Expand Down

0 comments on commit 1044ac2

Please sign in to comment.