Convert RID_PAGE_OPTION_DBFIELD tabpage to .ui
Change-Id: I5ab4c42cf5467254423396ce4f56390fc2fb5276 Reviewed-on: https://gerrit.libreoffice.org/10920 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
aa3babb42f
commit
3953eb3d83
6 changed files with 130 additions and 95 deletions
|
@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sabpilot,\
|
||||||
extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage \
|
extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage \
|
||||||
extensions/uiconfig/sabpilot/ui/groupradioselectionpage \
|
extensions/uiconfig/sabpilot/ui/groupradioselectionpage \
|
||||||
extensions/uiconfig/sabpilot/ui/invokeadminpage \
|
extensions/uiconfig/sabpilot/ui/invokeadminpage \
|
||||||
|
extensions/uiconfig/sabpilot/ui/optiondbfieldpage \
|
||||||
extensions/uiconfig/sabpilot/ui/optionsfinalpage \
|
extensions/uiconfig/sabpilot/ui/optionsfinalpage \
|
||||||
extensions/uiconfig/sabpilot/ui/optionvaluespage \
|
extensions/uiconfig/sabpilot/ui/optionvaluespage \
|
||||||
extensions/uiconfig/sabpilot/ui/selecttablepage \
|
extensions/uiconfig/sabpilot/ui/selecttablepage \
|
||||||
|
|
|
@ -456,17 +456,16 @@ namespace dbp
|
||||||
|
|
||||||
|
|
||||||
ODBFieldPage::ODBFieldPage( OControlWizard* _pParent )
|
ODBFieldPage::ODBFieldPage( OControlWizard* _pParent )
|
||||||
:OMaybeListSelectionPage(_pParent, ModuleRes(RID_PAGE_OPTION_DBFIELD))
|
:OMaybeListSelectionPage(_pParent, "OptionDBField", "modules/sabpilot/ui/optiondbfieldpage.ui")
|
||||||
,m_aFrame (this, ModuleRes(FL_DATABASEFIELD_EXPL))
|
|
||||||
,m_aDescription (this, ModuleRes(FT_DATABASEFIELD_EXPL))
|
|
||||||
,m_aQuestion (this, ModuleRes(FT_DATABASEFIELD_QUEST))
|
|
||||||
,m_aStoreYes (this, ModuleRes(RB_STOREINFIELD_YES))
|
|
||||||
,m_aStoreNo (this, ModuleRes(LB_STOREINFIELD))
|
|
||||||
,m_aStoreWhere (this, ModuleRes(RB_STOREINFIELD_NO))
|
|
||||||
{
|
{
|
||||||
FreeResource();
|
get(m_pDescription, "explLabel");
|
||||||
announceControls(m_aStoreYes, m_aStoreNo, m_aStoreWhere);
|
get(m_pStoreYes, "yesRadiobutton");
|
||||||
m_aStoreWhere.SetDropDownLineCount(10);
|
get(m_pStoreNo, "noRadiobutton");
|
||||||
|
get(m_pStoreWhere, "storeInFieldCombobox");
|
||||||
|
SetText(ModuleRes(RID_STR_OPTION_DB_FIELD_TITLE));
|
||||||
|
|
||||||
|
announceControls(*m_pStoreYes, *m_pStoreNo, *m_pStoreWhere);
|
||||||
|
m_pStoreWhere->SetDropDownLineCount(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -475,7 +474,7 @@ namespace dbp
|
||||||
OMaybeListSelectionPage::initializePage();
|
OMaybeListSelectionPage::initializePage();
|
||||||
|
|
||||||
// fill the fields page
|
// fill the fields page
|
||||||
fillListBox(m_aStoreWhere, getContext().aFieldNames);
|
fillListBox(*m_pStoreWhere, getContext().aFieldNames);
|
||||||
|
|
||||||
implInitialize(getDBFieldSetting());
|
implInitialize(getDBFieldSetting());
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,18 +106,16 @@ namespace dbp
|
||||||
class ODBFieldPage : public OMaybeListSelectionPage
|
class ODBFieldPage : public OMaybeListSelectionPage
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
FixedLine m_aFrame;
|
FixedText* m_pDescription;
|
||||||
FixedText m_aDescription;
|
RadioButton* m_pStoreYes;
|
||||||
FixedText m_aQuestion;
|
RadioButton* m_pStoreNo;
|
||||||
RadioButton m_aStoreYes;
|
ListBox* m_pStoreWhere;
|
||||||
RadioButton m_aStoreNo;
|
|
||||||
ListBox m_aStoreWhere;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ODBFieldPage( OControlWizard* _pParent );
|
ODBFieldPage( OControlWizard* _pParent );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setDescriptionText(const OUString& _rDesc) { m_aDescription.SetText(_rDesc); }
|
void setDescriptionText(const OUString& _rDesc) { m_pDescription->SetText(_rDesc); }
|
||||||
|
|
||||||
// OWizardPage overridables
|
// OWizardPage overridables
|
||||||
virtual void initializePage() SAL_OVERRIDE;
|
virtual void initializePage() SAL_OVERRIDE;
|
||||||
|
|
|
@ -32,59 +32,9 @@ Image IMG_QUERY
|
||||||
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
|
MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; };
|
||||||
};
|
};
|
||||||
|
|
||||||
TabPage RID_PAGE_OPTION_DBFIELD
|
String RID_STR_OPTION_DB_FIELD_TITLE
|
||||||
{
|
{
|
||||||
HelpID = "extensions:TabPage:RID_PAGE_OPTION_DBFIELD";
|
|
||||||
SVLook = TRUE ;
|
|
||||||
Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ;
|
|
||||||
Text [ en-US ] = "Database Field";
|
Text [ en-US ] = "Database Field";
|
||||||
|
|
||||||
FixedLine FL_DATABASEFIELD_EXPL
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 4 , 3 ) ;
|
|
||||||
Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ;
|
|
||||||
};
|
|
||||||
FixedText FT_DATABASEFIELD_EXPL
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 7 , 15 ) ;
|
|
||||||
Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 16 ) ;
|
|
||||||
WordBreak = TRUE;
|
|
||||||
};
|
|
||||||
FixedText FT_DATABASEFIELD_QUEST
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 7 , 34 ) ;
|
|
||||||
Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 16 ) ;
|
|
||||||
WordBreak = TRUE;
|
|
||||||
Text [ en-US ] = "Do you want to save the value in a database field?";
|
|
||||||
};
|
|
||||||
RadioButton RB_STOREINFIELD_YES
|
|
||||||
{
|
|
||||||
HelpID = "extensions:RadioButton:RID_PAGE_OPTION_DBFIELD:RB_STOREINFIELD_YES";
|
|
||||||
Pos = MAP_APPFONT ( 7 , 53 ) ;
|
|
||||||
Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 20, 10 ) ;
|
|
||||||
Group = TRUE;
|
|
||||||
TabStop = TRUE;
|
|
||||||
Text [ en-US ] = "~Yes, I want to save it in the following database field:";
|
|
||||||
};
|
|
||||||
ListBox LB_STOREINFIELD
|
|
||||||
{
|
|
||||||
HelpID = "extensions:ListBox:RID_PAGE_OPTION_DBFIELD:LB_STOREINFIELD";
|
|
||||||
Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 23, 51 ) ;
|
|
||||||
Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 30, 14 ) ;
|
|
||||||
TabStop = TRUE;
|
|
||||||
SVLook = TRUE ;
|
|
||||||
Border = TRUE ;
|
|
||||||
DropDown = TRUE;
|
|
||||||
AutoHScroll = TRUE ;
|
|
||||||
};
|
|
||||||
RadioButton RB_STOREINFIELD_NO
|
|
||||||
{
|
|
||||||
HelpID = "extensions:RadioButton:RID_PAGE_OPTION_DBFIELD:RB_STOREINFIELD_NO";
|
|
||||||
Pos = MAP_APPFONT ( 7 , 68 ) ;
|
|
||||||
Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 10 ) ;
|
|
||||||
TabStop = FALSE;
|
|
||||||
Text [ en-US ] = "~No, I only want to save the value in the form.";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
String RID_STR_TYPE_TABLE
|
String RID_STR_TYPE_TABLE
|
||||||
|
|
|
@ -46,20 +46,14 @@
|
||||||
#define RID_STR_FIELDINFO_COMBOBOX (RID_STRING_START + 12 )
|
#define RID_STR_FIELDINFO_COMBOBOX (RID_STRING_START + 12 )
|
||||||
#define RID_STR_GRIDWIZARD_TITLE (RID_STRING_START + 13 )
|
#define RID_STR_GRIDWIZARD_TITLE (RID_STRING_START + 13 )
|
||||||
#define RID_STR_GROUPWIZARD_TITLE (RID_STRING_START + 14 )
|
#define RID_STR_GROUPWIZARD_TITLE (RID_STRING_START + 14 )
|
||||||
|
#define RID_STR_OPTION_DB_FIELD_TITLE (RID_STRING_START + 15 )
|
||||||
|
|
||||||
// please adjust RID_STRING_END (below) when adding new strings
|
// please adjust RID_STRING_END (below) when adding new strings
|
||||||
#define RID_STRING_END RID_STR_TIMEPOSTFIX
|
#define RID_STRING_END RID_STR_OPTION_DB_FIELD_TITLE
|
||||||
|
|
||||||
// please adjust RID_DIALOG_END (below) when adding new dialogs
|
// please adjust RID_DIALOG_END (below) when adding new dialogs
|
||||||
#define RID_DIALOG_END ( RID_DIALOG_START + 3 )
|
#define RID_DIALOG_END ( RID_DIALOG_START + 3 )
|
||||||
|
|
||||||
// tab pages
|
|
||||||
|
|
||||||
#define RID_PAGE_OPTION_DBFIELD ( RID_PAGE_START + 5 )
|
|
||||||
|
|
||||||
// please adjust RID_PAGE_END (below) when adding new tab pages
|
|
||||||
#define RID_PAGE_END RID_PAGE_OPTION_DBFIELD
|
|
||||||
|
|
||||||
// ErrorBox
|
// ErrorBox
|
||||||
|
|
||||||
#define RID_ERR_INVALID_FORM_CONNECTION ( RID_ERRORBOX_START + 1 )
|
#define RID_ERR_INVALID_FORM_CONNECTION ( RID_ERRORBOX_START + 1 )
|
||||||
|
@ -75,9 +69,6 @@
|
||||||
#if RID_DIALOG_END > RID_DBP_END
|
#if RID_DIALOG_END > RID_DBP_END
|
||||||
#error "please adjust the resource id ranges!!"
|
#error "please adjust the resource id ranges!!"
|
||||||
#endif
|
#endif
|
||||||
#if RID_PAGE_END > RID_DBP_END
|
|
||||||
#error "please adjust the resource id ranges!!"
|
|
||||||
#endif
|
|
||||||
#if RID_ERRORBOX_END > RID_DBP_END
|
#if RID_ERRORBOX_END > RID_DBP_END
|
||||||
#error "please adjust the resource id ranges!!"
|
#error "please adjust the resource id ranges!!"
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,24 +76,9 @@
|
||||||
// local ids
|
// local ids
|
||||||
|
|
||||||
// FixedLine
|
// FixedLine
|
||||||
#define FL_DATABASEFIELD_EXPL 4
|
|
||||||
#define FL_FRAME 6
|
#define FL_FRAME 6
|
||||||
#define FL_FORMSETINGS 7
|
#define FL_FORMSETINGS 7
|
||||||
|
|
||||||
// FixedText
|
|
||||||
|
|
||||||
#define FT_DATABASEFIELD_EXPL 8
|
|
||||||
#define FT_DATABASEFIELD_QUEST 9
|
|
||||||
|
|
||||||
// ListBox
|
|
||||||
|
|
||||||
#define LB_STOREINFIELD 4
|
|
||||||
|
|
||||||
// RadioButton
|
|
||||||
|
|
||||||
#define RB_STOREINFIELD_YES 3
|
|
||||||
#define RB_STOREINFIELD_NO 4
|
|
||||||
|
|
||||||
// Image
|
// Image
|
||||||
|
|
||||||
#define IMG_TABLE ( RID_DIALOG_START + 1 )
|
#define IMG_TABLE ( RID_DIALOG_START + 1 )
|
||||||
|
|
111
extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui
Normal file
111
extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.16.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.0"/>
|
||||||
|
<object class="GtkBox" id="OptionDBField">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="explLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="wrap">True</property>
|
||||||
|
<property name="max_width_chars">82</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="label" translatable="yes">Do you want to save the value in a database field?</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid1">
|
||||||
|
<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="GtkRadioButton" id="yesRadiobutton">
|
||||||
|
<property name="label" translatable="yes">_Yes, I want to save it in the following database field:</property>
|
||||||
|
<property name="use_action_appearance">False</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="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<property name="group">noRadiobutton</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="GtkRadioButton" id="noRadiobutton">
|
||||||
|
<property name="label" translatable="yes">_No, I only want to save the value in the form.</property>
|
||||||
|
<property name="use_action_appearance">False</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>
|
||||||
|
<property name="group">yesRadiobutton</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="GtkComboBox" id="storeInFieldCombobox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</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>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Loading…
Reference in a new issue