Commit 5cd77f37 authored by Shubham  .'s avatar Shubham .
Browse files

Merge branch 'master' into gsoc20_documentation

parents e1b80b8e 82458565
......@@ -5,7 +5,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "20")
set (RELEASE_SERVICE_VERSION_MINOR "07")
set (RELEASE_SERVICE_VERSION_MINOR "11")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify calculating derivatives of expressions",
"Description[ca@valencia]": "Un diàleg assistent per simplificar els càlculs de derivades d'expressions",
"Description[ca]": "Un diàleg assistent per simplificar els càlculs de derivades d'expressions",
"Description[ca]": "Un diàleg assistent per a simplificar els càlculs de derivades d'expressions",
"Description[cs]": "Pomocný dialog pro zjednodušení derivace výrazů",
"Description[de]": "Ein Assistent, um die Berechnung von Ableitungen von Ausdrücken zu vereinfachen",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση του υπολογισμού παραγώγων εκφράσεων",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to import a specific package (or library or module) to Cantor workspace",
"Description[ca@valencia]": "Un diàleg d'assistència per importar un paquet específic (o biblioteca o mòdul) a l'espai de treball del Cantor",
"Description[ca]": "Un diàleg d'assistència per importar un paquet específic (o biblioteca o mòdul) a l'espai de treball del Cantor",
"Description[ca]": "Un diàleg d'assistència per a importar un paquet específic (o biblioteca o mòdul) a l'espai de treball del Cantor",
"Description[de]": "Ein Assistent, um ein angegebenes Paket, Bibliothek oder Modul in den Arbeitsbereich von Cantor zu importieren",
"Description[el]": "Βοηθητικός διάλογος για την εισαγωγή πακέτου (ή βιβλιοθήκης ή αρθρώματος) στο χώρο εργασίας Cantor",
"Description[en_GB]": "An Assistant dialogue to import a specific package (or library or module) to Cantor workspace",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify calculation of integrals",
"Description[ca@valencia]": "Un diàleg assistent per simplificar els càlculs d'integrals",
"Description[ca]": "Un diàleg assistent per simplificar els càlculs d'integrals",
"Description[ca]": "Un diàleg assistent per a simplificar els càlculs d'integrals",
"Description[cs]": "Pomocný dialog pro zjednodušení výpočtu integrálů",
"Description[de]": "Ein Assistent, um die Berechnung von Integralen zu vereinfachen",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση του υπολογισμού ολοκληρωμάτων",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify entering of matrices",
"Description[ca@valencia]": "Un diàleg assistent per simplificar la introducció de matrius",
"Description[ca]": "Un diàleg assistent per simplificar la introducció de matrius",
"Description[ca]": "Un diàleg assistent per a simplificar la introducció de matrius",
"Description[cs]": "Pomocný dialog pro zjednodušení zadávání matic",
"Description[de]": "Ein Assistent, um die Eingabe von Matrizen zu vereinfachen",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση εισαγωγής δεδομένων σε πίνακες",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify calculating of Eigenvalues",
"Description[ca@valencia]": "Un diàleg assistent per simplificar el càlcul d'autovalors",
"Description[ca]": "Un diàleg assistent per simplificar el càlcul d'autovalors",
"Description[ca]": "Un diàleg assistent per a simplificar el càlcul d'autovalors",
"Description[cs]": "Pomocný dialog pro zjednodušení výpočtu vlastních čísel",
"Description[de]": "Ein Assistent, um das Berechnen von „Eigen“-Werten zu vereinfachen.",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση του υπολογισμού ιδιοτιμών",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify calculating of EigenVectors",
"Description[ca@valencia]": "Un diàleg assistent per simplificar el càlcul d'autovectors",
"Description[ca]": "Un diàleg assistent per simplificar el càlcul d'autovectors",
"Description[ca]": "Un diàleg assistent per a simplificar el càlcul d'autovectors",
"Description[cs]": "Pomocný dialog pro zjednodušení výpočtu vlastních vektorů",
"Description[de]": "Ein Assistent, um das Berechnen von „Eigen“-Vektoren zu vereinfachen.",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση του υπολογισμού ιδιοδιανυσμάτων",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify inverting of matrices",
"Description[ca@valencia]": "Un diàleg assistent per simplificar la inversió de matrius",
"Description[ca]": "Un diàleg assistent per simplificar la inversió de matrius",
"Description[ca]": "Un diàleg assistent per a simplificar la inversió de matrius",
"Description[cs]": "Pomocný dialog pro zjednodušení invertování matice",
"Description[de]": "Ein Assistent, um das Invertieren von Matrizen zu vereinfachen",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση της αντιστροφής πινάκων",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify plotting of 2D functions",
"Description[ca@valencia]": "Un diàleg assistent per simplificar la representació gràfica de funcions 2D",
"Description[ca]": "Un diàleg assistent per simplificar la representació gràfica de funcions 2D",
"Description[ca]": "Un diàleg assistent per a simplificar la representació gràfica de funcions en 2D",
"Description[cs]": "Pomocný dialog pro zjednodušení vytvoření grafu dvourozměrných funkcí",
"Description[de]": "Ein Assistent, um das Zeichnen von 2D-Funktionen zu vereinfachen",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση της σχεδίασης δισδιάστατων συναρτήσεων",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify plotting of 3D functions",
"Description[ca@valencia]": "Un diàleg assistent per simplificar la representació gràfica de funcions 3D",
"Description[ca]": "Un diàleg assistent per simplificar la representació gràfica de funcions 3D",
"Description[ca]": "Un diàleg assistent per a simplificar la representació gràfica de funcions en 3D",
"Description[cs]": "Pomocný dialog pro zjednodušení vytvoření grafu trojrozměrných funkcí",
"Description[de]": "Ein Assistent, um das Zeichnen von 3D-Funktionen zu vereinfachen",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση της σχεδίασης τρισδιάστατων συναρτήσεων",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant for running an external Script file",
"Description[ca@valencia]": "Un assistent per executar un fitxer de script extern",
"Description[ca]": "Un assistent per executar un fitxer de script extern",
"Description[ca]": "Un assistent per a executar un fitxer de script extern",
"Description[cs]": "Pomocník pro spouštění externího skriptu",
"Description[de]": "Ein Assistent zum Ausführen externer Skriptdateien",
"Description[el]": "Βοηθητικός διάλογος για την εκτέλεση αρχείου εξωτερικού σεναρίου",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant dialog to simplify solving of equations",
"Description[ca@valencia]": "Un diàleg assistent per simplificar la resolució d'equacions",
"Description[ca]": "Un diàleg assistent per simplificar la resolució d'equacions",
"Description[ca]": "Un diàleg assistent per a simplificar la resolució d'equacions",
"Description[cs]": "Pomocný dialog pro zjednodušení řešení rovnic",
"Description[de]": "Ein Assistent, um das Lösen von Gleichungen zu vereinfachen",
"Description[el]": "Βοηθητικός διάλογος για απλούστευση της επίλυσης εξισώσεων",
......
......@@ -325,11 +325,10 @@ QString JuliaSession::graphicPackageErrorMessage(QString packageId) const
if (packageId == QLatin1String("gr")) {
return i18n(
"On this moment, integrated graphic can handle only one of Julia packages - GR graphic package. "
"And for using this feature you need to install the package first. "
"For this, run Pkg.install(\"GR\") in Cantor or in julia REPL. Also, it is important "
"to note, that this is a long operation and better use julia REPL, because Cantor doesn't "
"show intermediate text unlike the julia."
"For Julia only GR (https://gr-framework.org/), a framework for visualization applications, is supported at the moment. "
"This package has to be installed first, if not done yet. "
"For this, run Pkg.install(\"GR\") in Cantor or in Julia REPL. "
"Note, this operation can take some time and it's better to perform it in Julia REPL that is able to show the current progress of the package installation."
);
}
return text;
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "Backend for Python Scientific Programming",
"Description[ca@valencia]": "Dorsal per a la programació científica Python",
"Description[ca]": "Dorsal per a la programació científica Python",
"Description[ca]": "Dorsal per a la programació científica en Python",
"Description[el]": "Σύστημα υποστήριξης για το Python Scientific Programming",
"Description[en_GB]": "Backend for Python Scientific Programming",
"Description[es]": "Motor para programación científica en Python",
......@@ -14,6 +14,7 @@
"Description[nn]": "Motor for Pythons «Scientific Programming»",
"Description[pt]": "Infra-Estrutura de Programação Científica com Python",
"Description[pt_BR]": "Infraestrutura de programação científica Python",
"Description[sk]": "Backend pre vedecké programovanie v Python-e",
"Description[sl]": "Zaledje za znanstveno programersko okolje Python",
"Description[sv]": "Bakgrundsprogram för Python vetenskaplig programmeringsmiljö",
"Description[uk]": "Модуль наукового програмування мовою Python",
......@@ -35,6 +36,7 @@
"Name[nn]": "Python",
"Name[pt]": "Python",
"Name[pt_BR]": "Python",
"Name[sk]": "Python",
"Name[sl]": "Python",
"Name[sv]": "Python",
"Name[uk]": "Python",
......
......@@ -3,7 +3,7 @@
"Dependencies": [],
"Description": "An Assistant for plotting with the Qalculate backend.",
"Description[ca@valencia]": "Un assistent per fer gràfiques amb el dorsal del Qalculate.",
"Description[ca]": "Un assistent per fer gràfiques amb el dorsal del Qalculate.",
"Description[ca]": "Un assistent per a fer gràfiques amb el dorsal del Qalculate.",
"Description[cs]": "Asistent pro grafy s podpůrnou vrstvou Qualculate.",
"Description[de]": "Ein Assistent für das Plotten mit dem Qalculate-Modul.",
"Description[el]": "Βοηθός σχεδίασης με το σύστημα υποστήριξης Qalculate",
......
......@@ -25,10 +25,12 @@
#include <KLocalizedString>
#include <QDebug>
#include <QDir>
#include <QMenu>
#include <QFileSystemWatcher>
#include <QJsonValue>
#include <QJsonObject>
#include <QStandardPaths>
ImageEntry::ImageEntry(Worksheet* worksheet) : WorksheetEntry(worksheet)
{
......@@ -84,6 +86,20 @@ void ImageEntry::setContent(const QString& content)
void ImageEntry::setContent(const QDomElement& content, const KZip& file)
{
Q_UNUSED(file);
QDomElement fileName = content.firstChildElement(QLatin1String("FileName"));
if (!fileName.isNull()) {
m_fileName = fileName.text();
const KArchiveEntry* imageEntry = file.directory()->entry(m_fileName);
if (imageEntry && imageEntry->isFile())
{
const KArchiveFile* imageFile = static_cast<const KArchiveFile*>(imageEntry);
const QString& dir = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
imageFile->copyTo(dir);
}
}
static QStringList unitNames;
if (unitNames.isEmpty())
unitNames << QLatin1String("(auto)") << QLatin1String("px") << QLatin1String("%");
......@@ -153,10 +169,16 @@ QDomElement ImageEntry::toXml(QDomDocument& doc, KZip* archive)
if (unitNames.isEmpty())
unitNames << QLatin1String("(auto)") << QLatin1String("px") << QLatin1String("%");
archive->addLocalFile(m_imagePath, QUrl::fromLocalFile(m_imagePath).fileName());
QDomElement image = doc.createElement(QLatin1String("Image"));
QDomElement path = doc.createElement(QLatin1String("Path"));
QDomElement fileName = doc.createElement(QLatin1String("FileName"));
QDomText pathText = doc.createTextNode(m_imagePath);
QDomText fileNameText = doc.createTextNode(QUrl::fromLocalFile(m_imagePath).fileName());
path.appendChild(pathText);
fileName.appendChild(fileNameText);
image.appendChild(fileName);
image.appendChild(path);
QDomElement display = doc.createElement(QLatin1String("Display"));
display.setAttribute(QLatin1String("width"), m_displaySize.width);
......@@ -255,11 +277,25 @@ void ImageEntry::updateEntry()
if (!m_imageItem)
m_imageItem = new WorksheetImageItem(this);
if (m_imagePath.endsWith(QLatin1String(".eps"), Qt::CaseInsensitive)) {
m_imageItem->setEps(QUrl::fromLocalFile(m_imagePath));
// This if-else block was used for backward compability for *cws files
// without FileName tag. After some releases from 20.08 version, it will
// be possible to remove the else part and strip the m_imagePath from the
// code and Path tag from the CWS format
if (!m_fileName.isNull()) {
QString imagePath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + QDir::separator() + m_fileName;
if (imagePath.endsWith(QLatin1String(".eps"), Qt::CaseInsensitive)) {
m_imageItem->setEps(QUrl::fromLocalFile(imagePath));
} else {
QImage img(imagePath);
m_imageItem->setImage(img);
}
} else {
QImage img(m_imagePath);
m_imageItem->setImage(img);
if (m_imagePath.endsWith(QLatin1String(".eps"), Qt::CaseInsensitive)) {
m_imageItem->setEps(QUrl::fromLocalFile(m_imagePath));
} else {
QImage img(m_imagePath);
m_imageItem->setImage(img);
}
}
if (!m_imageItem->imageIsValid()) {
......
......@@ -76,6 +76,7 @@ class ImageEntry : public WorksheetEntry
private:
QString m_imagePath;
QString m_fileName;
ImageSize m_displaySize;
ImageSize m_printSize;
bool m_useDisplaySizeForPrinting;
......
......@@ -29,52 +29,52 @@
#include <QUrl>
#include <QDebug>
#include <QFileInfo>
#include <QWidget>
#include <QVBoxLayout>
#include <QPushButton>
#include <QAction>
#include <QLineEdit>
#include <KParts/ReadOnlyPart>
QFileSystemModel* FileBrowserPanelPlugin::model = nullptr;
FileBrowserPanelPlugin::FileBrowserPanelPlugin(QObject* parent, const QList<QVariant>& args): Cantor::PanelPlugin(parent),
m_view(nullptr)
m_mainWidget(nullptr), m_treeview(nullptr), m_pathEdit(nullptr), m_model(nullptr), historyBackCount(0)
{
Q_UNUSED(args);
KParts::ReadOnlyPart* part = dynamic_cast<KParts::ReadOnlyPart*>(parent->parent());
if (part)
m_dirRoot = QFileInfo(part->url().toLocalFile()).absoluteDir().absolutePath();
QString baseRootDir;
if (part && !part->url().isEmpty())
baseRootDir = QFileInfo(part->url().toLocalFile()).absoluteDir().absolutePath();
else
m_dirRoot = QDir::currentPath();
baseRootDir = QDir::currentPath();
m_rootDirsHistory.push_back(baseRootDir);
}
FileBrowserPanelPlugin::~FileBrowserPanelPlugin()
{
if (m_view)
m_view->deleteLater();;
if (m_mainWidget)
{
m_mainWidget->deleteLater();
m_treeview = nullptr;
m_pathEdit = nullptr;
m_model->deleteLater();
}
}
QWidget* FileBrowserPanelPlugin::widget()
{
if (!m_view)
if (!m_mainWidget)
{
if (!model)
{
model = new QFileSystemModel();
model->setRootPath(QDir::currentPath());
}
m_model = new QFileSystemModel();
m_model->setRootPath(m_rootDirsHistory.last());
m_view = new QTreeView();
m_view->setModel(model);
m_view->setRootIndex(model->index(m_dirRoot));
// First column is name with the dir tree
for (int i = 1; i < model->columnCount(); i++)
m_view->setColumnHidden(i, true);
m_view->header()->hide();
constructMainWidget();
connect(m_view, &QTreeView::doubleClicked, this, &FileBrowserPanelPlugin::handleDoubleClicked);
connect(this, SIGNAL(requestOpenWorksheet(QUrl)), parent()->parent(), SIGNAL(requestOpenWorksheet(QUrl)));
}
return m_view;
return m_mainWidget;
}
bool FileBrowserPanelPlugin::showOnStartup()
......@@ -84,21 +84,143 @@ bool FileBrowserPanelPlugin::showOnStartup()
void FileBrowserPanelPlugin::handleDoubleClicked(const QModelIndex& index)
{
if (model->isDir(index))
return;
QVariant data = model->data(index, QFileSystemModel::FilePathRole);
QVariant data = m_model->data(index, QFileSystemModel::FilePathRole);
if (data.isValid() && data.type() == QVariant::String)
{
const QString& filename = data.value<QString>();
const QUrl& url = QUrl::fromLocalFile(filename);
if (filename.endsWith(QLatin1String(".cws")) || filename.endsWith(QLatin1String(".ipynb")))
emit requestOpenWorksheet(url);
if (m_model->isDir(index))
{
moveFileBrowserRoot(filename);
}
else
QDesktopServices::openUrl(url);
{
const QUrl& url = QUrl::fromLocalFile(filename);
if (filename.endsWith(QLatin1String(".cws")) || filename.endsWith(QLatin1String(".ipynb")))
emit requestOpenWorksheet(url);
else
QDesktopServices::openUrl(url);
}
}
}
void FileBrowserPanelPlugin::constructMainWidget()
{
m_mainWidget = new QWidget();
m_treeview = new QTreeView(m_mainWidget);
m_treeview->setModel(m_model);
m_treeview->setRootIndex(m_model->index(m_rootDirsHistory.last()));
m_treeview->setExpandsOnDoubleClick(false);
connect(m_treeview, &QTreeView::doubleClicked, this, &FileBrowserPanelPlugin::handleDoubleClicked);
// First column is name with the dir tree
// Show only the first column
for (int i = 1; i < m_model->columnCount(); i++)
m_treeview->setColumnHidden(i, true);
m_treeview->header()->hide();
m_treeview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QWidget* buttonContainer = new QWidget(m_mainWidget);
QPushButton* dirUpButton = new QPushButton(QIcon::fromTheme(QLatin1String("go-up")), QString(), buttonContainer);
dirUpButton->setMinimumSize(40, 40);
connect(dirUpButton, &QPushButton::clicked, this, &FileBrowserPanelPlugin::dirUpButtonHandle);
QPushButton* homeButton = new QPushButton(QIcon::fromTheme(QLatin1String("go-home")), QString(), buttonContainer);
homeButton->setMinimumSize(40, 40);
connect(homeButton, &QPushButton::clicked, this, &FileBrowserPanelPlugin::homeButtonHandle);
QPushButton* dirPreviousButton = new QPushButton(QIcon::fromTheme(QLatin1String("go-previous")), QString(), buttonContainer);
dirPreviousButton->setMinimumSize(40, 40);
connect(dirPreviousButton, &QPushButton::clicked, this, &FileBrowserPanelPlugin::dirPreviousButtonHandle);
QPushButton* dirNextButton = new QPushButton(QIcon::fromTheme(QLatin1String("go-next")), QString(), buttonContainer);
dirNextButton->setMinimumSize(40, 40);
connect(dirNextButton, &QPushButton::clicked, this, &FileBrowserPanelPlugin::dirNextButtonHandle);
m_pathEdit = new QLineEdit(m_rootDirsHistory.last(), buttonContainer);
connect(m_pathEdit, &QLineEdit::returnPressed, this, &FileBrowserPanelPlugin::setNewRootPath);
m_pathEdit->setMinimumHeight(40);
m_pathEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
QHBoxLayout* horizontalLayout = new QHBoxLayout();
horizontalLayout->setDirection(QBoxLayout::LeftToRight);
horizontalLayout->addWidget(dirPreviousButton);
horizontalLayout->addWidget(dirUpButton);
horizontalLayout->addWidget(homeButton);
horizontalLayout->addWidget(dirNextButton);
horizontalLayout->addWidget(m_pathEdit);
horizontalLayout->setMargin(0);
buttonContainer->setLayout(horizontalLayout);
buttonContainer->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
QVBoxLayout* layout = new QVBoxLayout();
layout->addWidget(buttonContainer);
layout->addWidget(m_treeview);
m_mainWidget->setLayout(layout);
}
void FileBrowserPanelPlugin::moveFileBrowserRoot(const QString& path)
{
for (int i = 0; i < historyBackCount; i++)
m_rootDirsHistory.pop_back();
historyBackCount = 0;
m_rootDirsHistory.push_back(path);
setRootPath(path);
}
void FileBrowserPanelPlugin::setRootPath(const QString& path)
{
m_model->setRootPath(path);
m_treeview->setRootIndex(m_model->index(path));
m_pathEdit->setText(path);
}
void FileBrowserPanelPlugin::dirUpButtonHandle()
{
QDir dir(m_model->rootPath());
if (dir.cdUp())
moveFileBrowserRoot(dir.absolutePath());
}
void FileBrowserPanelPlugin::homeButtonHandle()
{
moveFileBrowserRoot(QDir::homePath());
}
void FileBrowserPanelPlugin::dirNextButtonHandle()
{
if (historyBackCount <= 0)
return;
historyBackCount -= 1;
const QString& newPath = m_rootDirsHistory[m_rootDirsHistory.size() - 1 - historyBackCount];
setRootPath(newPath);
}
void FileBrowserPanelPlugin::dirPreviousButtonHandle()
{
if (historyBackCount >= m_rootDirsHistory.size() - 1)
return;
historyBackCount += 1;
const QString& newPath = m_rootDirsHistory[m_rootDirsHistory.size() - 1 - historyBackCount];
setRootPath(newPath);
}
void FileBrowserPanelPlugin::setNewRootPath()
{
QString path = m_pathEdit->text();
QFileInfo info(path);
if (info.isDir())
moveFileBrowserRoot(path);
}
K_PLUGIN_FACTORY_WITH_JSON(filebrowserpanelplugin, "filebrowserpanelplugin.json", registerPlugin<FileBrowserPanelPlugin>();)
#include "filebrowserpanelplugin.moc"
......@@ -21,11 +21,16 @@
#ifndef _FILEBROWSERPANELPLUGIN_H
#define _FILEBROWSERPANELPLUGIN_H
#include <QVector>
#include "panelplugin.h"
class QTreeView;
class QWidget;
class QModelIndex;
class QFileSystemModel;
class QPushButton;
class QLineEdit;
class FileBrowserPanelPlugin : public Cantor::PanelPlugin
{
......@@ -43,11 +48,24 @@ class FileBrowserPanelPlugin : public Cantor::PanelPlugin
private Q_SLOTS:
void handleDoubleClicked(const QModelIndex&);
void dirPreviousButtonHandle();
void dirUpButtonHandle();
void homeButtonHandle();
void dirNextButtonHandle();
void setNewRootPath();
private:
void constructMainWidget();
void moveFileBrowserRoot(const QString& path);
void setRootPath(const QString& path);
private:
QPointer<QTreeView> m_view;
QString m_dirRoot;
static QFileSystemModel* model;
QPointer<QWidget> m_mainWidget;
QPointer<QTreeView> m_treeview;
QPointer<QLineEdit> m_pathEdit;
QFileSystemModel* m_model;
QVector<QString> m_rootDirsHistory;
int historyBackCount;
};
#endif /* _FILEBROWSERPANELPLUGIN_H */
......@@ -2,10 +2,26 @@
"KPlugin": {
"Dependencies": [],
"Description": "A panel for working with files inside Cantor",
"Description[ca]": "Un plafó per a treballar amb fitxers dins del Cantor",
"Description[fr]": "Un panneau pour travailler avec les fichiers à l'intérieur de Cantor",
"Description[nl]": "Een paneel in Cantor voor het werken met bestanden",
"Description[pt]": "Um painel para lidar com ficheiros dentro do Cantor",
"Description[sk]": "Panel na prácu zo súbormi vo vnútri Cantor",
"Description[sv]": "En panel för att arbeta med filer inne i Cantor",
"Description[uk]": "Панель для роботи з файлами у вікні Cantor",
"Description[x-test]": "xxA panel for working with files inside Cantorxx",
"Icon": "",
"Id": "FileBrowserPanel",
"License": "GPL",
"Name": "File Browser",
"Name[ca]": "Navegador de fitxers",
"Name[fr]": "Navigateur de fichiers",
"Name[nl]": "Bestanden bladeren",
"Name[pt]": "Gestor de Ficheiros",
"Name[sk]": "Prehliadač súborov",
"Name[sv]": "Filbläddrare",
"Name[uk]": "Навігація файлами",
"Name[x-test]": "xxFile Browserxx",
"ServiceTypes": [
"Cantor/PanelPlugin"
]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment