changeset 2:cf68a996b3f1

Re #242: Create Qt# UI for WarFoundry * Add initial Tango icons until Qt4.6 becomes standard with QIcon.fromTheme() method to get native icons
author IBBoard <dev@ibboard.co.uk>
date Sat, 23 Jan 2010 20:26:04 +0000
parents 4ff09911ef64
children ac1bf60edf63
files IBBoard.WarFoundry.GUI.QtSharp.csproj MainWindow.cs icons/ui/edit-delete.png icons/ui/edit-redo.png icons/ui/edit-undo.png icons/ui/exit.png icons/ui/export.png icons/ui/filenew.png icons/ui/fileopen.png icons/ui/filesave.png icons/ui/filesaveas.png icons/ui/help-about.png icons/ui/window-close.png
diffstat 13 files changed, 52 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/IBBoard.WarFoundry.GUI.QtSharp.csproj	Sat Jan 23 19:55:54 2010 +0000
     1.2 +++ b/IBBoard.WarFoundry.GUI.QtSharp.csproj	Sat Jan 23 20:26:04 2010 +0000
     1.3 @@ -40,10 +40,44 @@
     1.4    <ItemGroup>
     1.5      <None Include="compile-ui.sh" />
     1.6      <None Include="qt-gui\MainWindowLayout.ui" />
     1.7 +    <None Include="icons\ui\filenew.png">
     1.8 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     1.9 +    </None>
    1.10 +    <None Include="icons\ui\fileopen.png">
    1.11 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.12 +    </None>
    1.13 +    <None Include="icons\ui\filesave.png">
    1.14 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.15 +    </None>
    1.16 +    <None Include="icons\ui\filesaveas.png">
    1.17 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.18 +    </None>
    1.19 +    <None Include="icons\ui\edit-delete.png">
    1.20 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.21 +    </None>
    1.22 +    <None Include="icons\ui\edit-redo.png">
    1.23 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.24 +    </None>
    1.25 +    <None Include="icons\ui\edit-undo.png">
    1.26 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.27 +    </None>
    1.28 +    <None Include="icons\ui\exit.png">
    1.29 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.30 +    </None>
    1.31 +    <None Include="icons\ui\export.png">
    1.32 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.33 +    </None>
    1.34 +    <None Include="icons\ui\window-close.png">
    1.35 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.36 +    </None>
    1.37 +    <None Include="icons\ui\help-about.png">
    1.38 +      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    1.39 +    </None>
    1.40    </ItemGroup>
    1.41    <ItemGroup>
    1.42      <Folder Include="qt-gui\" />
    1.43      <Folder Include="icons\" />
    1.44 +    <Folder Include="icons\ui\" />
    1.45    </ItemGroup>
    1.46    <ItemGroup>
    1.47      <Content Include="icons\App.png">
     2.1 --- a/MainWindow.cs	Sat Jan 23 19:55:54 2010 +0000
     2.2 +++ b/MainWindow.cs	Sat Jan 23 20:26:04 2010 +0000
     2.3 @@ -14,13 +14,28 @@
     2.4  		layout = new Ui_MainWindowLayout();
     2.5  		layout.SetupUi(this);
     2.6  		WindowIcon = new QIcon("icons/App.png");
     2.7 -		AddMenuActions();
     2.8 +		SetUpActionIcons();
     2.9 +		ConnectMenuActions();
    2.10  		SetUpToolbar();
    2.11 +		layout.unitTabs.Clear();
    2.12  	}
    2.13  	
    2.14 -	private void AddMenuActions()
    2.15 +	private void SetUpActionIcons()
    2.16  	{
    2.17 -		layout.unitTabs.Clear();
    2.18 +		layout.actionCreateArmy.icon = new QIcon("icons/ui/filenew.png");
    2.19 +		layout.actionOpenArmy.icon = new QIcon("icons/ui/fileopen.png");
    2.20 +		layout.actionSaveArmy.icon = new QIcon("icons/ui/filesave.png");
    2.21 +		layout.actionSaveArmyAs.icon = new QIcon("icons/ui/filesaveas.png");
    2.22 +		layout.menuExportArmyAs.icon = new QIcon("icons/ui/export.png");
    2.23 +		layout.actionCloseArmy.icon = new QIcon("icons/ui/window-close.png");
    2.24 +		layout.actionExit.icon = new QIcon("icons/ui/exit.png");
    2.25 +		layout.actionUndo.icon = new QIcon("icons/ui/edit-undo.png");
    2.26 +		layout.actionRedo.icon = new QIcon("icons/ui/edit-redo.png");
    2.27 +		layout.actionAbout.icon = new QIcon("icons/ui/help-about.png");
    2.28 +	}
    2.29 +	
    2.30 +	private void ConnectMenuActions()
    2.31 +	{
    2.32  	}
    2.33  	
    2.34  	private void SetUpToolbar()
     3.1 Binary file icons/ui/edit-delete.png has changed
     4.1 Binary file icons/ui/edit-redo.png has changed
     5.1 Binary file icons/ui/edit-undo.png has changed
     6.1 Binary file icons/ui/exit.png has changed
     7.1 Binary file icons/ui/export.png has changed
     8.1 Binary file icons/ui/filenew.png has changed
     9.1 Binary file icons/ui/fileopen.png has changed
    10.1 Binary file icons/ui/filesave.png has changed
    11.1 Binary file icons/ui/filesaveas.png has changed
    12.1 Binary file icons/ui/help-about.png has changed
    13.1 Binary file icons/ui/window-close.png has changed