Ticket 122 - Añadir un boton de expandir todo y encoger todo cuando de agrupas las vistas

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@800 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-12-09 17:57:36 +00:00
parent 14bd15f14b
commit 01ece99d9c
6 changed files with 108 additions and 40 deletions

View File

@ -59,30 +59,30 @@
<DelphiCompile Include="GUIBase.dpk"> <DelphiCompile Include="GUIBase.dpk">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="..\Modulos\Facturas de cliente\Base.dcp" /> <DCCReference Include="..\Servidor\Base.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\cxLibraryD11.dcp" /> <DCCReference Include="..\Servidor\cxLibraryD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\cxTreeListD11.dcp" /> <DCCReference Include="..\Servidor\cxTreeListD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dbrtl.dcp" /> <DCCReference Include="..\Servidor\dbrtl.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxBarD11.dcp" /> <DCCReference Include="..\Servidor\dxBarD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxBarExtItemsD11.dcp" /> <DCCReference Include="..\Servidor\dxBarExtItemsD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxComnD11.dcp" /> <DCCReference Include="..\Servidor\dxComnD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxGDIPlusD11.dcp" /> <DCCReference Include="..\Servidor\dxGDIPlusD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxLayoutControlD11.dcp" /> <DCCReference Include="..\Servidor\dxLayoutControlD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxPSCoreD11.dcp" /> <DCCReference Include="..\Servidor\dxPSCoreD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxPScxCommonD11.dcp" /> <DCCReference Include="..\Servidor\dxPScxCommonD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxPScxGrid6LnkD11.dcp" /> <DCCReference Include="..\Servidor\dxPScxGrid6LnkD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxPsPrVwAdvD11.dcp" /> <DCCReference Include="..\Servidor\dxPsPrVwAdvD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\dxThemeD11.dcp" /> <DCCReference Include="..\Servidor\dxThemeD11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\frx11.dcp" /> <DCCReference Include="..\Servidor\frx11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\frxe11.dcp" /> <DCCReference Include="..\Servidor\frxe11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\fs11.dcp" /> <DCCReference Include="..\Servidor\fs11.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\JvAppFrmD11R.dcp" /> <DCCReference Include="..\Servidor\JvAppFrmD11R.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\JvCtrlsD11R.dcp" /> <DCCReference Include="..\Servidor\JvCtrlsD11R.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\rtl.dcp" /> <DCCReference Include="..\Servidor\rtl.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\vcl.dcp" /> <DCCReference Include="..\Servidor\vcl.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\vcldb.dcp" /> <DCCReference Include="..\Servidor\vcldb.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\vcljpg.dcp" /> <DCCReference Include="..\Servidor\vcljpg.dcp" />
<DCCReference Include="..\Modulos\Facturas de cliente\vclx.dcp" /> <DCCReference Include="..\Servidor\vclx.dcp" />
<DCCReference Include="uDialogBase.pas"> <DCCReference Include="uDialogBase.pas">
<Form>fDialogBase</Form> <Form>fDialogBase</Form>
</DCCReference> </DCCReference>

View File

@ -3,34 +3,34 @@ inherited fEditorGridBase: TfEditorGridBase
Top = 354 Top = 354
Caption = 'fEditorGridBase' Caption = 'fEditorGridBase'
ClientHeight = 504 ClientHeight = 504
ClientWidth = 706 ClientWidth = 837
OnDestroy = CustomEditorDestroy OnDestroy = CustomEditorDestroy
ExplicitWidth = 714 ExplicitWidth = 845
ExplicitHeight = 538 ExplicitHeight = 538
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
inherited JvNavPanelHeader: TJvNavPanelHeader inherited JvNavPanelHeader: TJvNavPanelHeader
Top = 0 Top = 0
Width = 706 Width = 837
ExplicitTop = 0 ExplicitTop = 0
ExplicitWidth = 706 ExplicitWidth = 837
inherited Image1: TImage inherited Image1: TImage
Left = 679 Left = 810
ExplicitLeft = 518 ExplicitLeft = 518
end end
end end
inherited TBXDock: TTBXDock inherited TBXDock: TTBXDock
Top = 27 Top = 27
Width = 706 Width = 837
Height = 75 Height = 75
ExplicitTop = 27 ExplicitTop = 27
ExplicitWidth = 706 ExplicitWidth = 837
ExplicitHeight = 75 ExplicitHeight = 75
inherited tbxMain: TTBXToolbar inherited tbxMain: TTBXToolbar
DockPos = 0 DockPos = 0
DragHandleStyle = dhDouble DragHandleStyle = dhDouble
TabOrder = 1 TabOrder = 1
ExplicitWidth = 600 ExplicitWidth = 705
inherited TBXItem29: TTBXItem inherited TBXItem29: TTBXItem
Visible = False Visible = False
end end
@ -69,6 +69,12 @@ inherited fEditorGridBase: TfEditorGridBase
Action = actAnchoAuto Action = actAnchoAuto
DisplayMode = nbdmImageAndText DisplayMode = nbdmImageAndText
end end
object TBXItem939: TTBXItem [20]
Action = actContraer
end
object TBXItem938: TTBXItem [21]
Action = actExpandir
end
inherited TBXItem28: TTBXItem inherited TBXItem28: TTBXItem
Visible = False Visible = False
end end
@ -111,7 +117,7 @@ inherited fEditorGridBase: TfEditorGridBase
inherited tbxMenu: TTBXToolbar inherited tbxMenu: TTBXToolbar
TabOrder = 2 TabOrder = 2
Visible = False Visible = False
ExplicitWidth = 706 ExplicitWidth = 837
inherited TBXSubmenuItem4: TTBXSubmenuItem inherited TBXSubmenuItem4: TTBXSubmenuItem
inherited TBXItem30: TTBXItem inherited TBXItem30: TTBXItem
Visible = False Visible = False
@ -173,9 +179,9 @@ inherited fEditorGridBase: TfEditorGridBase
end end
inherited StatusBar: TJvStatusBar inherited StatusBar: TJvStatusBar
Top = 485 Top = 485
Width = 706 Width = 837
ExplicitTop = 485 ExplicitTop = 485
ExplicitWidth = 706 ExplicitWidth = 837
end end
inherited EditorActionList: TActionList inherited EditorActionList: TActionList
Left = 64 Left = 64
@ -234,9 +240,20 @@ inherited fEditorGridBase: TfEditorGridBase
OnExecute = actExportarExcelExecute OnExecute = actExportarExcelExecute
OnUpdate = actExportarExcelUpdate OnUpdate = actExportarExcelUpdate
end end
object actExpandir: TAction
Category = 'Ver'
Caption = 'Expandir'
OnExecute = actExpandirExecute
OnUpdate = actExpandirUpdate
end
object actContraer: TAction
Category = 'Ver'
Caption = 'Contraer'
OnExecute = actContraerExecute
OnUpdate = actContraerUpdate
end
end end
inherited SmallImages: TPngImageList inherited SmallImages: TPngImageList
ShareImages = False
PngImages = < PngImages = <
item item
PngImage.Data = { PngImage.Data = {

View File

@ -63,6 +63,10 @@ type
TBXSeparatorItem172: TTBXSeparatorItem; TBXSeparatorItem172: TTBXSeparatorItem;
TBXItem395: TTBXItem; TBXItem395: TTBXItem;
TBXItem384: TTBXItem; TBXItem384: TTBXItem;
actExpandir: TAction;
actContraer: TAction;
TBXItem938: TTBXItem;
TBXItem939: TTBXItem;
procedure tbxEditFiltroChange(Sender: TObject; const Text: String); procedure tbxEditFiltroChange(Sender: TObject; const Text: String);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure actQuitarFiltroExecute(Sender: TObject); procedure actQuitarFiltroExecute(Sender: TObject);
@ -77,6 +81,10 @@ type
procedure CustomEditorDestroy(Sender: TObject); procedure CustomEditorDestroy(Sender: TObject);
procedure actExportarExcelUpdate(Sender: TObject); procedure actExportarExcelUpdate(Sender: TObject);
procedure actExportarExcelExecute(Sender: TObject); procedure actExportarExcelExecute(Sender: TObject);
procedure actExpandirExecute(Sender: TObject);
procedure actContraerExecute(Sender: TObject);
procedure actExpandirUpdate(Sender: TObject);
procedure actContraerUpdate(Sender: TObject);
protected protected
FViewGrid : IViewGridBase; FViewGrid : IViewGridBase;
procedure SetViewGrid(const Value : IViewGridBase); virtual; procedure SetViewGrid(const Value : IViewGridBase); virtual;
@ -173,6 +181,9 @@ begin
begin begin
ViewGrid.ShowEmbedded(Self); ViewGrid.ShowEmbedded(Self);
ViewGrid.RestoreFromIniFile; ViewGrid.RestoreFromIniFile;
actExpandir.Visible := ViewGrid.AgrupacionesVisibles;
actContraer.Visible := ViewGrid.AgrupacionesVisibles;
end; end;
end; end;
@ -188,6 +199,19 @@ begin
(Sender as TAction).Enabled := False; (Sender as TAction).Enabled := False;
end; end;
procedure TfEditorGridBase.actExpandirExecute(Sender: TObject);
begin
inherited;
if Assigned(ViewGrid) then
ViewGrid.ExpandirTodo
end;
procedure TfEditorGridBase.actExpandirUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := Assigned(dsDataTable.DataTable) and Assigned(ViewGrid);
end;
procedure TfEditorGridBase.actExportarExcelExecute(Sender: TObject); procedure TfEditorGridBase.actExportarExcelExecute(Sender: TObject);
begin begin
inherited; inherited;
@ -291,6 +315,19 @@ begin
ViewGrid.AjustarAncho; ViewGrid.AjustarAncho;
end; end;
procedure TfEditorGridBase.actContraerExecute(Sender: TObject);
begin
inherited;
if Assigned(ViewGrid) then
ViewGrid.ContraerTodo
end;
procedure TfEditorGridBase.actContraerUpdate(Sender: TObject);
begin
inherited;
(Sender as TAction).Enabled := Assigned(dsDataTable.DataTable) and Assigned(ViewGrid);
end;
procedure TfEditorGridBase.actDuplicarUpdate(Sender: TObject); procedure TfEditorGridBase.actDuplicarUpdate(Sender: TObject);
begin begin
inherited; inherited;

View File

@ -189,7 +189,7 @@ inherited frViewGrid: TfrViewGrid
PrinterPage.ScaleMode = smFit PrinterPage.ScaleMode = smFit
PrinterPage._dxMeasurementUnits_ = 0 PrinterPage._dxMeasurementUnits_ = 0
PrinterPage._dxLastMU_ = 2 PrinterPage._dxLastMU_ = 2
ReportDocument.CreationDate = 39757.663359259260000000 ReportDocument.CreationDate = 39791.760840023150000000
StyleManager = dmBase.dxPrintStyleManager1 StyleManager = dmBase.dxPrintStyleManager1
OptionsCards.Shadow.Depth = 0 OptionsCards.Shadow.Depth = 0
OptionsExpanding.ExpandGroupRows = True OptionsExpanding.ExpandGroupRows = True

View File

@ -80,6 +80,7 @@ type
procedure OnChangeValoresFiltro(Sender: TObject); procedure OnChangeValoresFiltro(Sender: TObject);
procedure SetViewFiltros(const Value: IViewFiltroBase); override; procedure SetViewFiltros(const Value: IViewFiltroBase); override;
function AddFilterGrid(const Operacion: tcxFilterBoolOperatorKind): TcxFilterCriteriaItemList; function AddFilterGrid(const Operacion: tcxFilterBoolOperatorKind): TcxFilterCriteriaItemList;
function GetAgrupacionesVisibles: Boolean; override;
public public
function EsSeleccionCeldaDatos: Boolean; override; function EsSeleccionCeldaDatos: Boolean; override;
procedure Preview; override; procedure Preview; override;
@ -100,6 +101,11 @@ uses
} }
{ TfrViewGrid } { TfrViewGrid }
function TfrViewGrid.GetAgrupacionesVisibles: Boolean;
begin
Result := pnlAgrupaciones.Visible;
end;
function TfrViewGrid.GetFocusedView: TcxGridDBTableView; function TfrViewGrid.GetFocusedView: TcxGridDBTableView;
begin begin
Result := cxGridView; Result := cxGridView;

View File

@ -78,11 +78,14 @@ type
function esSeleccionCeldaDatos: Boolean; function esSeleccionCeldaDatos: Boolean;
function getNumSeleccionados: Integer; function getNumSeleccionados: Integer;
property NumSeleccionados: Integer read getNumSeleccionados; property NumSeleccionados: Integer read getNumSeleccionados;
function Locate(const AItemIndex: Integer; const AValue: String; function Locate(const AItemIndex: Integer; const AValue: String;
const APartialCompare: Boolean = False) : Boolean; const APartialCompare: Boolean = False) : Boolean;
function GetAgrupacionesVisibles: Boolean;
property AgrupacionesVisibles : Boolean read GetAgrupacionesVisibles;
end; end;
@ -132,7 +135,7 @@ type
procedure cxGridViewColumnSetStoredPropertyValue( procedure cxGridViewColumnSetStoredPropertyValue(
Sender: TcxCustomGridTableItem; const AName: string; Sender: TcxCustomGridTableItem; const AName: string;
const AValue: Variant); const AValue: Variant);
function GetAgrupacionesVisibles: Boolean; virtual;
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;
@ -179,7 +182,7 @@ type
property PopupMenu: TPopupMenu read GetPopupMenu write SetPopupMenu; property PopupMenu: TPopupMenu read GetPopupMenu write SetPopupMenu;
property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect; property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
property NumSeleccionados: Integer read getNumSeleccionados; property NumSeleccionados: Integer read getNumSeleccionados;
property AgrupacionesVisibles : Boolean read GetAgrupacionesVisibles;
end; end;
procedure Register; procedure Register;
@ -321,6 +324,11 @@ begin
ExportToExcel(AFileName); ExportToExcel(AFileName);
end; end;
function TfrViewGridBase.GetAgrupacionesVisibles: Boolean;
begin
Result := False;
end;
function TfrViewGridBase.GetDblClick: TNotifyEvent; function TfrViewGridBase.GetDblClick: TNotifyEvent;
begin begin
Result := FOnDblClick; Result := FOnDblClick;