kate Library API Documentation

KateExternalTool Class Reference

This class defines a single external tool. More...

#include <kateexternaltools.h>

List of all members.

Public Member Functions

 KateExternalTool (const QString &name=QString::null, const QString &command=QString::null, const QString &icon=QString::null, const QString &tryexec=QString::null, const QStringList &mimetypes=QStringList(), const QString &acname=QString::null, const QString &cmdname=QString::null, int save=0)
 ~KateExternalTool ()
bool valid (const QString &mimetype) const
bool checkExec ()

Public Attributes

QString name
QString command
QString icon
QString tryexec
QStringList mimetypes
bool hasexec
QString acname
QString cmdname
int save


Detailed Description

This class defines a single external tool.

Definition at line 100 of file kateexternaltools.h.


Member Function Documentation

bool KateExternalTool::valid const QString mimetype  )  const
 

Returns:
true if mimetypes is empty, or the mimetype matches.

Definition at line 129 of file kateexternaltools.cpp.

References mimetypes.

bool KateExternalTool::checkExec  ) 
 

Returns:
true if "tryexec" exists and has the executable bit set, or is empty. This is run at least once, and the tool is disabled if it fails.

Definition at line 90 of file kateexternaltools.cpp.

References command, QFile::decodeName(), QFile::encodeName(), QString::isEmpty(), QString::section(), QStringList::split(), and tryexec.

Referenced by KateExternalTool().


Member Data Documentation

QString KateExternalTool::name
 

The name used in the menu.

Definition at line 111 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), KateExternalToolAction::KateExternalToolAction(), and KateExternalToolServiceEditor::KateExternalToolServiceEditor().

QString KateExternalTool::command
 

The command to execute.

Definition at line 114 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), checkExec(), and KateExternalToolServiceEditor::KateExternalToolServiceEditor().

QString KateExternalTool::icon
 

the icon to use in the menu.

Definition at line 115 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), KateExternalToolAction::KateExternalToolAction(), KateExternalToolServiceEditor::KateExternalToolServiceEditor(), and KateExternalToolsConfigWidget::reload().

QString KateExternalTool::tryexec
 

The name or path of the executable.

Definition at line 116 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), checkExec(), and KateExternalToolServiceEditor::KateExternalToolServiceEditor().

QStringList KateExternalTool::mimetypes
 

Optional list of mimetypes for which this action is valid.

Definition at line 117 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), KateExternalToolServiceEditor::KateExternalToolServiceEditor(), and valid().

bool KateExternalTool::hasexec
 

This is set by the constructor by calling checkExec(), if a value is present.

Definition at line 118 of file kateexternaltools.h.

Referenced by KateExternalTool(), KateExternalToolsConfigWidget::reload(), KateExternalToolsMenuAction::reload(), and KateExternalToolsCommand::reload().

QString KateExternalTool::acname
 

The name for the action. This is generated first time the action is is created.

Definition at line 119 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), KateExternalToolsMenuAction::reload(), and KateExternalToolsCommand::reload().

QString KateExternalTool::cmdname
 

The name for the commandline.

Definition at line 120 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), KateExternalToolServiceEditor::KateExternalToolServiceEditor(), and KateExternalToolsCommand::reload().

int KateExternalTool::save
 

We can save documents prior to activating the tool command: 0 = nothing, 1 = current document, 2 = all documents.

Definition at line 121 of file kateexternaltools.h.

Referenced by KateExternalToolsConfigWidget::apply(), and KateExternalToolServiceEditor::KateExternalToolServiceEditor().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kate Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 30 18:40:32 2005 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003