OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
OSEdUserManualCmd Class Reference

#include <OSEdUserManualCmd.hh>

Inheritance diagram for OSEdUserManualCmd:
Inheritance graph
Collaboration diagram for OSEdUserManualCmd:
Collaboration graph

Public Member Functions

 OSEdUserManualCmd ()
 
virtual ~OSEdUserManualCmd ()
 
virtual int id () const
 
virtual GUICommandcreate () const
 
virtual bool Do ()
 
virtual bool isEnabled ()
 
virtual std::string icon () const
 
- Public Member Functions inherited from GUICommand
 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual bool isChecked () const
 
virtual std::string shortName () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Private Member Functions

 OSEdUserManualCmd (const OSEdUserManualCmd &)
 Copying not allowed.
 
OSEdUserManualCmdoperator= (const OSEdUserManualCmd &)
 Assignment not allowed.
 
std::string userManual () const
 

Detailed Description

Command for opening user manual browser.

Definition at line 43 of file OSEdUserManualCmd.hh.

Constructor & Destructor Documentation

◆ OSEdUserManualCmd() [1/2]

OSEdUserManualCmd::OSEdUserManualCmd ( )

Constructor.

Definition at line 49 of file OSEdUserManualCmd.cc.

49 :
51}
static const std::string CMD_NAME_USER_MANUAL
User manual command name.

Referenced by create().

◆ ~OSEdUserManualCmd()

OSEdUserManualCmd::~OSEdUserManualCmd ( )
virtual

Destructor.

Definition at line 56 of file OSEdUserManualCmd.cc.

56 {
57}

◆ OSEdUserManualCmd() [2/2]

OSEdUserManualCmd::OSEdUserManualCmd ( const OSEdUserManualCmd )
private

Copying not allowed.

Member Function Documentation

◆ create()

GUICommand * OSEdUserManualCmd::create ( ) const
virtual

Creates new command.

Returns
New command.

Implements GUICommand.

Definition at line 75 of file OSEdUserManualCmd.cc.

75 {
76 return new OSEdUserManualCmd();
77}

References OSEdUserManualCmd().

Here is the call graph for this function:

◆ Do()

bool OSEdUserManualCmd::Do ( )
virtual

Executes the command.

Returns
True if execution is successful.

Implements GUICommand.

Definition at line 85 of file OSEdUserManualCmd.cc.

85 {
86
87 string manualFile = userManual();
88
91
92 HelpBrowser* browser = new HelpBrowser(
93 WxConversion::toWxString(fmt.str()),
94 WxConversion::toWxString(manualFile), wxDefaultPosition,
95 wxSize(800, 600));
96
97 browser->Show(true);
98 return true;
99}
static OSEdTextGenerator & instance()
@ TXT_USER_MANUAL_TITLE
User manual dialog title.
std::string userManual() const
virtual boost::format text(int textId)
static wxString toWxString(const std::string &source)

References OSEdTextGenerator::instance(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_USER_MANUAL_TITLE, and userManual().

Here is the call graph for this function:

◆ icon()

string OSEdUserManualCmd::icon ( ) const
virtual

Returns the icon path.

Returns
Empty string (icons not used).

Implements GUICommand.

Definition at line 120 of file OSEdUserManualCmd.cc.

120 {
121 return "";
122}

◆ id()

int OSEdUserManualCmd::id ( ) const
virtual

Returns the id of the command.

Returns
The id of the command.

Implements GUICommand.

Definition at line 65 of file OSEdUserManualCmd.cc.

65 {
67}
@ CMD_USER_MANUAL
User manual command id.

References OSEdConstants::CMD_USER_MANUAL.

◆ isEnabled()

bool OSEdUserManualCmd::isEnabled ( )
virtual

Returns true if command is enabled.

Command is enabled when user manual exists.

Returns
True if command is enabled.

Implements GUICommand.

Definition at line 109 of file OSEdUserManualCmd.cc.

109 {
110 string manualFile = userManual();
111 return FileSystem::fileExists(manualFile);
112}
static bool fileExists(const std::string fileName)

References FileSystem::fileExists(), and userManual().

Here is the call graph for this function:

◆ operator=()

OSEdUserManualCmd & OSEdUserManualCmd::operator= ( const OSEdUserManualCmd )
private

Assignment not allowed.

◆ userManual()

std::string OSEdUserManualCmd::userManual ( ) const
private

Returns the user manual location.

Returns
User manual location.

Definition at line 130 of file OSEdUserManualCmd.cc.

130 {
131 return Environment::manDirPath("OSALGUI") +
134}
static std::string manDirPath(const std::string &prog)
static const std::string DIRECTORY_SEPARATOR
static const std::string USER_MANUAL_NAME
Name of the user manual.

References FileSystem::DIRECTORY_SEPARATOR, Environment::manDirPath(), and OSEdConstants::USER_MANUAL_NAME.

Referenced by Do(), and isEnabled().

Here is the call graph for this function:

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