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 <kidialog.h>

Inheritance diagram for KIDIALOG:

Public Types

enum  KD_TYPE {
  KD_NONE , KD_INFO , KD_QUESTION , KD_WARNING ,
  KD_ERROR
}
 

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
 
void DoNotShowCheckbox (wxString file, int line)
 Shows the 'do not show again' checkbox.
 
bool DoNotShowAgain () const
 Checks the 'do not show again' setting for the dialog.
 
bool Show (bool aShow=true) override
 
int ShowModal () override
 

Static Public Member Functions

static void ClearDoNotShowAgainDialogs ()
 Dialog type. Selects appropriate icon and default dialog title.
 

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 41 of file kidialog.h.

Member Enumeration Documentation

◆ KD_TYPE

Enumerator
KD_NONE 
KD_INFO 
KD_QUESTION 
KD_WARNING 
KD_ERROR 

Definition at line 47 of file kidialog.h.

Constructor & Destructor Documentation

◆ KIDIALOG() [1/2]

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

Definition at line 33 of file kidialog.cpp.

References KIDIALOG_BASE, m_cancelMeansCancel, and m_hash.

◆ KIDIALOG() [2/2]

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

Definition at line 41 of file kidialog.cpp.

References getCaption(), getStyle(), KIDIALOG_BASE, m_cancelMeansCancel, and m_hash.

Member Function Documentation

◆ ClearDoNotShowAgainDialogs()

void KIDIALOG::ClearDoNotShowAgainDialogs ( )
static

Dialog type. Selects appropriate icon and default dialog title.

Definition at line 49 of file kidialog.cpp.

References g_doNotShowAgainDlgs.

Referenced by PANEL_MAINTENANCE::doClearDontShowAgain().

◆ DoNotShowAgain()

bool KIDIALOG::DoNotShowAgain ( ) const

Checks the 'do not show again' setting for the dialog.

Definition at line 63 of file kidialog.cpp.

References g_doNotShowAgainDlgs, and m_hash.

Referenced by DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), and DIALOG_CONFIGURE_PATHS::OnGridCellChanging().

◆ DoNotShowCheckbox()

◆ getCaption()

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

Definition at line 113 of file kidialog.cpp.

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

Referenced by KIDIALOG().

◆ getStyle()

long KIDIALOG::getStyle ( KD_TYPE aType)
staticprotected

Definition at line 131 of file kidialog.cpp.

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

Referenced by KIDIALOG().

◆ SetOKCancelLabels()

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

◆ Show()

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

Definition at line 69 of file kidialog.cpp.

References g_doNotShowAgainDlgs, m_cancelMeansCancel, and m_hash.

◆ ShowModal()

int KIDIALOG::ShowModal ( )
override

Definition at line 93 of file kidialog.cpp.

References g_doNotShowAgainDlgs, m_cancelMeansCancel, and m_hash.

Referenced by PANEL_EMBEDDED_FILES::AddEmbeddedFile(), PCB_CONTROL::AppendBoard(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::checkFootprintName(), DIALOG_TRACK_VIA_PROPERTIES::confirmPadChange(), DIALOG_TRACK_VIA_PROPERTIES::confirmShortingNets(), DESIGN_BLOCK_PANE::createNewDesignBlockLibrary(), PCB_BASE_EDIT_FRAME::createNewLibrary(), SYMBOL_EDIT_FRAME::CreateNewSymbol(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), SYMBOL_EDIT_FRAME::ExportSymbol(), ZONE_FILLER::Fill(), DIALOG_EXPORT_ODBPP::GenerateODBPPFiles(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), SYMBOL_EDIT_FRAME::ImportSymbol(), ROUTER_TOOL::InlineBreakTrack(), CLIPBOARD_IO::LoadBoard(), KICAD_MANAGER_CONTROL::NewProject(), PANEL_EMBEDDED_FILES::onExportFiles(), DIALOG_CONFIGURE_PATHS::OnGridCellChanging(), PCB_EDIT_FRAME::OpenProjectFiles(), ROUTER_TOOL::performDragging(), SYMBOL_EDITOR_PIN_TOOL::PlacePin(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), FOOTPRINT_EDIT_FRAME::SaveFootprintAs(), SYMBOL_EDIT_FRAME::saveSymbolCopyAs(), SCH_EDIT_FRAME::SelectUnit(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PNS_KICAD_IFACE_BASE::syncZone(), DIALOG_EXPORT_IDF3::TransferDataFromWindow(), DIALOG_GENCAD_EXPORT_OPTIONS::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::TransferDataFromWindow(), and PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow().

Member Data Documentation

◆ m_cancelMeansCancel

bool KIDIALOG::m_cancelMeansCancel
protected

Definition at line 74 of file kidialog.h.

Referenced by KIDIALOG(), KIDIALOG(), SetOKCancelLabels(), Show(), and ShowModal().

◆ m_hash

unsigned long KIDIALOG::m_hash
protected

Definition at line 73 of file kidialog.h.

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


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