#include <QApplication>
#include <QListView>
#include <QLineEdit>
+// GDD
+#include <QUrl>
+#include <QDesktopServices>
/*!
\brief Defines extension behavior.
if ( parent )
setWindowIcon( parent->windowIcon() );
+ // GDD
+ myUrls.insert(0,QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::ApplicationsLocation)));
+ myUrls.insert(0,QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::HomeLocation)));
+ setSidebarUrls(myUrls);
+
// add quick directories widgets
if ( showQuickDir ) {
myQuickLab = new QLabel( tr( "LAB_QUICK_PATH" ), this );
if ( dirList.isEmpty() )
dirList << QDir::homePath();
- for ( int i = 0; i < dirList.count(); i++ )
+ // GDD
+ for ( int i = 0; i < dirList.count(); i++ ) {
myQuickCombo->addItem( dirList[i] );
+ myUrls.append(QUrl::fromLocalFile(dirList[i]));
+ }
+
+ // GDD
+ setSidebarUrls(myUrls);
+
}
else {
delete myQuickLab; myQuickLab = 0;
if ( !found ) {
dirList.append( dp );
resMgr->setValue( "FileDlg", "QuickDirList", dirList.join( ";" ) );
- if ( !emptyAndHome )
+ // GDD
+ if ( !emptyAndHome ) {
myQuickCombo->addItem( dp );
+ myUrls.append(QUrl::fromLocalFile( dp ));
+ setSidebarUrls(myUrls);
+ }
}
}
}
class QLineEdit;
class QComboBox;
class QPushButton;
+class QUrl;
class SUIT_FileValidator;
class SUIT_EXPORT SUIT_FileDlg : public QFileDialog
SUIT_FileValidator* myValidator; //!< file validator
QLabel* myQuickLab; //!< quick dir combo box
QComboBox* myQuickCombo; //!< quick dir combo box
+ QList<QUrl> myUrls; //!< quick dir Sidebar Urls
QPushButton* myQuickButton; //!< quick dir add button
bool myCheckPermissions; //!< check permissions option
static QString myLastVisitedPath; //!< last visited path