KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIDIALOG Class Reference

Helper class to create more flexible dialogs, including 'do not show again' checkbox handling. More...

#include <confirm.h>

Inheritance diagram for KIDIALOG:

Public Types

enum  KD_TYPE {
  KD_NONE , KD_INFO , KD_QUESTION , KD_WARNING ,
  KD_ERROR
}
 < Dialog type. Selects appropriate icon and default dialog title More...
 

Public Member Functions

 KIDIALOG (wxWindow *aParent, const wxString &aMessage, const wxString &aCaption, long aStyle=wxOK)
 
 KIDIALOG (wxWindow *aParent, const wxString &aMessage, KD_TYPE aType, const wxString &aCaption="")
 
bool SetOKCancelLabels (const ButtonLabel &ok, const ButtonLabel &cancel) override
 Shows the 'do not show again' checkbox. More...
 
void DoNotShowCheckbox (wxString file, int line)
 Checks the 'do not show again' setting for the dialog. More...
 
bool DoNotShowAgain () const
 
void ForceShowAgain ()
 
bool Show (bool aShow=true) override
 
int ShowModal () override
 

Static Protected Member Functions

static wxString getCaption (KD_TYPE aType, const wxString &aCaption)
 
static long getStyle (KD_TYPE aType)
 

Protected Attributes

unsigned long m_hash
 
bool m_cancelMeansCancel
 

Detailed Description

Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.

Definition at line 46 of file confirm.h.

Member Enumeration Documentation

◆ KD_TYPE

< Dialog type. Selects appropriate icon and default dialog title

Enumerator
KD_NONE 
KD_INFO 
KD_QUESTION 
KD_WARNING 
KD_ERROR 

Definition at line 50 of file confirm.h.

Constructor & Destructor Documentation

◆ KIDIALOG() [1/2]

KIDIALOG::KIDIALOG ( wxWindow *  aParent,
const wxString &  aMessage,
const wxString &  aCaption,
long  aStyle = wxOK 
)

Definition at line 38 of file confirm.cpp.

◆ KIDIALOG() [2/2]

KIDIALOG::KIDIALOG ( wxWindow *  aParent,
const wxString &  aMessage,
KD_TYPE  aType,
const wxString &  aCaption = "" 
)

Definition at line 47 of file confirm.cpp.

Member Function Documentation

◆ DoNotShowAgain()

bool KIDIALOG::DoNotShowAgain ( ) const

◆ DoNotShowCheckbox()

◆ ForceShowAgain()

void KIDIALOG::ForceShowAgain ( )

Definition at line 70 of file confirm.cpp.

References doNotShowAgainDlgs, and m_hash.

◆ getCaption()

wxString KIDIALOG::getCaption ( KD_TYPE  aType,
const wxString &  aCaption 
)
staticprotected

Definition at line 120 of file confirm.cpp.

References _, KD_ERROR, KD_INFO, KD_NONE, KD_QUESTION, and KD_WARNING.

◆ getStyle()

long KIDIALOG::getStyle ( KD_TYPE  aType)
staticprotected

Definition at line 138 of file confirm.cpp.

References KD_ERROR, KD_INFO, KD_NONE, KD_QUESTION, and KD_WARNING.

◆ SetOKCancelLabels()

bool KIDIALOG::SetOKCancelLabels ( const ButtonLabel &  ok,
const ButtonLabel &  cancel 
)
inlineoverride

Shows the 'do not show again' checkbox.

Definition at line 57 of file confirm.h.

References cancel.

Referenced by DIALOG_TRACK_VIA_PROPERTIES::confirmPadChange(), and ZONE_FILLER::Fill().

◆ Show()

bool KIDIALOG::Show ( bool  aShow = true)
override

Definition at line 76 of file confirm.cpp.

References doNotShowAgainDlgs, m_cancelMeansCancel, and m_hash.

◆ ShowModal()

Member Data Documentation

◆ m_cancelMeansCancel

bool KIDIALOG::m_cancelMeansCancel
protected

Definition at line 80 of file confirm.h.

Referenced by Show(), and ShowModal().

◆ m_hash

unsigned long KIDIALOG::m_hash
protected

Definition at line 79 of file confirm.h.

Referenced by DoNotShowAgain(), DoNotShowCheckbox(), ForceShowAgain(), Show(), and ShowModal().


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