specialized QToolButton which allows to open the file referenced by the buddy edit
More...
#include <jkqtespecialtoolbutton.h>
|
void | setBaseDir (const QString &b) |
| set a basedir in which files are searched for execution, if this is empty the current directory is used More...
|
|
void | setBuddy (QLineEdit *b) |
| set the buddy widget, which provides the contents More...
|
|
specialized QToolButton which allows to open the file referenced by the buddy edit
Usage example:
QLineEdit* lineFileExe=new QLineEdit(QApplication::instance()->applicationFilePath(), wid);
◆ JKQTEFileExecuteToolButton()
JKQTEFileExecuteToolButton::JKQTEFileExecuteToolButton |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~JKQTEFileExecuteToolButton()
virtual JKQTEFileExecuteToolButton::~JKQTEFileExecuteToolButton |
( |
| ) |
|
|
virtual |
◆ buddy() [1/2]
QLineEdit* JKQTEFileExecuteToolButton::buddy |
( |
| ) |
|
buddy associated with this button
◆ buddy() [2/2]
const QLineEdit* JKQTEFileExecuteToolButton::buddy |
( |
| ) |
const |
buddy associated with this button
◆ getBaseDir()
QString JKQTEFileExecuteToolButton::getBaseDir |
( |
| ) |
const |
returns a basedir in which files are searched for execution, if this is empty the current directory is used
◆ openBuddyContents
void JKQTEFileExecuteToolButton::openBuddyContents |
( |
| ) |
|
|
protectedslot |
executes the contents of the buddy()
This internally calls QDesktopServices::openUrl
(QUrl("file:///"+buddyContents,QUrl::TolerantMode));
- See also
- setBaseDir()
◆ setBaseDir
void JKQTEFileExecuteToolButton::setBaseDir |
( |
const QString & |
b | ) |
|
|
slot |
set a basedir in which files are searched for execution, if this is empty the current directory is used
◆ setBuddy
void JKQTEFileExecuteToolButton::setBuddy |
( |
QLineEdit * |
b | ) |
|
|
slot |
set the buddy widget, which provides the contents
◆ m_baseDir
QString JKQTEFileExecuteToolButton::m_baseDir |
|
private |
◆ m_buddy
QLineEdit* JKQTEFileExecuteToolButton::m_buddy |
|
private |
The documentation for this class was generated from the following file: