Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
alphagocc committed Feb 11, 2018
1 parent d5146f2 commit 2aacc83
Show file tree
Hide file tree
Showing 8 changed files with 758 additions and 16 deletions.
4 changes: 2 additions & 2 deletions FiveChess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ FiveChess::FiveChess(QWidget *parent) :
ui(new Ui::FiveChess)
{
ui->setupUi(this);
QObject::connect(ui->pushButtonNew,ui->pushButtonNew->clicked,this,newFiveChessGame);
QObject::connect(ui->pushButtonLoad,ui->pushButtonLoad->clicked,this,loadFiveChessGame);
QObject::connect(ui->pushButtonNew,&QPushButton::clicked,this,&FiveChess::newFiveChessGame);
QObject::connect(ui->pushButtonLoad,&QPushButton::clicked,this,&FiveChess::loadFiveChessGame);
}

FiveChess::~FiveChess()
Expand Down
4 changes: 4 additions & 0 deletions FiveChess.pro
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ RESOURCES += \
fivechessresources.qrc

ICON += Resources/ICO.ico

TRANSLATIONS += zh_CN.ts \
en_US.ts

2 changes: 1 addition & 1 deletion FiveChess.pro.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 4.4.1, 2018-01-23T19:36:28. -->
<!-- Written by QtCreator 4.4.1, 2018-01-26T14:55:05. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down
38 changes: 32 additions & 6 deletions FiveChess.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
<string>FiveChess</string>
</property>
<property name="windowIcon">
<iconset>
<iconset resource="fivechessresources.qrc">
<normaloff>:/ico/Resources/ICO.ico</normaloff>
<normalon>:/ico/Resources/ICO.ico</normalon>
<disabledoff>:/ico/Resources/ICO.ico</disabledoff>
Expand All @@ -35,7 +35,7 @@
</sizepolicy>
</property>
<property name="text">
<string>新游戏</string>
<string>New Game</string>
</property>
</widget>
</item>
Expand All @@ -48,7 +48,7 @@
</sizepolicy>
</property>
<property name="text">
<string>载入</string>
<string>Load Game</string>
</property>
</widget>
</item>
Expand All @@ -60,7 +60,7 @@
</font>
</property>
<property name="text">
<string>五子棋小游戏</string>
<string>FiveChess</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand All @@ -78,10 +78,36 @@
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuLang">
<property name="title">
<string>Language</string>
</property>
<addaction name="actionEnglish"/>
<addaction name="actionChinese"/>
</widget>
<widget class="QMenu" name="menuAbout">
<property name="title">
<string>About</string>
</property>
</widget>
<addaction name="menuLang"/>
<addaction name="menuAbout"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<action name="actionEnglish">
<property name="text">
<string>English</string>
</property>
</action>
<action name="actionChinese">
<property name="text">
<string>Chinese</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<resources>
<include location="fivechessresources.qrc"/>
</resources>
<connections/>
</ui>
535 changes: 535 additions & 0 deletions FiveChess.vcxproj

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions FiveChess.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>cpp;c;cxx;moc;h;def;odl;idl;res;</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Translation Files">
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
<Extensions>ts;xlf</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Translation Files">
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
<Extensions>ts;xlf</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="FiveChess.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="battlegui.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="chessboarddata_process.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="chessboardgui.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="waitdialog.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Debug\moc_battlegui.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="Debug\moc_FiveChess.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="Debug\moc_waitdialog.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="Debug\moc_chessboardgui.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\qrc_fivechessresources.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="FiveChess.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="battlegui.h">
<Filter>Header Files</Filter>
</CustomBuild>
<ClInclude Include="chessboarddata_process.h">
<Filter>Header Files</Filter>
</ClInclude>
<CustomBuild Include="chessboardgui.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="waitdialog.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
<Filter>Generated Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<None Include="en_US.ts">
<Filter>Translation Files</Filter>
</None>
<None Include="zh_CN.ts">
<Filter>Translation Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="FiveChess.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="battlegui.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="chessboardgui.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="waitdialog.ui">
<Filter>Form Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="fivechessresources.qrc">
<Filter>Resource Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_FiveChess.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_battlegui.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_chessboardgui.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_waitdialog.h">
<Filter>Generated Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Resources\black.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Resources\chessboard.jpg">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Resources\white.png">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Resources\blackwin.JPG">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Resources\whitewin.JPG">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Resources\ICO.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions battlegui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ battleGui::battleGui(QWidget *parent) :
time=0;
timer->start(1000);

connect(ui->pushButtonSave,ui->pushButtonSave->clicked,this,[&]{
connect(ui->pushButtonSave,&QPushButton::clicked,this,[&]{
ui->frame->chessBoardData->saveBoard();
});
connect(timer,timer->timeout,this,[&]{
connect(timer,&QTimer::timeout,this,[&]{
time++;
ui->labelTime->setText(tr("时间:%1秒").arg(time));
ui->labelTime->setText(tr("Time:%1 Second").arg(time));
});qDebug()<<"OK3"<<endl;
}

Expand Down
8 changes: 4 additions & 4 deletions battlegui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>对战</string>
<string>Battle</string>
</property>
<property name="windowIcon">
<iconset resource="fivechessresources.qrc">
Expand Down Expand Up @@ -62,21 +62,21 @@
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="pushButtonExit">
<property name="text">
<string>退出</string>
<string>Exit</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="pushButtonSave">
<property name="text">
<string>保存</string>
<string>Save</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="labelTime">
<property name="text">
<string>时间:</string>
<string>Time:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down

0 comments on commit 2aacc83

Please sign in to comment.