33 : m_xBuilder(
Application::CreateBuilder(pParent,
"dbaccess/ui/mysqlnativesettings.ui"))
34 ,
m_xContainer(m_xBuilder->weld_widget(
"MysqlNativeSettings"))
35 , m_xDatabaseNameLabel(m_xBuilder->weld_label(
"dbnamelabel"))
36 , m_xDatabaseName(m_xBuilder->weld_entry(
"dbname"))
37 , m_xHostPortRadio(m_xBuilder->weld_radio_button(
"hostport"))
38 , m_xSocketRadio(m_xBuilder->weld_radio_button(
"socketlabel"))
39 , m_xNamedPipeRadio(m_xBuilder->weld_radio_button(
"namedpipelabel"))
40 , m_xHostNameLabel(m_xBuilder->weld_label(
"serverlabel"))
41 , m_xHostName(m_xBuilder->weld_entry(
"server"))
42 , m_xPortLabel(m_xBuilder->weld_label(
"portlabel"))
43 , m_xPort(m_xBuilder->weld_spin_button(
"port"))
44 , m_xDefaultPort(m_xBuilder->weld_label(
"defaultport"))
45 , m_xSocket(m_xBuilder->weld_entry(
"socket"))
46 , m_xNamedPipe(m_xBuilder->weld_entry(
"namedpipe"))
47 , m_aControlModificationLink(rControlModificationLink)
71 m_aControlModificationLink.Call(&rRadioButton);
73 const bool bHostPortRadio = m_xHostPortRadio->get_active();
74 m_xHostNameLabel->set_sensitive(bHostPortRadio);
75 m_xHostName->set_sensitive(bHostPortRadio);
76 m_xPortLabel->set_sensitive(bHostPortRadio);
77 m_xPort->set_sensitive(bHostPortRadio);
78 m_xDefaultPort->set_sensitive(bHostPortRadio);
80 m_xSocket->set_sensitive(m_xSocketRadio->get_active());
81 m_xNamedPipe->set_sensitive(m_xNamedPipeRadio->get_active());
86 m_aControlModificationLink.Call(&rEdit);
91 m_aControlModificationLink.Call(&rEdit);
115 bool bChangedSomething =
false;
126 return bChangedSomething;
132 bool bValid = !pInvalid || !pInvalid->
GetValue();
148 m_xPort->set_value( pPortNumber->GetValue() );
151 m_xSocket->set_text( pSocket->GetValue() );
166 const OUString& rSocketPipe( pSocketPipeItem->
GetValue() );
167 if (!rSocketPipe.isEmpty())
180 || (
m_xPort->get_text().isEmpty() )
const OUString & GetValue() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
std::unique_ptr< weld::SpinButton > m_xPort
std::unique_ptr< weld::Label > m_xDatabaseNameLabel
std::unique_ptr< weld::Widget > m_xContainer
std::unique_ptr< weld::RadioButton > m_xNamedPipeRadio
void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList)
MySQLNativeSettings(weld::Widget *pParent, const Link< weld::Widget *, void > &rControlModificationLink)
std::unique_ptr< weld::Entry > m_xDatabaseName
std::unique_ptr< weld::Entry > m_xHostName
std::unique_ptr< weld::Label > m_xHostNameLabel
std::unique_ptr< weld::Entry > m_xSocket
std::unique_ptr< weld::Label > m_xPortLabel
std::unique_ptr< weld::Entry > m_xNamedPipe
bool FillItemSet(SfxItemSet *rCoreAttrs)
std::unique_ptr< weld::RadioButton > m_xHostPortRadio
std::unique_ptr< weld::RadioButton > m_xSocketRadio
void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList)
void implInitControls(const SfxItemSet &_rSet)
std::unique_ptr< weld::Label > m_xDefaultPort
static void fillString(SfxItemSet &_rSet, const weld::Entry *pEdit, TypedWhichId< SfxStringItem > _nID, bool &_bChangedSomething)
fills the String value into the item set when the value changed.
static void fillInt32(SfxItemSet &_rSet, const weld::SpinButton *pEdit, TypedWhichId< SfxInt32Item > _nID, bool &_bChangedSomething)
fills the int value into the item set when the value changed.
virtual void set_active(bool active)=0
#define DSID_DATABASENAME
#define DSID_INVALID_SELECTION
#define DSID_CONN_HOSTNAME
#define DSID_MYSQL_PORTNUMBER
#define LINK(Instance, Class, Member)
IMPL_LINK(OApplicationController, OnSelectContainer, void *, _pType, void)
Reference< XNameAccess > m_xContainer