Kaydet (Commit) bf6a770d authored tarafından sk94's avatar sk94 Kaydeden (comit) Caolán McNamara

DLG_INDEXDESIGN conversion to .ui

Change-Id: I84d6531a73e6e726359bd20664b6299ad8a390ee
Reviewed-on: https://gerrit.libreoffice.org/9699Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst c83f56a1
......@@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/generalpagedialog \
dbaccess/uiconfig/ui/generalpagewizard \
dbaccess/uiconfig/ui/generatedvaluespage \
dbaccess/uiconfig/ui/indexdesigndialog \
dbaccess/uiconfig/ui/joindialog \
dbaccess/uiconfig/ui/password \
dbaccess/uiconfig/ui/queryfilterdialog \
......
/* -*- 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 .
*/
#ifndef _DBAUI_INDEXDIALOG_HRC_
#define _DBAUI_INDEXDIALOG_HRC_
#define CTR_INDEXLIST 1
#define CTR_FIELDS 2
#define FL_INDEXDETAILS 1
#define CB_UNIQUE 1
#define FT_FIELDS 1
#define FT_DESC_LABEL 2
#define FT_DESCRIPTION 3
#define TLB_ACTIONS 1
#define PB_CLOSE 1
#define HB_HELP 1
#endif // _DBAUI_INDEXDIALOG_HRC_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -18,140 +18,9 @@
*/
#include "dbu_dlg.hrc"
#include "indexdialog.hrc"
#include "browserids.hxx"
#include "dbaccess_helpid.hrc"
#define DIALOG_SIZE_X 220
#define DIALOG_SIZE_Y 140
#define BUTTON_SIZE_X 50
#define BUTTON_SIZE_Y 14
#define LIST_WIDTH 70
ModalDialog DLG_INDEXDESIGN
{
HelpID = "dbaccess:ModalDialog:DLG_INDEXDESIGN";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( DIALOG_SIZE_X , DIALOG_SIZE_Y ) ;
Text [ en-US ] = "Indexes" ;
Moveable = TRUE ;
Closeable = TRUE ;
ToolBox TLB_ACTIONS
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
ButtonType = BUTTON_SYMBOL;
Align = BOXALIGN_TOP;
HelpId = HID_INDEX_DIALOG_ACTION_TB;
Customize = FALSE;
ItemImageList = IMG_INDEX_DLG_SC ;
ItemList =
{
ToolBoxItem
{
Identifier = ID_INDEX_NEW;
HelpId = HID_DLGIDX_NEWINDEX;
Command = ".index:createNew";
Text [ en-US ] = "New Index" ;
};
ToolBoxItem
{
Identifier = ID_INDEX_DROP;
HelpId = HID_DLGIDX_DROPINDEX;
Command = ".index:dropCurrent";
Text [ en-US ] = "Delete Current Index" ;
};
ToolBoxItem
{
Identifier = ID_INDEX_RENAME;
HelpId = HID_DLGIDX_RENAMEINDEX;
Command = ".index:renameCurrent";
Text [ en-US ] = "Rename Current Index" ;
};
ToolBoxItem
{
Identifier = ID_INDEX_SAVE;
HelpId = HID_DLGIDX_SAVEINDEX;
Command = ".index:saveCurrent";
Text [ en-US ] = "Save Current Index" ;
};
ToolBoxItem
{
Identifier = ID_INDEX_RESET;
HelpId = HID_DLGIDX_RESETINDEX;
Command = ".index:resetCurrent";
Text [ en-US ] = "Reset Current Index" ;
};
};
};
Control CTR_INDEXLIST
{
Pos = MAP_APPFONT ( 6 , 23 ) ;
Size = MAP_APPFONT ( LIST_WIDTH , DIALOG_SIZE_Y - (BUTTON_SIZE_Y + 4) - 29 ) ;
SVLook = TRUE;
Border = TRUE;
HelpId = HID_DLGIDX_INDEXLIST;
TabStop = TRUE ;
};
FixedLine FL_INDEXDETAILS
{
Pos = MAP_APPFONT ( LIST_WIDTH + 16 - 3, 9 ) ;
Size = MAP_APPFONT ( DIALOG_SIZE_X - LIST_WIDTH - 22, 8 ) ;
Text [ en-US ] = "Index details";
};
FixedText FT_DESC_LABEL
{
Pos = MAP_APPFONT ( LIST_WIDTH + 16, 23 ) ;
Size = MAP_APPFONT ( 50, 8 ) ;
Text [ en-US ] = "Index identifier:";
};
FixedText FT_DESCRIPTION
{
Pos = MAP_APPFONT ( LIST_WIDTH + 69, 23 ) ;
Size = MAP_APPFONT ( DIALOG_SIZE_X - LIST_WIDTH - 75, 8 ) ;
};
CheckBox CB_UNIQUE
{
HelpID = "dbaccess:CheckBox:DLG_INDEXDESIGN:CB_UNIQUE";
Pos = MAP_APPFONT ( LIST_WIDTH + 16, 34 ) ;
Size = MAP_APPFONT ( DIALOG_SIZE_X - LIST_WIDTH - 22, 8 ) ;
SVLook = TRUE;
Text [ en-US ] = "~Unique";
};
FixedText FT_FIELDS
{
Pos = MAP_APPFONT ( LIST_WIDTH + 16, 48 ) ;
Size = MAP_APPFONT ( DIALOG_SIZE_X - LIST_WIDTH - 22, 8 ) ;
SVLook = TRUE;
Text [ en-US ] = "Fields";
};
Control CTR_FIELDS
{
Pos = MAP_APPFONT ( LIST_WIDTH + 16, 59 ) ;
Size = MAP_APPFONT ( DIALOG_SIZE_X - LIST_WIDTH - 22, DIALOG_SIZE_Y - (BUTTON_SIZE_Y + 4) - 65 ) ;
SVLook = TRUE;
Border = TRUE;
TabStop = TRUE ;
};
PushButton PB_CLOSE
{
HelpID = "dbaccess:PushButton:DLG_INDEXDESIGN:PB_CLOSE";
Pos = MAP_APPFONT ( DIALOG_SIZE_X - BUTTON_SIZE_X - 6 - BUTTON_SIZE_X - 6, DIALOG_SIZE_Y - BUTTON_SIZE_Y - 6 ) ;
Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y );
SVLook = TRUE;
DefButton = TRUE;
Text [ en-US ] = "~Close";
};
HelpButton HB_HELP
{
Pos = MAP_APPFONT ( DIALOG_SIZE_X - BUTTON_SIZE_X - 6, DIALOG_SIZE_Y - BUTTON_SIZE_Y - 6 ) ;
Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y );
};
};
String STR_TAB_INDEX_SORTORDER
{
......
......@@ -22,6 +22,7 @@
#include <osl/diagnose.h>
#include "dbaccess_helpid.hrc"
#include <vcl/settings.hxx>
#include <vcl/builder.hxx>
namespace dbaui
{
......@@ -89,19 +90,22 @@ namespace dbaui
}
// IndexFieldsControl
IndexFieldsControl::IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix)
:EditBrowseBox(_pParent, _rId, EBBF_SMART_TAB_TRAVEL | EBBF_ACTIVATE_ON_BUTTONDOWN, BROWSER_STANDARD_FLAGS)
IndexFieldsControl::IndexFieldsControl( Window* _pParent, WinBits nWinStyle)
:EditBrowseBox(_pParent, EBBF_SMART_TAB_TRAVEL | EBBF_ACTIVATE_ON_BUTTONDOWN, nWinStyle, BROWSER_STANDARD_FLAGS)
,m_aSeekRow(m_aFields.end())
,m_pSortingCell(NULL)
,m_pFieldNameCell(NULL)
,m_nMaxColumnsInIndex(_nMaxColumnsInIndex)
,m_bAddIndexAppendix(_bAddIndexAppendix)
{
SetUniqueId( UID_DLGINDEX_INDEXDETAILS_BACK );
GetDataWindow().SetUniqueId( UID_DLGINDEX_INDEXDETAILS_MAIN );
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeDbaIndexFieldsControl(Window *pParent, VclBuilder::stringmap &)
{
return new IndexFieldsControl (pParent, WB_BORDER | WB_NOTABSTOP);
}
IndexFieldsControl::~IndexFieldsControl()
{
delete m_pSortingCell;
......@@ -204,8 +208,11 @@ namespace dbaui
return EditBrowseBox::GetTotalCellWidth(_nRow, _nColId);
}
void IndexFieldsControl::Init(const Sequence< OUString >& _rAvailableFields)
void IndexFieldsControl::Init(const Sequence< OUString >& _rAvailableFields, sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix)
{
m_nMaxColumnsInIndex = _nMaxColumnsInIndex;
m_bAddIndexAppendix = _bAddIndexAppendix;
RemoveColumns();
// for the width: both columns together should be somewhat smaller than the whole window (without the scrollbar)
......
......@@ -48,7 +48,7 @@ namespace dbaui
bool m_bSuspendSelectHdl;
public:
DbaIndexList(Window* _pParent, const ResId& _rId);
DbaIndexList(Window* _pParent, WinBits nWinBits);
void SetSelectHdl(const Link& _rHdl) { m_aSelectHdl = _rHdl; }
Link GetSelectHdl() const { return m_aSelectHdl; }
......@@ -85,16 +85,15 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
SvtViewOptions m_aGeometrySettings;
ToolBox m_aActions;
DbaIndexList m_aIndexes;
FixedLine m_aIndexDetails;
FixedText m_aDescriptionLabel;
FixedText m_aDescription;
CheckBox m_aUnique;
FixedText m_aFieldsLabel;
IndexFieldsControl* m_pFields;
PushButton m_aClose;
HelpButton m_aHelp;
ToolBox *m_pActions;
DbaIndexList *m_pIndexList;
FixedText *m_pIndexDetails;
FixedText *m_pDescriptionLabel;
FixedText *m_pDescription;
CheckBox *m_pUnique;
FixedText *m_pFieldsLabel;
IndexFieldsControl *m_pFields;
PushButton *m_pClose;
OIndexCollection* m_pIndexes;
SvTreeListEntry* m_pPreviousSelection;
......
......@@ -50,10 +50,10 @@ namespace dbaui
bool m_bAddIndexAppendix;
public:
IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix);
IndexFieldsControl( Window* _pParent, WinBits nWinStyle);
virtual ~IndexFieldsControl();
void Init(const ::com::sun::star::uno::Sequence< OUString >& _rAvailableFields);
void Init(const ::com::sun::star::uno::Sequence< OUString >& _rAvailableFields, sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix);
void initializeFrom(const IndexFields& _rFields);
void commitTo(IndexFields& _rFields);
......
This diff is collapsed.
......@@ -687,6 +687,13 @@
generic-name="OTableTreeListBox" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="IndexFieldsControl" name="dbulo-DbaIndexFieldsControl"
generic-name="IndexFieldsControl" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="DbaIndexList" name="dbulo-DbaIndexList"
generic-name="DbaIndexList" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Recent Documents View" name="sfxlo-RecentDocsView"
generic-name="Icon View" parent="GtkIconView"
icon-name="widget-gtk-iconview"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment