JKQtExtras
a library of useful Qt widgets and tools
JKQTEFileSelectToolButton Class Reference

specialized QToolButton which allows to select a file and saves its path in the buddy More...

#include <jkqtespecialtoolbutton.h>

Inheritance diagram for JKQTEFileSelectToolButton:
Collaboration diagram for JKQTEFileSelectToolButton:

Public Slots

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 setDialogFilter (const QString &b)
 sets the file filter of the file select dialog More...
 
void setDialogTitle (const QString &b)
 sets the title label of the file select dialog More...
 

Public Member Functions

 JKQTEFileSelectToolButton (QWidget *parent=nullptr)
 
virtual ~JKQTEFileSelectToolButton ()
 
QLineEdit * buddy ()
 buddy associated with this button More...
 
const QLineEdit * buddy () const
 buddy associated with this button More...
 
QString getBaseDir () const
 returns a basedir in which files are searched for execution, if this is empty the current directory is used More...
 
QString getDialogFilter () const
 returns the file filter of the file select dialog More...
 
QString getDialogTitle () const
 returns the title label of the file select dialog More...
 
void setBuddy (QLineEdit *b)
 set the buddy widget, which provides the contents More...
 

Protected Slots

void openBuddyContents ()
 

Private Attributes

QString m_baseDir
 
QLineEdit * m_buddy
 
QString m_dlgFilter
 
QString m_dlgTitle
 

Detailed Description

specialized QToolButton which allows to select a file and saves its path in the buddy

Usage example:

QLineEdit* lineFile=new QLineEdit(wid);
btnFile->setBuddy(lineFile);

Constructor & Destructor Documentation

◆ JKQTEFileSelectToolButton()

JKQTEFileSelectToolButton::JKQTEFileSelectToolButton ( QWidget *  parent = nullptr)

Default constructor

◆ ~JKQTEFileSelectToolButton()

virtual JKQTEFileSelectToolButton::~JKQTEFileSelectToolButton ( )
virtual

Default destructor

Member Function Documentation

◆ buddy() [1/2]

QLineEdit* JKQTEFileSelectToolButton::buddy ( )

buddy associated with this button

◆ buddy() [2/2]

const QLineEdit* JKQTEFileSelectToolButton::buddy ( ) const

buddy associated with this button

◆ getBaseDir()

QString JKQTEFileSelectToolButton::getBaseDir ( ) const

returns a basedir in which files are searched for execution, if this is empty the current directory is used

◆ getDialogFilter()

QString JKQTEFileSelectToolButton::getDialogFilter ( ) const

returns the file filter of the file select dialog

◆ getDialogTitle()

QString JKQTEFileSelectToolButton::getDialogTitle ( ) const

returns the title label of the file select dialog

◆ openBuddyContents

void JKQTEFileSelectToolButton::openBuddyContents ( )
protectedslot

◆ setBaseDir

void JKQTEFileSelectToolButton::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 JKQTEFileSelectToolButton::setBuddy ( QLineEdit *  b)

set the buddy widget, which provides the contents

◆ setDialogFilter

void JKQTEFileSelectToolButton::setDialogFilter ( const QString &  b)
slot

sets the file filter of the file select dialog

◆ setDialogTitle

void JKQTEFileSelectToolButton::setDialogTitle ( const QString &  b)
slot

sets the title label of the file select dialog

Member Data Documentation

◆ m_baseDir

QString JKQTEFileSelectToolButton::m_baseDir
private

◆ m_buddy

QLineEdit* JKQTEFileSelectToolButton::m_buddy
private

◆ m_dlgFilter

QString JKQTEFileSelectToolButton::m_dlgFilter
private

◆ m_dlgTitle

QString JKQTEFileSelectToolButton::m_dlgTitle
private

The documentation for this class was generated from the following file:
JKQTEFileSelectToolButton
specialized QToolButton which allows to select a file and saves its path in the buddy
Definition: jkqtespecialtoolbutton.h:78
JKQTEFileSelectToolButton::setBuddy
void setBuddy(QLineEdit *b)
set the buddy widget, which provides the contents
JKQTEFileSelectToolButton::JKQTEFileSelectToolButton
JKQTEFileSelectToolButton(QWidget *parent=nullptr)