Skip to content

Commit

Permalink
Add window icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Harinlen committed Jun 2, 2015
1 parent be650f0 commit 30769bd
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Robot.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ QT += core gui widgets
#Enabled c++ 11 syntax.
CONFIG += c++11

#Win32 configure.
win32
{
RC_FILE += win.rc
}

SOURCES += \
main.cpp \
mainwindow.cpp \
Expand Down Expand Up @@ -40,3 +46,9 @@ HEADERS += \
groundglobal.h \
polygoneditor.h \
robotmanagewidget.h

RESOURCES += \
res.qrc

DISTFILES += \
win.rc
Binary file added icon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* \brief Initial the main window of the application.
* \param argc Argument count.
* \param argv Argument values.
* \return
* \return The result of the message loop.
*/
int main(int argc, char *argv[])
{
Expand Down
3 changes: 2 additions & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ MainWindow::MainWindow(QWidget *parent) :
m_robotManagement(new RobotManagement(this)),
m_groundGenerator(new GenerateGround(this))
{
//Set the minimum size.
//Set properties.
setWindowIcon(QIcon("://res/icon.png"));
setMinimumSize(500, 309);
//Initial the scroll area.
QScrollArea *groundArea=new QScrollArea(this);
Expand Down
1 change: 1 addition & 0 deletions paneldock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ void PanelDock::showEvent(QShowEvent *event)

void PanelDock::retranslate()
{
setWindowTitle(tr("Timeline"));
m_dockVisible->setText(tr("Control Dock"));
}
5 changes: 5 additions & 0 deletions res.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>res/icon.png</file>
</qresource>
</RCC>
Binary file added res/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions win.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "icon.ico"

0 comments on commit 30769bd

Please sign in to comment.