LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dbaui::OSQLMessageBox Class Reference

#include <sqlmessage.hxx>

Inheritance diagram for dbaui::OSQLMessageBox:
[legend]
Collaboration diagram for dbaui::OSQLMessageBox:
[legend]

Public Member Functions

 OSQLMessageBox (weld::Window *pParent, const dbtools::SQLExceptionInfo &_rException, MessBoxStyle _nStyle=MessBoxStyle::Ok|MessBoxStyle::DefaultOk, OUString _sHelpURL=OUString())
 display an SQLException with auto-recognizing a main and a detailed message More...
 
 OSQLMessageBox (weld::Window *pParent, const OUString &rTitle, const OUString &rMessage, MessBoxStyle nStyle=MessBoxStyle::Ok|MessBoxStyle::DefaultOk, MessageType _eType=Info, const ::dbtools::SQLExceptionInfo *_pAdditionalErrorInfo=nullptr)
 display a database related error message More...
 
void set_title (const OUString &rTitle)
 
void add_button (const OUString &rText, int nResponse, const OUString &rHelpId={})
 
void set_default_response (int nResponse)
 
virtual ~OSQLMessageBox () override
 
- Public Member Functions inherited from weld::DialogController
virtual DialoggetDialog ()=0
 
const DialoggetConstDialog () const
 
virtual short run ()
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OUString &rHelpId)
 
OUString get_help_id () const
 
void response (int nResponse)
 
virtual ~DialogController () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

virtual weld::DialoggetDialog () override
 
void Construct (weld::Window *pParent, MessBoxStyle nStyle, MessageType eImage)
 
 DECL_LINK (ButtonClickHdl, weld::Button &, void)
 
void impl_fillMessages ()
 
void impl_createStandardButtons (MessBoxStyle _nStyle)
 
void impl_addDetailsButton ()
 

Private Attributes

std::unique_ptr< weld::MessageDialogm_xDialog
 
std::unique_ptr< weld::Buttonm_xMoreButton
 
std::unique_ptr< SQLMessageBox_Implm_pImpl
 
OUString m_sHelpURL
 

Additional Inherited Members

- Static Public Member Functions inherited from weld::DialogController
static bool runAsync (const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
 

Detailed Description

Definition at line 74 of file sqlmessage.hxx.

Constructor & Destructor Documentation

◆ OSQLMessageBox() [1/2]

dbaui::OSQLMessageBox::OSQLMessageBox ( weld::Window pParent,
const dbtools::SQLExceptionInfo _rException,
MessBoxStyle  _nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk,
OUString  _sHelpURL = OUString() 
)

display an SQLException with auto-recognizing a main and a detailed message

The first two messages from the exception chain are used as main and detailed message (recognizing the detailed field of an <type scope="css::sdb">SQLContext</type>).

Definition at line 559 of file sqlmessage.cxx.

References dbaui::AUTO, Construct(), and m_pImpl.

◆ OSQLMessageBox() [2/2]

dbaui::OSQLMessageBox::OSQLMessageBox ( weld::Window pParent,
const OUString &  rTitle,
const OUString &  rMessage,
MessBoxStyle  nStyle = MessBoxStyle::Ok | MessBoxStyle::DefaultOk,
MessageType  _eType = Info,
const ::dbtools::SQLExceptionInfo _pAdditionalErrorInfo = nullptr 
)

display a database related error message

Parameters
rTitlethe title to display
rMessagethe detailed message to display
_eTypedetermines the image to use. AUTO is disallowed in this constructor version

Definition at line 566 of file sqlmessage.cxx.

References Construct(), eType, and m_pImpl.

◆ ~OSQLMessageBox()

dbaui::OSQLMessageBox::~OSQLMessageBox ( )
overridevirtual

Definition at line 579 of file sqlmessage.cxx.

Member Function Documentation

◆ add_button()

void dbaui::OSQLMessageBox::add_button ( const OUString &  rText,
int  nResponse,
const OUString &  rHelpId = {} 
)
inline

◆ Construct()

void dbaui::OSQLMessageBox::Construct ( weld::Window pParent,
MessBoxStyle  nStyle,
MessageType  eImage 
)
private

◆ DECL_LINK()

dbaui::OSQLMessageBox::DECL_LINK ( ButtonClickHdl  ,
weld::Button ,
void   
)
private

◆ getDialog()

virtual weld::Dialog * dbaui::OSQLMessageBox::getDialog ( )
inlineoverrideprivatevirtual

Implements weld::DialogController.

Definition at line 81 of file sqlmessage.hxx.

References m_xDialog.

◆ impl_addDetailsButton()

void dbaui::OSQLMessageBox::impl_addDetailsButton ( )
private

Definition at line 488 of file sqlmessage.cxx.

References GetStandardText(), LINK, m_pImpl, m_xDialog, and RET_MORE.

◆ impl_createStandardButtons()

void dbaui::OSQLMessageBox::impl_createStandardButtons ( MessBoxStyle  _nStyle)
private

◆ impl_fillMessages()

void dbaui::OSQLMessageBox::impl_fillMessages ( )
private

Definition at line 408 of file sqlmessage.cxx.

References m_pImpl, and m_xDialog.

◆ set_default_response()

void dbaui::OSQLMessageBox::set_default_response ( int  nResponse)
inline

Definition at line 110 of file sqlmessage.hxx.

References m_xDialog.

Referenced by dbaui::ORelationTableView::lookForUiActivities().

◆ set_title()

void dbaui::OSQLMessageBox::set_title ( const OUString &  rTitle)
inline

Definition at line 108 of file sqlmessage.hxx.

References m_xDialog.

Referenced by dbaui::ORelationTableView::lookForUiActivities().

Member Data Documentation

◆ m_pImpl

std::unique_ptr<SQLMessageBox_Impl> dbaui::OSQLMessageBox::m_pImpl
private

Definition at line 78 of file sqlmessage.hxx.

Referenced by OSQLMessageBox().

◆ m_sHelpURL

OUString dbaui::OSQLMessageBox::m_sHelpURL
private

Definition at line 79 of file sqlmessage.hxx.

◆ m_xDialog

std::unique_ptr<weld::MessageDialog> dbaui::OSQLMessageBox::m_xDialog
private

Definition at line 76 of file sqlmessage.hxx.

Referenced by getDialog(), set_default_response(), and set_title().

◆ m_xMoreButton

std::unique_ptr<weld::Button> dbaui::OSQLMessageBox::m_xMoreButton
private

Definition at line 77 of file sqlmessage.hxx.


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