LibreOffice Module reportdesign (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
rptui::Condition Class Reference

#include <Condition.hxx>

Collaboration diagram for rptui::Condition:
[legend]

Public Member Functions

 Condition (weld::Container *pParent, weld::Window *pDialog, IConditionalFormatAction &rAction, ::rptui::OReportController &rController)
 
 ~Condition ()
 
void setCondition (const css::uno::Reference< css::report::XFormatCondition > &_xCondition)
 sets the props at the control More...
 
void fillFormatCondition (const css::uno::Reference< css::report::XFormatCondition > &_xCondition)
 fills from the control _xCondition the destination More...
 
void updateToolbar (const css::uno::Reference< css::report::XReportControlFormat > &_xCondition)
 updates the toolbar _xCondition the destination More...
 
void setConditionIndex (size_t _nCondIndex, size_t _nCondCount)
 tells the condition its new index within the dialog's condition array More...
 
size_t getConditionIndex () const
 returns the condition's index within the dialog's condition array More...
 
bool isEmpty () const
 determines whether the condition is actually empty More...
 
void ApplyCommand (sal_uInt16 _nCommandId, const NamedColor &rNamedColor)
 forward to the parent class More...
 
::rptui::OReportControllergetController () const
 
css::uno::Reference< css::awt::XWindow > GetXWindow () const
 
void grab_focus ()
 
bool has_focus () const
 
Size get_preferred_size () const
 
weld::Widgetget_widget () const
 

Static Public Member Functions

static sal_uInt16 mapToolbarItemToSlotId (std::u16string_view rItemId)
 

Private Member Functions

void SetBackgroundDropdownClick ()
 
void SetForegroundDropdownClick ()
 
 DECL_LINK (OnFormatAction, const OUString &, void)
 
 DECL_LINK (OnConditionAction, weld::Button &, void)
 
void impl_layoutOperands ()
 
ConditionType impl_getCurrentConditionType () const
 
ComparisonOperation impl_getCurrentComparisonOperation () const
 
void impl_setCondition (const OUString &_rConditionFormula)
 
 DECL_LINK (OnTypeSelected, weld::ComboBox &, void)
 
 DECL_LINK (OnOperationSelected, weld::ComboBox &, void)
 

Private Attributes

std::shared_ptr< PaletteManagerm_xPaletteManager
 
ColorStatus m_aColorStatus
 
ConditionColorWrapper m_aBackColorWrapper
 
ConditionColorWrapper m_aForeColorWrapper
 
::rptui::OReportControllerm_rController
 
IConditionalFormatActionm_rAction
 
size_t m_nCondIndex
 
ConditionalExpressions m_aConditionalExpressions
 
SvxFontPrevWindow m_aPreview
 
weld::Windowm_pDialog
 
std::unique_ptr< weld::Builderm_xBuilder
 
std::unique_ptr< weld::Containerm_xContainer
 
std::unique_ptr< weld::Labelm_xHeader
 
std::unique_ptr< weld::ComboBoxm_xConditionType
 
std::unique_ptr< weld::ComboBoxm_xOperationList
 
std::unique_ptr< ConditionFieldm_xCondLHS
 
std::unique_ptr< weld::Labelm_xOperandGlue
 
std::unique_ptr< ConditionFieldm_xCondRHS
 
std::unique_ptr< weld::Toolbarm_xActions
 
std::unique_ptr< weld::CustomWeldm_xPreview
 
std::unique_ptr< weld::Buttonm_xMoveUp
 
std::unique_ptr< weld::Buttonm_xMoveDown
 
std::unique_ptr< weld::Buttonm_xAddCondition
 
std::unique_ptr< weld::Buttonm_xRemoveCondition
 
std::unique_ptr< ColorWindowm_xBackColorFloat
 
std::unique_ptr< ColorWindowm_xForeColorFloat
 

Detailed Description

Definition at line 70 of file Condition.hxx.

Constructor & Destructor Documentation

◆ Condition()

rptui::Condition::Condition ( weld::Container pParent,
weld::Window pDialog,
IConditionalFormatAction rAction,
::rptui::OReportController rController 
)

◆ ~Condition()

rptui::Condition::~Condition ( )

Definition at line 148 of file Condition.cxx.

Member Function Documentation

◆ ApplyCommand()

void rptui::Condition::ApplyCommand ( sal_uInt16  _nCommandId,
const NamedColor rNamedColor 
)

forward to the parent class

Definition at line 201 of file Condition.cxx.

References rptui::IConditionalFormatAction::applyCommand(), NamedColor::m_aColor, m_nCondIndex, and m_rAction.

Referenced by rptui::ConditionColorWrapper::operator()().

◆ DECL_LINK() [1/4]

rptui::Condition::DECL_LINK ( OnConditionAction  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [2/4]

rptui::Condition::DECL_LINK ( OnFormatAction  ,
const OUString &  ,
void   
)
private

◆ DECL_LINK() [3/4]

rptui::Condition::DECL_LINK ( OnOperationSelected  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [4/4]

rptui::Condition::DECL_LINK ( OnTypeSelected  ,
weld::ComboBox ,
void   
)
private

◆ fillFormatCondition()

void rptui::Condition::fillFormatCondition ( const css::uno::Reference< css::report::XFormatCondition > &  _xCondition)

◆ get_preferred_size()

Size rptui::Condition::get_preferred_size ( ) const
inline

Definition at line 150 of file Condition.hxx.

References m_xContainer.

◆ get_widget()

weld::Widget * rptui::Condition::get_widget ( ) const
inline

Definition at line 151 of file Condition.hxx.

References m_xContainer.

◆ getConditionIndex()

size_t rptui::Condition::getConditionIndex ( ) const
inline

returns the condition's index within the dialog's condition array

Definition at line 132 of file Condition.hxx.

References m_nCondIndex.

◆ getController()

::rptui::OReportController & rptui::Condition::getController ( ) const
inline

Definition at line 142 of file Condition.hxx.

References m_rController.

◆ GetXWindow()

css::uno::Reference< css::awt::XWindow > rptui::Condition::GetXWindow ( ) const
inline

Definition at line 146 of file Condition.hxx.

References weld::Window::GetXWindow(), and m_pDialog.

◆ grab_focus()

void rptui::Condition::grab_focus ( )
inline

Definition at line 148 of file Condition.hxx.

References m_xContainer.

◆ has_focus()

bool rptui::Condition::has_focus ( ) const
inline

Definition at line 149 of file Condition.hxx.

References m_xContainer.

◆ impl_getCurrentComparisonOperation()

ComparisonOperation rptui::Condition::impl_getCurrentComparisonOperation ( ) const
inlineprivate

Definition at line 174 of file Condition.hxx.

References m_xOperationList.

Referenced by fillFormatCondition(), and impl_layoutOperands().

◆ impl_getCurrentConditionType()

ConditionType rptui::Condition::impl_getCurrentConditionType ( ) const
inlineprivate

Definition at line 169 of file Condition.hxx.

References m_xConditionType.

Referenced by fillFormatCondition(), and impl_layoutOperands().

◆ impl_layoutOperands()

void rptui::Condition::impl_layoutOperands ( )
private

◆ impl_setCondition()

void rptui::Condition::impl_setCondition ( const OUString &  _rConditionFormula)
private

◆ isEmpty()

bool rptui::Condition::isEmpty ( ) const

determines whether the condition is actually empty

Definition at line 371 of file Condition.cxx.

References m_xCondLHS.

◆ mapToolbarItemToSlotId()

sal_uInt16 rptui::Condition::mapToolbarItemToSlotId ( std::u16string_view  rItemId)
static

Definition at line 131 of file Condition.cxx.

References u.

Referenced by updateToolbar().

◆ SetBackgroundDropdownClick()

void rptui::Condition::SetBackgroundDropdownClick ( )
private

Definition at line 152 of file Condition.cxx.

References m_aBackColorWrapper, m_aColorStatus, m_xActions, m_xBackColorFloat, and m_xPaletteManager.

Referenced by Condition().

◆ setCondition()

void rptui::Condition::setCondition ( const css::uno::Reference< css::report::XFormatCondition > &  _xCondition)

sets the props at the control

Parameters
_xConditionthe source

Definition at line 284 of file Condition.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, impl_setCondition(), and updateToolbar().

◆ setConditionIndex()

void rptui::Condition::setConditionIndex ( size_t  _nCondIndex,
size_t  _nCondCount 
)

tells the condition its new index within the dialog's condition array

Definition at line 359 of file Condition.cxx.

References m_nCondIndex, m_xHeader, m_xMoveDown, m_xMoveUp, and RptResId().

◆ SetForegroundDropdownClick()

void rptui::Condition::SetForegroundDropdownClick ( )
private

Definition at line 167 of file Condition.cxx.

References m_aColorStatus, m_aForeColorWrapper, m_xActions, m_xForeColorFloat, and m_xPaletteManager.

Referenced by Condition().

◆ updateToolbar()

void rptui::Condition::updateToolbar ( const css::uno::Reference< css::report::XReportControlFormat > &  _xCondition)

Member Data Documentation

◆ m_aBackColorWrapper

ConditionColorWrapper rptui::Condition::m_aBackColorWrapper
private

Definition at line 74 of file Condition.hxx.

Referenced by SetBackgroundDropdownClick().

◆ m_aColorStatus

ColorStatus rptui::Condition::m_aColorStatus
private

Definition at line 73 of file Condition.hxx.

Referenced by SetBackgroundDropdownClick(), and SetForegroundDropdownClick().

◆ m_aConditionalExpressions

ConditionalExpressions rptui::Condition::m_aConditionalExpressions
private

Definition at line 82 of file Condition.hxx.

Referenced by Condition(), fillFormatCondition(), and impl_setCondition().

◆ m_aForeColorWrapper

ConditionColorWrapper rptui::Condition::m_aForeColorWrapper
private

Definition at line 75 of file Condition.hxx.

Referenced by SetForegroundDropdownClick().

◆ m_aPreview

SvxFontPrevWindow rptui::Condition::m_aPreview
private

Definition at line 84 of file Condition.hxx.

Referenced by updateToolbar().

◆ m_nCondIndex

size_t rptui::Condition::m_nCondIndex
private

Definition at line 80 of file Condition.hxx.

Referenced by ApplyCommand(), getConditionIndex(), and setConditionIndex().

◆ m_pDialog

weld::Window* rptui::Condition::m_pDialog
private

Definition at line 85 of file Condition.hxx.

Referenced by GetXWindow().

◆ m_rAction

IConditionalFormatAction& rptui::Condition::m_rAction
private

Definition at line 78 of file Condition.hxx.

Referenced by ApplyCommand(), fillFormatCondition(), and impl_setCondition().

◆ m_rController

::rptui::OReportController& rptui::Condition::m_rController
private

Definition at line 77 of file Condition.hxx.

Referenced by getController().

◆ m_xActions

std::unique_ptr<weld::Toolbar> rptui::Condition::m_xActions
private

◆ m_xAddCondition

std::unique_ptr<weld::Button> rptui::Condition::m_xAddCondition
private

Definition at line 98 of file Condition.hxx.

Referenced by Condition().

◆ m_xBackColorFloat

std::unique_ptr<ColorWindow> rptui::Condition::m_xBackColorFloat
private

Definition at line 100 of file Condition.hxx.

Referenced by SetBackgroundDropdownClick().

◆ m_xBuilder

std::unique_ptr<weld::Builder> rptui::Condition::m_xBuilder
private

Definition at line 86 of file Condition.hxx.

Referenced by Condition().

◆ m_xConditionType

std::unique_ptr<weld::ComboBox> rptui::Condition::m_xConditionType
private

Definition at line 89 of file Condition.hxx.

Referenced by Condition(), impl_getCurrentConditionType(), and impl_setCondition().

◆ m_xCondLHS

std::unique_ptr<ConditionField> rptui::Condition::m_xCondLHS
private

Definition at line 91 of file Condition.hxx.

Referenced by Condition(), fillFormatCondition(), impl_setCondition(), and isEmpty().

◆ m_xCondRHS

std::unique_ptr<ConditionField> rptui::Condition::m_xCondRHS
private

◆ m_xContainer

std::unique_ptr<weld::Container> rptui::Condition::m_xContainer
private

Definition at line 87 of file Condition.hxx.

Referenced by Condition(), get_preferred_size(), get_widget(), grab_focus(), and has_focus().

◆ m_xForeColorFloat

std::unique_ptr<ColorWindow> rptui::Condition::m_xForeColorFloat
private

Definition at line 101 of file Condition.hxx.

Referenced by SetForegroundDropdownClick().

◆ m_xHeader

std::unique_ptr<weld::Label> rptui::Condition::m_xHeader
private

Definition at line 88 of file Condition.hxx.

Referenced by setConditionIndex().

◆ m_xMoveDown

std::unique_ptr<weld::Button> rptui::Condition::m_xMoveDown
private

Definition at line 97 of file Condition.hxx.

Referenced by Condition(), and setConditionIndex().

◆ m_xMoveUp

std::unique_ptr<weld::Button> rptui::Condition::m_xMoveUp
private

Definition at line 96 of file Condition.hxx.

Referenced by Condition(), and setConditionIndex().

◆ m_xOperandGlue

std::unique_ptr<weld::Label> rptui::Condition::m_xOperandGlue
private

Definition at line 92 of file Condition.hxx.

Referenced by impl_layoutOperands().

◆ m_xOperationList

std::unique_ptr<weld::ComboBox> rptui::Condition::m_xOperationList
private

◆ m_xPaletteManager

std::shared_ptr<PaletteManager> rptui::Condition::m_xPaletteManager
private

Definition at line 72 of file Condition.hxx.

Referenced by SetBackgroundDropdownClick(), and SetForegroundDropdownClick().

◆ m_xPreview

std::unique_ptr<weld::CustomWeld> rptui::Condition::m_xPreview
private

Definition at line 95 of file Condition.hxx.

◆ m_xRemoveCondition

std::unique_ptr<weld::Button> rptui::Condition::m_xRemoveCondition
private

Definition at line 99 of file Condition.hxx.

Referenced by Condition().


The documentation for this class was generated from the following files: