diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-14 11:44:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-14 11:56:48 +0000 |
commit | f7bb9d000b6f54298cc3d9678711b82eb2dcb337 (patch) | |
tree | f141a65453c5e9fee01a276a88a68344db2d882a /sd | |
parent | 4f08dcc0e68fa7da6778706b349a19de1c064531 (diff) |
convert cross-fade dialog to .ui
Change-Id: I51f90299f0a2f9573dd8cfd1e6b875e7c76af125
Diffstat (limited to 'sd')
-rw-r--r-- | sd/AllLangResTarget_sd.mk | 1 | ||||
-rw-r--r-- | sd/UIConfig_sdraw.mk | 1 | ||||
-rw-r--r-- | sd/source/ui/dlg/morphdlg.cxx | 33 | ||||
-rw-r--r-- | sd/source/ui/dlg/morphdlg.src | 97 | ||||
-rw-r--r-- | sd/source/ui/inc/morphdlg.hrc | 29 | ||||
-rw-r--r-- | sd/source/ui/inc/morphdlg.hxx | 17 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/crossfadedialog.ui | 191 |
7 files changed, 212 insertions, 157 deletions
diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index 3e360395dcbb..88578a858016 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/dlgfield.src \ sd/source/ui/dlg/dlgolbul.src \ sd/source/ui/dlg/LayerDialog.src \ - sd/source/ui/dlg/morphdlg.src \ sd/source/ui/dlg/navigatr.src \ sd/source/ui/dlg/PaneDockingWindow.src \ sd/source/ui/dlg/RemoteDialog.src \ diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index 51c9726d3716..1f924e810adf 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -67,6 +67,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/sdraw,\ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/breakdialog \ + sd/uiconfig/sdraw/ui/crossfadedialog \ sd/uiconfig/sdraw/ui/dlgsnap \ sd/uiconfig/sdraw/ui/copydlg \ sd/uiconfig/sdraw/ui/drawchardialog \ diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index 2b682bddb8d7..af95d5904ebf 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -23,7 +23,6 @@ #include "sdresid.hxx" #include "sdmod.hxx" #include "sdiocmpt.hxx" -#include "morphdlg.hrc" #include <svx/xfillit0.hxx> #include <svx/xlineit0.hxx> #include <svx/xenum.hxx> @@ -33,18 +32,14 @@ namespace sd { -MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2 ) : - ModalDialog ( pParent, SdResId( DLG_MORPH ) ), - aGrpPreset ( this, SdResId( GRP_PRESET ) ), - aFtSteps ( this, SdResId( FT_STEPS ) ), - aMtfSteps ( this, SdResId( MTF_STEPS ) ), - aCbxAttributes ( this, SdResId( CBX_ATTRIBUTES ) ), - aCbxOrientation ( this, SdResId( CBX_ORIENTATION ) ), - aBtnOK ( this, SdResId( BTN_OK ) ), - aBtnCancel ( this, SdResId( BTN_CANCEL ) ), - aBtnHelp ( this, SdResId( BTN_HELP ) ) +MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2 ) + : ModalDialog(pParent, "CrossFadeDialog", + "modules/sdraw/ui/crossfadedialog.ui") { - FreeResource(); + get(m_pMtfSteps, "increments"); + get(m_pCbxAttributes, "attributes"); + get(m_pCbxOrientation, "orientation"); + LoadSettings(); SfxItemPool* pPool = (SfxItemPool*) pObj1->GetObjectItemPool(); @@ -62,7 +57,7 @@ MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* if ( ( ( eLineStyle1 == XLINE_NONE ) || ( eLineStyle2 == XLINE_NONE ) ) && ( ( eFillStyle1 != XFILL_SOLID ) || ( eFillStyle2 != XFILL_SOLID ) ) ) { - aCbxAttributes.Disable(); + m_pCbxAttributes->Disable(); } } @@ -89,9 +84,9 @@ void MorphDlg::LoadSettings() bOrient = bAttrib = sal_True; } - aMtfSteps.SetValue( nSteps ); - aCbxOrientation.Check( bOrient ); - aCbxAttributes.Check( bAttrib ); + m_pMtfSteps->SetValue( nSteps ); + m_pCbxOrientation->Check( bOrient ); + m_pCbxAttributes->Check( bAttrib ); } // ----------------------------------------------------------------------------- @@ -105,9 +100,9 @@ void MorphDlg::SaveSettings() const { SdIOCompat aCompat( *xOStm, STREAM_WRITE, 1 ); - *xOStm << (sal_uInt16) aMtfSteps.GetValue() - << aCbxOrientation.IsChecked() - << aCbxAttributes.IsChecked(); + *xOStm << (sal_uInt16) m_pMtfSteps->GetValue() + << m_pCbxOrientation->IsChecked() + << m_pCbxAttributes->IsChecked(); } } diff --git a/sd/source/ui/dlg/morphdlg.src b/sd/source/ui/dlg/morphdlg.src deleted file mode 100644 index 975a7af8b055..000000000000 --- a/sd/source/ui/dlg/morphdlg.src +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "app.hrc" -#include "morphdlg.hrc" -#include "helpids.h" - -ModalDialog DLG_MORPH -{ - HelpID = CMD_SID_POLYGON_MORPHING ; - HelpID = ".uno:Morphing" ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 196 , 68 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 141 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 141 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 140 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedLine GRP_PRESET - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 129 , 8 ) ; - Text [ en-US ] = "Settings" ; - }; - FixedText FT_STEPS - { - Pos = MAP_APPFONT ( 12 , 16 ) ; - Size = MAP_APPFONT ( 40 , 10 ) ; - Text [ en-US ] = "Increments" ; - }; - MetricField MTF_STEPS - { - HelpID = "sd:MetricField:DLG_MORPH:MTF_STEPS"; - Border = TRUE ; - Pos = MAP_APPFONT ( 56 , 14 ) ; - Size = MAP_APPFONT ( 30 , 12 ) ; - TabStop = TRUE ; - Spin = TRUE ; - Repeat = TRUE ; - Minimum = 1 ; - Maximum = 256 ; - First = 1 ; - Last = 256 ; - }; - CheckBox CBX_ATTRIBUTES - { - HelpID = "sd:CheckBox:DLG_MORPH:CBX_ATTRIBUTES"; - Pos = MAP_APPFONT ( 12 , 29 ) ; - Size = MAP_APPFONT ( 121 , 12 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Cross-fade attributes" ; - }; - CheckBox CBX_ORIENTATION - { - HelpID = "sd:CheckBox:DLG_MORPH:CBX_ORIENTATION"; - Pos = MAP_APPFONT ( 12 , 44 ) ; - Size = MAP_APPFONT ( 121 , 12 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Same orientation" ; - }; - Text [ en-US ] = "Cross-fading" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/morphdlg.hrc b/sd/source/ui/inc/morphdlg.hrc deleted file mode 100644 index 8a4539835ab3..000000000000 --- a/sd/source/ui/inc/morphdlg.hrc +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#define DLG_MORPH 653 -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 -#define GRP_PRESET 1 -#define FT_STEPS 1 -#define MTF_STEPS 1 -#define CBX_ATTRIBUTES 1 -#define CBX_ORIENTATION 2 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/morphdlg.hxx b/sd/source/ui/inc/morphdlg.hxx index a3ff8740681d..1e639eb31fc5 100644 --- a/sd/source/ui/inc/morphdlg.hxx +++ b/sd/source/ui/inc/morphdlg.hxx @@ -41,19 +41,14 @@ public: virtual ~MorphDlg (void); void SaveSettings() const; - sal_uInt16 GetFadeSteps() const { return (sal_uInt16) aMtfSteps.GetValue(); } - sal_Bool IsAttributeFade() const { return aCbxAttributes.IsChecked(); } - sal_Bool IsOrientationFade() const { return aCbxOrientation.IsChecked(); } + sal_uInt16 GetFadeSteps() const { return (sal_uInt16) m_pMtfSteps->GetValue(); } + bool IsAttributeFade() const { return m_pCbxAttributes->IsChecked(); } + bool IsOrientationFade() const { return m_pCbxOrientation->IsChecked(); } private: - FixedLine aGrpPreset; - FixedText aFtSteps; - MetricField aMtfSteps; - CheckBox aCbxAttributes; - CheckBox aCbxOrientation; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + NumericField* m_pMtfSteps; + CheckBox* m_pCbxAttributes; + CheckBox* m_pCbxOrientation; void LoadSettings(); }; diff --git a/sd/uiconfig/sdraw/ui/crossfadedialog.ui b/sd/uiconfig/sdraw/ui/crossfadedialog.ui new file mode 100644 index 000000000000..b8db60b3871e --- /dev/null +++ b/sd/uiconfig/sdraw/ui/crossfadedialog.ui @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="lower">1</property> + <property name="upper">256</property> + <property name="value">1</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="CrossFadeDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Cross-fading</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="margin_top">5</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkCheckButton" id="orientation"> + <property name="label" translatable="yes">Same orientation</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="attributes"> + <property name="label" translatable="yes">Cross-fade attributes</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Increments</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">increments</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="increments"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Settings</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> |