git-svn-id: svn://db.shs.com.ru/libs@360 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
#include <QScrollBar>
|
||||
#include <QClipboard>
|
||||
|
||||
/*
|
||||
class ProjectsModel: public QAbstractItemModel
|
||||
@@ -76,7 +77,11 @@ ProjectFilesystemWidget::ProjectFilesystemWidget(QWidget * parent): QWidget(pare
|
||||
actionOpen_here->setIcon(Utils::Icons::OPENFILE.icon());
|
||||
actionOpen_external->setIcon(Utils::Icons::OPENFILE.icon());
|
||||
actionShow_external->setIcon(Core::FileIconProvider::icon(QFileIconProvider::Folder));
|
||||
actionCopy_name->setIcon(Utils::Icons::COPY.icon());
|
||||
actionCopy_path->setIcon(Utils::Icons::COPY.icon());
|
||||
popup_menu.addActions(QList<QAction*>() << actionOpen_here << actionOpen_external << actionShow_external);
|
||||
popup_menu.addSeparator();
|
||||
popup_menu.addActions(QList<QAction*>() << actionCopy_name << actionCopy_path);
|
||||
proj_plug = 0;
|
||||
/*QList<QObject * > plugs = ExtensionSystem::PluginManager::allObjects();
|
||||
QStringList sl;
|
||||
@@ -384,3 +389,15 @@ void ProjectFilesystemWidget::on_actionShow_external_triggered() {
|
||||
Core::FileUtils::showInGraphicalShell(Core::ICore::mainWindow(), menu_target.absoluteFilePath());
|
||||
}
|
||||
|
||||
|
||||
void ProjectFilesystemWidget::on_actionCopy_name_triggered() {
|
||||
if (menu_target.path().isEmpty()) return;
|
||||
QApplication::clipboard()->setText(menu_target.fileName());
|
||||
}
|
||||
|
||||
|
||||
void ProjectFilesystemWidget::on_actionCopy_path_triggered() {
|
||||
if (menu_target.path().isEmpty()) return;
|
||||
QApplication::clipboard()->setText(menu_target.absoluteFilePath());
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ private slots:
|
||||
void on_actionOpen_here_triggered();
|
||||
void on_actionOpen_external_triggered();
|
||||
void on_actionShow_external_triggered();
|
||||
void on_actionCopy_name_triggered();
|
||||
void on_actionCopy_path_triggered();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -104,6 +104,16 @@
|
||||
<string>Show external ...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCopy_name">
|
||||
<property name="text">
|
||||
<string>Copy name</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCopy_path">
|
||||
<property name="text">
|
||||
<string>Copy path</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="projectfilesystem.qrc"/>
|
||||
|
||||
Reference in New Issue
Block a user