RabbitCommon v2.2.6
Loading...
Searching...
No Matches
Signals | Public Member Functions | Private Attributes | List of all members
CDockFolderBrowser Class Reference

Folder browser. More...

#include <DockFolderBrowser.h>

Inheritance diagram for CDockFolderBrowser:

Signals

void sigDoubleClicked (const QString &szItem, bool bDir)
 emit when Double clicked
 

Public Member Functions

 CDockFolderBrowser (const QString &title, QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
 
 CDockFolderBrowser (QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
 
void setRootPath (const QString dir)
 Set root path.
 
QString rootPath () const
 Get root path.
 

Private Attributes

Ui::CDockFolderBrowser * ui
 
QFileSystemModel * m_pModel
 
bool m_bDetails
 

Detailed Description

Folder browser.


Usage:

CDockFolderBrowser* pDock = new CDockFolderBrowser(tr("Folder browser"), this);
pDock->setRootPath(RabbitCommon::CDir::Instance()->GetDirIcons(true));
qDebug() << pDock->rootPath();
addDockWidget(Qt::LeftDockWidgetArea, pDock);
// Add the action of dock to menu
ui->menuTools->addAction(pDock->toggleViewAction());
void setRootPath(const QString dir)
Set root path.
QString rootPath() const
Get root path.

Definition at line 24 of file DockFolderBrowser.h.

Constructor & Destructor Documentation

◆ CDockFolderBrowser() [1/2]

CDockFolderBrowser::CDockFolderBrowser ( const QString &  title,
QWidget *  parent = nullptr,
Qt::WindowFlags  flags = Qt::WindowFlags() 
)
explicit

Definition at line 11 of file DockFolderBrowser.cpp.

◆ CDockFolderBrowser() [2/2]

CDockFolderBrowser::CDockFolderBrowser ( QWidget *  parent = nullptr,
Qt::WindowFlags  flags = Qt::WindowFlags() 
)
explicit

Definition at line 114 of file DockFolderBrowser.cpp.

◆ ~CDockFolderBrowser()

CDockFolderBrowser::~CDockFolderBrowser ( )
virtual

Definition at line 118 of file DockFolderBrowser.cpp.

Member Function Documentation

◆ rootPath()

QString CDockFolderBrowser::rootPath ( ) const

Get root path.

Definition at line 134 of file DockFolderBrowser.cpp.

◆ setRootPath()

void CDockFolderBrowser::setRootPath ( const QString  dir)

Set root path.

Definition at line 128 of file DockFolderBrowser.cpp.

◆ sigDoubleClicked

void CDockFolderBrowser::sigDoubleClicked ( const QString &  szItem,
bool  bDir 
)
signal

emit when Double clicked

Parameters
szItemitem of double clicked
bDir
  • true: item is directory
  • false: item is folder

Member Data Documentation

◆ m_bDetails

bool CDockFolderBrowser::m_bDetails
private

Definition at line 53 of file DockFolderBrowser.h.

◆ m_pModel

QFileSystemModel* CDockFolderBrowser::m_pModel
private

Definition at line 51 of file DockFolderBrowser.h.

◆ ui

Ui::CDockFolderBrowser* CDockFolderBrowser::ui
private

Definition at line 49 of file DockFolderBrowser.h.


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