diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-12 11:04:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-12 14:18:49 +0200 |
commit | a974e067f1045be3990ec7f49b21e2eb10d689d8 (patch) | |
tree | 9371960403e469f57b0c7ce9e7d30cb4065d978e /dbaccess/source/ui/dlg/dbfindex.hxx | |
parent | 4e4c8a71756da952686cdd682c6132413959dc21 (diff) |
weld ODbaseIndexDialog
Change-Id: I5cf97cc9f0b7123675bd2dbeb472419ffda9a459
Reviewed-on: https://gerrit.libreoffice.org/61708
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/dlg/dbfindex.hxx')
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.hxx | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index dbfabbf5594a..cd086c89b139 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -20,12 +20,7 @@ #ifndef INCLUDED_DBACCESS_SOURCE_UI_DLG_DBFINDEX_HXX #define INCLUDED_DBACCESS_SOURCE_UI_DLG_DBFINDEX_HXX -#include <vcl/dialog.hxx> -#include <vcl/button.hxx> -#include <vcl/combobox.hxx> -#include <vcl/layout.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/fixed.hxx> +#include <vcl/weld.hxx> #include <list> namespace dbaui @@ -67,49 +62,48 @@ public: typedef std::list< OTableInfo > TableInfoList; // IndexDialog -class ODbaseIndexDialog : public ModalDialog +class ODbaseIndexDialog : public weld::GenericDialogController { protected: - VclPtr<OKButton> m_pPB_OK; - VclPtr<ComboBox> m_pCB_Tables; - VclPtr<VclContainer> m_pIndexes; - VclPtr<ListBox> m_pLB_TableIndexes; - VclPtr<ListBox> m_pLB_FreeIndexes; - - VclPtr<PushButton> m_pAdd; - VclPtr<PushButton> m_pRemove; - VclPtr<PushButton> m_pAddAll; - VclPtr<PushButton> m_pRemoveAll; - - DECL_LINK( TableSelectHdl, ComboBox&, void ); - DECL_LINK( AddClickHdl, Button*, void ); - DECL_LINK( RemoveClickHdl, Button*, void ); - DECL_LINK( AddAllClickHdl, Button*, void ); - DECL_LINK( RemoveAllClickHdl, Button*, void ); - DECL_LINK( OKClickHdl, Button*, void ); - DECL_LINK( OnListEntrySelected, ListBox&, void ); - OUString m_aDSN; TableInfoList m_aTableInfoList; TableIndexList m_aFreeIndexList; + std::unique_ptr<weld::Button> m_xPB_OK; + std::unique_ptr<weld::ComboBox> m_xCB_Tables; + std::unique_ptr<weld::Widget> m_xIndexes; + std::unique_ptr<weld::TreeView> m_xLB_TableIndexes; + std::unique_ptr<weld::TreeView> m_xLB_FreeIndexes; + + std::unique_ptr<weld::Button> m_xAdd; + std::unique_ptr<weld::Button> m_xRemove; + std::unique_ptr<weld::Button> m_xAddAll; + std::unique_ptr<weld::Button> m_xRemoveAll; + + DECL_LINK( TableSelectHdl, weld::ComboBox&, void ); + DECL_LINK( AddClickHdl, weld::Button&, void ); + DECL_LINK( RemoveClickHdl, weld::Button&, void ); + DECL_LINK( AddAllClickHdl, weld::Button&, void ); + DECL_LINK( RemoveAllClickHdl, weld::Button&, void ); + DECL_LINK( OKClickHdl, weld::Button&, void ); + DECL_LINK( OnListEntrySelected, weld::TreeView&, void ); + void Init(); void SetCtrls(); - static OTableIndex implRemoveIndex(const OUString& _rName, TableIndexList& _rList, ListBox& _rDisplay, bool _bMustExist); - static void implInsertIndex(const OTableIndex& _rIndex, TableIndexList& _rList, ListBox& _rDisplay); + static OTableIndex implRemoveIndex(const OUString& _rName, TableIndexList& _rList, weld::TreeView& _rDisplay, bool _bMustExist); + static void implInsertIndex(const OTableIndex& _rIndex, TableIndexList& _rList, weld::TreeView& _rDisplay); - OTableIndex RemoveFreeIndex( const OUString& _rName, bool _bMustExist ) { return implRemoveIndex(_rName, m_aFreeIndexList, *m_pLB_FreeIndexes, _bMustExist); } - void InsertFreeIndex( const OTableIndex& _rIndex ) { implInsertIndex(_rIndex, m_aFreeIndexList, *m_pLB_FreeIndexes); } + OTableIndex RemoveFreeIndex( const OUString& _rName, bool _bMustExist ) { return implRemoveIndex(_rName, m_aFreeIndexList, *m_xLB_FreeIndexes, _bMustExist); } + void InsertFreeIndex( const OTableIndex& _rIndex ) { implInsertIndex(_rIndex, m_aFreeIndexList, *m_xLB_FreeIndexes); } OTableIndex RemoveTableIndex( const OUString& _rTableName, const OUString& _rIndexName ); void InsertTableIndex( const OUString& _rTableName, const OTableIndex& _rIndex ); void checkButtons(); public: - ODbaseIndexDialog( vcl::Window * pParent, const OUString& aDataSrcName ); + ODbaseIndexDialog(weld::Window * pParent, const OUString& rDataSrcName); virtual ~ODbaseIndexDialog() override; - virtual void dispose() override; }; } // namespace dbaui |