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

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

#include <jkqtespecialtoolbutton.h>

Inheritance diagram for JKQTEDirectorySelectToolButton:
Collaboration diagram for JKQTEDirectorySelectToolButton:

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

Public Member Functions

 JKQTEDirectorySelectToolButton (QWidget *parent=nullptr)
 
virtual ~JKQTEDirectorySelectToolButton ()
 
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 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 directory and saves its path in the buddy

Usage example:

QLineEdit* lineDir=new QLineEdit(wid);
btnDir->setBuddy(lineDir);

Constructor & Destructor Documentation

◆ JKQTEDirectorySelectToolButton()

JKQTEDirectorySelectToolButton::JKQTEDirectorySelectToolButton ( QWidget *  parent = nullptr)

Default constructor

◆ ~JKQTEDirectorySelectToolButton()

virtual JKQTEDirectorySelectToolButton::~JKQTEDirectorySelectToolButton ( )
virtual

Default destructor

Member Function Documentation

◆ buddy() [1/2]

QLineEdit* JKQTEDirectorySelectToolButton::buddy ( )

buddy associated with this button

◆ buddy() [2/2]

const QLineEdit* JKQTEDirectorySelectToolButton::buddy ( ) const

buddy associated with this button

◆ getBaseDir()

QString JKQTEDirectorySelectToolButton::getBaseDir ( ) const

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

◆ getDialogTitle()

QString JKQTEDirectorySelectToolButton::getDialogTitle ( ) const

returns the title label of the file select dialog

◆ openBuddyContents

void JKQTEDirectorySelectToolButton::openBuddyContents ( )
protectedslot

◆ setBaseDir

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

set the buddy widget, which provides the contents

◆ setDialogFilter

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

sets the file filter of the file select dialog

Member Data Documentation

◆ m_baseDir

QString JKQTEDirectorySelectToolButton::m_baseDir
private

◆ m_buddy

QLineEdit* JKQTEDirectorySelectToolButton::m_buddy
private

◆ m_dlgFilter

QString JKQTEDirectorySelectToolButton::m_dlgFilter
private

◆ m_dlgTitle

QString JKQTEDirectorySelectToolButton::m_dlgTitle
private

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