FreeCAD WebAssembly development snapshot
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled
160
src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp
Normal file
@@ -0,0 +1,160 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2006 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/FileInfo.h>
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Language/Translator.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/WidgetFactory.h>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
#include "DlgSettingsImp.h"
|
||||
#include "SheetTableViewAccessibleInterface.h"
|
||||
#include "ViewProviderSpreadsheet.h"
|
||||
#include "Workbench.h"
|
||||
|
||||
// use a different name to CreateCommand()
|
||||
void CreateSpreadsheetCommands();
|
||||
|
||||
void loadSpreadsheetResource()
|
||||
{
|
||||
// add resources and reloads the translators
|
||||
Q_INIT_RESOURCE(Spreadsheet);
|
||||
Q_INIT_RESOURCE(Spreadsheet_translation);
|
||||
Gui::Translator::instance()->refresh();
|
||||
}
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
class Module: public Py::ExtensionModule<Module>
|
||||
{
|
||||
public:
|
||||
Module()
|
||||
: Py::ExtensionModule<Module>("SpreadsheetGui")
|
||||
{
|
||||
add_varargs_method("open", &Module::open);
|
||||
add_varargs_method("insert", &Module::insert);
|
||||
initialize("This module is the SpreadsheetGui module."); // register with Python
|
||||
}
|
||||
|
||||
private:
|
||||
void load(App::Document* pcDoc, const std::string& Name)
|
||||
{
|
||||
try {
|
||||
Base::FileInfo file(Name);
|
||||
auto filename = file.fileNamePure();
|
||||
auto* pcSheet = pcDoc->addObject<Spreadsheet::Sheet>(filename.c_str());
|
||||
|
||||
pcSheet->importFromFile(Name, '\t', '"', '\\');
|
||||
pcSheet->execute();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
throw Py::RuntimeError(e.what());
|
||||
}
|
||||
}
|
||||
Py::Object open(const Py::Tuple& args)
|
||||
{
|
||||
char* Name;
|
||||
const char* DocName = nullptr;
|
||||
if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &DocName)) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
std::string EncodedName = std::string(Name);
|
||||
PyMem_Free(Name);
|
||||
|
||||
App::Document* pcDoc = App::GetApplication().newDocument(
|
||||
DocName ? DocName : QT_TR_NOOP("Unnamed")
|
||||
);
|
||||
load(pcDoc, EncodedName);
|
||||
|
||||
return Py::None();
|
||||
}
|
||||
|
||||
Py::Object insert(const Py::Tuple& args)
|
||||
{
|
||||
char* Name;
|
||||
const char* DocName = nullptr;
|
||||
if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &DocName)) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
std::string EncodedName = std::string(Name);
|
||||
PyMem_Free(Name);
|
||||
|
||||
App::Document* pcDoc = App::GetApplication().getDocument(DocName);
|
||||
if (!pcDoc) {
|
||||
pcDoc = App::GetApplication().newDocument(DocName ? DocName : QT_TR_NOOP("Unnamed"));
|
||||
}
|
||||
load(pcDoc, EncodedName);
|
||||
|
||||
return Py::None();
|
||||
}
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
{
|
||||
return Base::Interpreter().addModule(new Module);
|
||||
}
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
|
||||
/* Python entry */
|
||||
PyMOD_INIT_FUNC(SpreadsheetGui)
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
PyMOD_Return(nullptr);
|
||||
}
|
||||
|
||||
// instantiating the commands
|
||||
CreateSpreadsheetCommands();
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
QAccessible::installFactory(SpreadsheetGui::SheetTableViewAccessibleInterface::ifactory);
|
||||
#endif
|
||||
|
||||
SpreadsheetGui::ViewProviderSheet::init();
|
||||
SpreadsheetGui::ViewProviderSheetPython::init();
|
||||
SpreadsheetGui::Workbench::init();
|
||||
SpreadsheetGui::SheetView::init();
|
||||
SpreadsheetGui::SheetViewPy::init_type();
|
||||
|
||||
// register preference page
|
||||
new Gui::PrefPageProducer<SpreadsheetGui::DlgSettingsImp>(
|
||||
QT_TRANSLATE_NOOP("QObject", "Spreadsheet")
|
||||
);
|
||||
|
||||
// add resources and reloads the translators
|
||||
loadSpreadsheetResource();
|
||||
|
||||
PyObject* mod = SpreadsheetGui::initModule();
|
||||
Base::Console().log("Loading GUI of Spreadsheet module… done\n");
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
138
src/Mod/Spreadsheet/Gui/CMakeLists.txt
Normal file
@@ -0,0 +1,138 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
generate_from_py(ViewProviderSpreadsheet)
|
||||
|
||||
# The XML files
|
||||
set(SpreadsheetGui_XML_SRCS
|
||||
ViewProviderSpreadsheet.pyi
|
||||
)
|
||||
|
||||
set(SpreadsheetGui_LIBS
|
||||
Spreadsheet
|
||||
FreeCADGui
|
||||
)
|
||||
|
||||
set_property(SOURCE qtcolorpicker.h qtcolorpicker.cpp PROPERTY SKIP_AUTOMOC ON)
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/moc_qtcolorpicker-internal.cpp
|
||||
COMMAND ${QtCore_MOC_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/moc_qtcolorpicker-internal.cpp ${CMAKE_CURRENT_SOURCE_DIR}/qtcolorpicker.cpp
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qtcolorpicker.cpp)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/moc_qtcolorpicker.cpp
|
||||
COMMAND ${QtCore_MOC_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/moc_qtcolorpicker.cpp ${CMAKE_CURRENT_SOURCE_DIR}/qtcolorpicker.h
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qtcolorpicker.h)
|
||||
|
||||
|
||||
set_property(SOURCE qtcolorpicker.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtcolorpicker-internal.cpp)
|
||||
set_property(SOURCE qtcolorpicker.h APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtcolorpicker.cpp)
|
||||
|
||||
SET(SpreadsheetGui_RES_SRCS
|
||||
Resources/Spreadsheet.qrc
|
||||
)
|
||||
|
||||
set (Spreadsheet_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Resources/Spreadsheet_translation.qrc)
|
||||
qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Resources/translations)
|
||||
qt_create_resource_file(${Spreadsheet_TR_QRC} ${QM_SRCS})
|
||||
qt_add_resources(SpreadsheetGui_QRC_SRCS ${SpreadsheetGui_RES_SRCS} ${Spreadsheet_TR_QRC})
|
||||
|
||||
set(SpreadsheetGui_UIC_SRCS
|
||||
Sheet.ui
|
||||
PropertiesDialog.ui
|
||||
DlgBindSheet.ui
|
||||
DlgSheetConf.ui
|
||||
)
|
||||
|
||||
SET(SpreadsheetGui_SRCS
|
||||
${SpreadsheetGui_QRC_SRCS}
|
||||
${SpreadsheetGui_XML_SRCS}
|
||||
AppSpreadsheetGui.cpp
|
||||
Command.cpp
|
||||
DlgSettings.ui
|
||||
DlgSettingsImp.cpp
|
||||
DlgSettingsImp.h
|
||||
LineEdit.h
|
||||
LineEdit.cpp
|
||||
ViewProviderSpreadsheet.cpp
|
||||
ViewProviderSpreadsheet.h
|
||||
ViewProviderSpreadsheetPyImp.cpp
|
||||
Resources/Spreadsheet.qrc
|
||||
SpreadsheetView.cpp
|
||||
SpreadsheetView.h
|
||||
SpreadsheetDelegate.h
|
||||
SpreadsheetDelegate.cpp
|
||||
SheetTableView.cpp
|
||||
SheetTableView.h
|
||||
SheetTableViewAccessibleInterface.h
|
||||
SheetTableViewAccessibleInterface.cpp
|
||||
SheetModel.h
|
||||
SheetModel.cpp
|
||||
PreCompiled.h
|
||||
Workbench.cpp
|
||||
Workbench.h
|
||||
qtcolorpicker.h
|
||||
qtcolorpicker.cpp
|
||||
PropertiesDialog.h
|
||||
PropertiesDialog.cpp
|
||||
DlgBindSheet.h
|
||||
DlgBindSheet.cpp
|
||||
DlgSheetConf.h
|
||||
DlgSheetConf.cpp
|
||||
ZoomableView.h
|
||||
ZoomableView.cpp
|
||||
${SpreadsheetGui_UIC_HDRS}
|
||||
)
|
||||
|
||||
SET(SpreadsheetGuiIcon_SVG
|
||||
Resources/icons/SpreadsheetWorkbench.svg
|
||||
)
|
||||
|
||||
set(SpreadsheetGui_MOC_HDRS
|
||||
DlgSettingsImp.h
|
||||
)
|
||||
|
||||
SOURCE_GROUP("Moc" FILES ${SpreadsheetGui_MOC_SRCS})
|
||||
|
||||
SET(Resource_SRCS
|
||||
${Resource_SRCS}
|
||||
Resources/Spreadsheet.qrc
|
||||
)
|
||||
|
||||
set(SpreadsheetGui_UIC_SRCS
|
||||
DlgSettings.ui
|
||||
)
|
||||
|
||||
add_library(SpreadsheetGui SHARED
|
||||
${SpreadsheetGui_SRCS}
|
||||
${SpreadsheetGuiIcon_SVG}
|
||||
)
|
||||
|
||||
if(FREECAD_USE_PCH)
|
||||
target_precompile_headers(SpreadsheetGui PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h">
|
||||
)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
target_include_directories(
|
||||
SpreadsheetGui
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(SpreadsheetGui ${SpreadsheetGui_LIBS})
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(SpreadsheetGui PRIVATE /wd4251)
|
||||
endif()
|
||||
|
||||
if (FREECAD_WARN_ERROR)
|
||||
target_compile_warn_error(SpreadsheetGui)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(SpreadsheetGui SpreadsheetGui /Mod/Spreadsheet)
|
||||
SET_PYTHON_PREFIX_SUFFIX(SpreadsheetGui)
|
||||
|
||||
fc_copy_sources(SpreadsheetGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Spreadsheet" ${SpreadsheetGuiIcon_SVG})
|
||||
|
||||
INSTALL(TARGETS SpreadsheetGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
INSTALL(FILES ${SpreadsheetGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Spreadsheet/Resources/icons")
|
||||
1006
src/Mod/Spreadsheet/Gui/Command.cpp
Normal file
316
src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp
Normal file
@@ -0,0 +1,316 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2019 Zheng, Lei (realthunder) <realthunder.dev@gmail.com>*
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/ExpressionParser.h>
|
||||
#include <App/Range.h>
|
||||
#include <Gui/CommandT.h>
|
||||
|
||||
#include "DlgBindSheet.h"
|
||||
#include "ui_DlgBindSheet.h"
|
||||
|
||||
|
||||
using namespace App;
|
||||
using namespace Spreadsheet;
|
||||
using namespace SpreadsheetGui;
|
||||
|
||||
DlgBindSheet::DlgBindSheet(Sheet* sheet, const std::vector<Range>& ranges, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, sheet(sheet)
|
||||
, range(ranges.front())
|
||||
, ui(new Ui::DlgBindSheet)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// remove the automatic help button in dialog title since we don't use it
|
||||
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
||||
|
||||
std::string toStart, toEnd;
|
||||
ExpressionPtr pStart, pEnd;
|
||||
App::ObjectIdentifier bindingTarget;
|
||||
PropertySheet::BindingType type = sheet->getCellBinding(range, &pStart, &pEnd, &bindingTarget);
|
||||
if (type == PropertySheet::BindingNone) {
|
||||
if (ranges.size() > 1) {
|
||||
toStart = ranges.back().from().toString();
|
||||
toEnd = ranges.back().to().toString();
|
||||
}
|
||||
else {
|
||||
CellAddress target(range.to().row() ? 0 : range.to().row() + 1, range.from().col());
|
||||
toStart = target.toString();
|
||||
target.setRow(target.row() + range.to().row() - range.from().row());
|
||||
target.setCol(target.col() + range.to().col() - range.from().col());
|
||||
toEnd = target.toString();
|
||||
}
|
||||
ui->btnDiscard->setDisabled(true);
|
||||
}
|
||||
else {
|
||||
ui->lineEditFromStart->setReadOnly(true);
|
||||
ui->lineEditFromEnd->setReadOnly(true);
|
||||
ui->checkBoxHREF->setChecked(type == PropertySheet::BindingHiddenRef);
|
||||
assert(pStart && pEnd);
|
||||
if (!pStart->hasComponent() && pStart->isDerivedFrom<StringExpression>()) {
|
||||
toStart = static_cast<StringExpression*>(pStart.get())->getText();
|
||||
}
|
||||
else {
|
||||
toStart = "=";
|
||||
toStart += pStart->toString();
|
||||
}
|
||||
if (!pEnd->hasComponent() && pEnd->isDerivedFrom<StringExpression>()) {
|
||||
toEnd = static_cast<StringExpression*>(pEnd.get())->getText();
|
||||
}
|
||||
else {
|
||||
toEnd = "=";
|
||||
toEnd += pEnd->toString();
|
||||
}
|
||||
}
|
||||
|
||||
ui->lineEditFromStart->setText(QString::fromLatin1(range.from().toString().c_str()));
|
||||
ui->lineEditFromEnd->setText(QString::fromLatin1(range.to().toString().c_str()));
|
||||
|
||||
ui->lineEditToStart->setDocumentObject(sheet, false);
|
||||
ui->lineEditToStart->setPrefix('=');
|
||||
ui->lineEditToEnd->setDocumentObject(sheet, false);
|
||||
ui->lineEditToEnd->setPrefix('=');
|
||||
|
||||
ui->lineEditToStart->setText(QLatin1String(toStart.c_str()));
|
||||
ui->lineEditToEnd->setText(QLatin1String(toEnd.c_str()));
|
||||
|
||||
ui->comboBox->addItem(
|
||||
QStringLiteral(". (%1)").arg(QString::fromUtf8(sheet->Label.getValue())),
|
||||
QByteArray("")
|
||||
);
|
||||
|
||||
App::DocumentObject* target = bindingTarget.getDocumentObject();
|
||||
for (auto obj : sheet->getDocument()->getObjectsOfType<Sheet>()) {
|
||||
if (obj == sheet) {
|
||||
continue;
|
||||
}
|
||||
QString label;
|
||||
if (obj->Label.getStrValue() != obj->getNameInDocument()) {
|
||||
label = QStringLiteral("%1 (%2)").arg(
|
||||
QString::fromLatin1(obj->getNameInDocument()),
|
||||
QString::fromUtf8(obj->Label.getValue())
|
||||
);
|
||||
}
|
||||
else {
|
||||
label = QLatin1String(obj->getNameInDocument());
|
||||
}
|
||||
ui->comboBox->addItem(label, QByteArray(obj->getNameInDocument()));
|
||||
if (obj == target) {
|
||||
ui->comboBox->setCurrentIndex(ui->comboBox->count() - 1);
|
||||
}
|
||||
}
|
||||
for (auto doc : GetApplication().getDocuments()) {
|
||||
if (doc == sheet->getDocument()) {
|
||||
continue;
|
||||
}
|
||||
for (auto obj : sheet->getDocument()->getObjectsOfType<Sheet>()) {
|
||||
if (obj == sheet) {
|
||||
continue;
|
||||
}
|
||||
std::string fullname = obj->getFullName();
|
||||
QString label;
|
||||
if (obj->Label.getStrValue() != obj->getNameInDocument()) {
|
||||
label = QStringLiteral("%1 (%2)").arg(
|
||||
QString::fromLatin1(fullname.c_str()),
|
||||
QString::fromUtf8(obj->Label.getValue())
|
||||
);
|
||||
}
|
||||
else {
|
||||
label = QLatin1String(fullname.c_str());
|
||||
}
|
||||
ui->comboBox->addItem(label, QByteArray(fullname.c_str()));
|
||||
if (obj == target) {
|
||||
ui->comboBox->setCurrentIndex(ui->comboBox->count() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
connect(ui->btnDiscard, &QPushButton::clicked, this, &DlgBindSheet::onDiscard);
|
||||
}
|
||||
|
||||
DlgBindSheet::~DlgBindSheet()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DlgBindSheet::accept()
|
||||
{
|
||||
bool commandActive = false;
|
||||
try {
|
||||
const char* ref = ui->comboBox->itemData(ui->comboBox->currentIndex())
|
||||
.toByteArray()
|
||||
.constData(); // clazy:exclude=returning-data-from-temporary
|
||||
auto obj = sheet;
|
||||
if (ref[0]) {
|
||||
const char* sep = strchr(ref, '#');
|
||||
if (sep) {
|
||||
std::string docname(ref, sep);
|
||||
auto doc = GetApplication().getDocument(docname.c_str());
|
||||
if (!doc) {
|
||||
FC_THROWM(Base::RuntimeError, "Cannot find document " << docname);
|
||||
}
|
||||
obj = freecad_cast<Sheet*>(doc->getObject(sep + 1));
|
||||
}
|
||||
else {
|
||||
obj = freecad_cast<Sheet*>(sheet->getDocument()->getObject(ref));
|
||||
}
|
||||
if (!obj) {
|
||||
FC_THROWM(Base::RuntimeError, "Cannot find Spreadsheet '" << ref << "'");
|
||||
}
|
||||
}
|
||||
|
||||
auto checkAddress = [](std::string& addr, CellAddress& cell, bool quote) {
|
||||
std::string copy(addr);
|
||||
boost::to_upper(copy);
|
||||
cell = App::stringToAddress(copy.c_str(), true);
|
||||
if (!cell.isValid()) {
|
||||
std::string msg("Invalid cell: ");
|
||||
msg += addr;
|
||||
throw Base::ValueError(msg.c_str());
|
||||
}
|
||||
if (quote) {
|
||||
addr = std::string("<<") + copy + ">>";
|
||||
}
|
||||
else {
|
||||
addr = std::move(copy);
|
||||
}
|
||||
};
|
||||
|
||||
CellAddress fromCellStart, fromCellEnd, toCellStart, toCellEnd;
|
||||
std::string fromStart(ui->lineEditFromStart->text().trimmed().toLatin1().constData());
|
||||
std::string fromEnd(ui->lineEditFromEnd->text().trimmed().toLatin1().constData());
|
||||
checkAddress(fromStart, fromCellStart, false);
|
||||
checkAddress(fromEnd, fromCellEnd, false);
|
||||
|
||||
std::string toStart(ui->lineEditToStart->text().trimmed().toLatin1().constData());
|
||||
if (boost::starts_with(toStart, "=")) {
|
||||
toStart.erase(toStart.begin());
|
||||
}
|
||||
else {
|
||||
checkAddress(toStart, toCellStart, true);
|
||||
}
|
||||
|
||||
std::string toEnd(ui->lineEditToEnd->text().trimmed().toLatin1().constData());
|
||||
if (boost::starts_with(toEnd, "=")) {
|
||||
toEnd.erase(toEnd.begin());
|
||||
}
|
||||
else {
|
||||
checkAddress(toEnd, toCellEnd, true);
|
||||
if (toCellStart.isValid()) {
|
||||
App::Range fromRange(fromCellStart, fromCellEnd, true);
|
||||
App::Range toRange(toCellStart, toCellEnd, true);
|
||||
if (fromRange.size() != toRange.size()) {
|
||||
auto res = QMessageBox::warning(
|
||||
this,
|
||||
tr("Bind Cells"),
|
||||
tr("Source and target cell count mismatch. "
|
||||
"Partial binding may still work.\n\n"
|
||||
"Continue?"),
|
||||
QMessageBox::Yes | QMessageBox::No
|
||||
);
|
||||
if (res == QMessageBox::No) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Bind cells"));
|
||||
commandActive = true;
|
||||
|
||||
if (ui->checkBoxHREF->isChecked()) {
|
||||
Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.Bind.%s.%s', None)", fromStart, fromEnd);
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setExpression('.cells.BindHiddenRef.%s.%s', 'hiddenref(tuple(%s.cells, %s, %s))')",
|
||||
fromStart,
|
||||
fromEnd,
|
||||
ref,
|
||||
toStart,
|
||||
toEnd
|
||||
);
|
||||
}
|
||||
else {
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setExpression('.cells.BindHiddenRef.%s.%s', None)",
|
||||
fromStart,
|
||||
fromEnd
|
||||
);
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setExpression('.cells.Bind.%s.%s', 'tuple(%s.cells, %s, %s)')",
|
||||
fromStart,
|
||||
fromEnd,
|
||||
ref,
|
||||
toStart,
|
||||
toEnd
|
||||
);
|
||||
}
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
sheet->getDocument()->commitTransaction();
|
||||
QDialog::accept();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
e.reportException();
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Bind Spreadsheet Cells"),
|
||||
tr("Error:\n") + QString::fromUtf8(e.what())
|
||||
);
|
||||
if (commandActive) {
|
||||
sheet->getDocument()->abortTransaction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DlgBindSheet::onDiscard()
|
||||
{
|
||||
try {
|
||||
std::string fromStart(ui->lineEditFromStart->text().trimmed().toLatin1().constData());
|
||||
std::string fromEnd(ui->lineEditFromEnd->text().trimmed().toLatin1().constData());
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Unbind cells"));
|
||||
Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.Bind.%s.%s', None)", fromStart, fromEnd);
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setExpression('.cells.BindHiddenRef.%s.%s', None)",
|
||||
fromStart,
|
||||
fromEnd
|
||||
);
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
sheet->getDocument()->commitTransaction();
|
||||
reject();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
e.reportException();
|
||||
QMessageBox::critical(this, tr("Unbind Cells"), QString::fromUtf8(e.what()));
|
||||
sheet->getDocument()->abortTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_DlgBindSheet.cpp"
|
||||
61
src/Mod/Spreadsheet/Gui/DlgBindSheet.h
Normal file
@@ -0,0 +1,61 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2019 Zheng, Lei (realthunder) <realthunder.dev@gmail.com>*
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class DlgBindSheet;
|
||||
}
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class DlgBindSheet: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DlgBindSheet(
|
||||
Spreadsheet::Sheet* sheet,
|
||||
const std::vector<App::Range>& range,
|
||||
QWidget* parent = nullptr
|
||||
);
|
||||
~DlgBindSheet() override;
|
||||
|
||||
void accept() override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void onDiscard();
|
||||
|
||||
private:
|
||||
Spreadsheet::Sheet* sheet;
|
||||
App::Range range;
|
||||
Ui::DlgBindSheet* ui;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
218
src/Mod/Spreadsheet/Gui/DlgBindSheet.ui
Normal file
@@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DlgBindSheet</class>
|
||||
<widget class="QDialog" name="DlgBindSheet">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>257</width>
|
||||
<height>167</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Bind Spreadsheet Cells</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>First cell in range</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Last cell in range</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Bind cells</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditFromStart">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Start cell address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="lineEditFromEnd">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>End cell address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>To cells</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::ExpressionLineEdit" name="lineEditToStart">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Start cell address to bind to.
|
||||
Type '=' if you want to use an expression.
|
||||
The expression must evaluate to a string of some cell address.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::ExpressionLineEdit" name="lineEditToEnd">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>End cell address to bind to.
|
||||
Type '=' to use an expression.
|
||||
The expression must evaluate to a string of some cell address.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="toolTip">
|
||||
<string>Which spread sheet to bind to</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Sheet</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxHREF">
|
||||
<property name="toolTip">
|
||||
<string>The dependency with the referenced spreadsheet will
|
||||
be hidden to the dependency checking.
|
||||
Useful to avoid cyclic dependencies, but use with caution!</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide dependency of binding</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDiscard">
|
||||
<property name="text">
|
||||
<string>Unbind</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnCancel">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnOk">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::ExpressionLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header location="global">Gui/ExpressionCompleter.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>lineEditFromStart</tabstop>
|
||||
<tabstop>lineEditFromEnd</tabstop>
|
||||
<tabstop>lineEditToStart</tabstop>
|
||||
<tabstop>lineEditToEnd</tabstop>
|
||||
<tabstop>comboBox</tabstop>
|
||||
<tabstop>checkBoxHREF</tabstop>
|
||||
<tabstop>btnOk</tabstop>
|
||||
<tabstop>btnCancel</tabstop>
|
||||
<tabstop>btnDiscard</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>btnOk</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DlgBindSheet</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>334</x>
|
||||
<y>152</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>193</x>
|
||||
<y>87</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>btnCancel</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DlgBindSheet</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>243</x>
|
||||
<y>152</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>193</x>
|
||||
<y>87</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
294
src/Mod/Spreadsheet/Gui/DlgSettings.ui
Normal file
@@ -0,0 +1,294 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SpreadsheetGui::DlgSettings</class>
|
||||
<widget class="QWidget" name="SpreadsheetGui::DlgSettings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>392</width>
|
||||
<height>282</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Spreadsheet</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox1">
|
||||
<property name="title">
|
||||
<string>Display Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<widget class="Gui::PrefCheckBox" name="checkBoxShowAlias">
|
||||
<property name="toolTip">
|
||||
<string>Uses the custom presentation to display cell string</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show alias in cell with format</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>showAliasName</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Spreadsheet</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="Gui::PrefSpinBox" name="dZLSpinBox">
|
||||
<property name="toolTip">
|
||||
<string>Defines a default zoom level for table view from 60% to 160%</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>%</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>160</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DefaultZoomLevel</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Spreadsheet</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="dZLLabel">
|
||||
<property name="text">
|
||||
<string>Default zoom level</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="Gui::PrefLineEdit" name="formatString">
|
||||
<property name="toolTip">
|
||||
<string>The format of the custom cell string presentation.
|
||||
Defaults to: %V = %A
|
||||
|
||||
%A - alias name
|
||||
%V - cell value</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">%V = %A</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>DisplayAliasFormatString</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Spreadsheet</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer1">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Import/Export Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="textLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delimiter character</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="Gui::PrefComboBox" name="delimiterComboBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Character to use as field delimiter. Default is tab, but also commonly used are commas (,) and semicolons (;). Select from the list or enter your own in the field. Must be a single character or the words <span style=" font-style:italic;">tab</span>, <span style=" font-style:italic;">comma</span>, or <span style=" font-style:italic;">semicolon</span>.</p></body></html></string>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<string notr="true">tab</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ImportExportDelimiter</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Spreadsheet</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>tab</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">;</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string notr="true">,</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="textLabel2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Quote character</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="Gui::PrefLineEdit" name="quoteCharLineEdit">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Character used to delimit strings, typically is single quote (') or double quote (&quot;). Must be a single character.</p></body></html></string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">"</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ImportExportQuoteCharacter</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Spreadsheet</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="textLabel3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Escape character</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::PrefLineEdit" name="escapeCharLineEdit">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Escape character, typically the backslash (\), used to indicate special unprintable characters, e.g. \t = tab. Must be a single character.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">\</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ImportExportEscapeCharacter</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Spreadsheet</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>delimiterComboBox</tabstop>
|
||||
<tabstop>quoteCharLineEdit</tabstop>
|
||||
<tabstop>escapeCharLineEdit</tabstop>
|
||||
<tabstop>dZLSpinBox</tabstop>
|
||||
<tabstop>checkBoxShowAlias</tabstop>
|
||||
<tabstop>formatString</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
118
src/Mod/Spreadsheet/Gui/DlgSettingsImp.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <Gui/Application.h>
|
||||
|
||||
#include "DlgSettingsImp.h"
|
||||
#include "ui_DlgSettings.h"
|
||||
|
||||
|
||||
using namespace SpreadsheetGui;
|
||||
|
||||
/* TRANSLATOR SpreadsheetGui::DlgSettingsImp */
|
||||
|
||||
DlgSettingsImp::DlgSettingsImp(QWidget* parent)
|
||||
: PreferencePage(parent)
|
||||
, ui(new Ui_DlgSettings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
DlgSettingsImp::~DlgSettingsImp() = default;
|
||||
|
||||
void DlgSettingsImp::saveSettings()
|
||||
{
|
||||
|
||||
/** use whatever the user has entered here
|
||||
* we'll check for validity during import/export
|
||||
*/
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Mod/Spreadsheet"
|
||||
);
|
||||
QString delimiter = ui->delimiterComboBox->currentText();
|
||||
hGrp->SetASCII("ImportExportDelimiter", delimiter.toStdString().c_str());
|
||||
ui->quoteCharLineEdit->onSave();
|
||||
ui->escapeCharLineEdit->onSave();
|
||||
ui->formatString->onSave();
|
||||
ui->dZLSpinBox->onSave();
|
||||
ui->checkBoxShowAlias->onSave();
|
||||
}
|
||||
|
||||
void DlgSettingsImp::loadSettings()
|
||||
{
|
||||
/** items "tab", ";", and "," have already been added to the combo box in the .ui file
|
||||
* we'll recognize a few tokens: comma, semicolon, tab, and \t
|
||||
*/
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Mod/Spreadsheet"
|
||||
);
|
||||
QString delimiter = QString::fromStdString(hGrp->GetASCII("ImportExportDelimiter", "tab"));
|
||||
int idx = ui->delimiterComboBox->findText(delimiter, Qt::MatchFixedString);
|
||||
if (idx != -1) {
|
||||
ui->delimiterComboBox->setCurrentIndex(idx);
|
||||
}
|
||||
else if (delimiter.compare(QLatin1String("\\t"), Qt::CaseInsensitive) == 0) {
|
||||
idx = ui->delimiterComboBox->findText(QLatin1String("tab"), Qt::MatchFixedString);
|
||||
ui->delimiterComboBox->setCurrentIndex(idx);
|
||||
}
|
||||
else if (delimiter.compare(QLatin1String("semicolon"), Qt::CaseInsensitive) == 0) {
|
||||
idx = ui->delimiterComboBox->findText(QLatin1String(";"), Qt::MatchFixedString);
|
||||
ui->delimiterComboBox->setCurrentIndex(idx);
|
||||
}
|
||||
else if (delimiter.compare(QLatin1String("comma"), Qt::CaseInsensitive) == 0) {
|
||||
idx = ui->delimiterComboBox->findText(QLatin1String(","), Qt::MatchFixedString);
|
||||
ui->delimiterComboBox->setCurrentIndex(idx);
|
||||
}
|
||||
else {
|
||||
ui->delimiterComboBox->addItem(delimiter);
|
||||
idx = ui->delimiterComboBox->findText(delimiter, Qt::MatchFixedString);
|
||||
ui->delimiterComboBox->setCurrentIndex(idx);
|
||||
}
|
||||
|
||||
ui->quoteCharLineEdit->onRestore();
|
||||
ui->escapeCharLineEdit->onRestore();
|
||||
ui->formatString->onRestore();
|
||||
ui->dZLSpinBox->onRestore();
|
||||
ui->checkBoxShowAlias->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the strings of the subwidgets using the current language.
|
||||
*/
|
||||
void DlgSettingsImp::changeEvent(QEvent* e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_DlgSettingsImp.cpp"
|
||||
57
src/Mod/Spreadsheet/Gui/DlgSettingsImp.h
Normal file
@@ -0,0 +1,57 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2021 Mark Ganson <TheMarkster> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
class Ui_DlgSettings;
|
||||
|
||||
/**
|
||||
* The DlgSettingsImp class implements a preference page to change settings
|
||||
* for the Spreadsheet workbench.
|
||||
* /author TheMarkster, based on work by Jürgen Riegel
|
||||
*/
|
||||
class DlgSettingsImp: public Gui::Dialog::PreferencePage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DlgSettingsImp(QWidget* parent = nullptr);
|
||||
~DlgSettingsImp() override;
|
||||
|
||||
protected:
|
||||
void saveSettings() override;
|
||||
void loadSettings() override;
|
||||
void changeEvent(QEvent* e) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui_DlgSettings> ui;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
355
src/Mod/Spreadsheet/Gui/DlgSheetConf.cpp
Normal file
@@ -0,0 +1,355 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2019 Zheng, Lei (realthunder) <realthunder.dev@gmail.com>*
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/ExpressionParser.h>
|
||||
#include <App/Range.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/CommandT.h>
|
||||
|
||||
#include "DlgSheetConf.h"
|
||||
#include "ui_DlgSheetConf.h"
|
||||
|
||||
|
||||
using namespace App;
|
||||
using namespace Spreadsheet;
|
||||
using namespace SpreadsheetGui;
|
||||
|
||||
DlgSheetConf::DlgSheetConf(Sheet* sheet, Range range, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, sheet(sheet)
|
||||
, ui(new Ui::DlgSheetConf)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
if (range.colCount() == 1) {
|
||||
auto to = range.to();
|
||||
to.setCol(CellAddress::MAX_COLUMNS - 1);
|
||||
range = Range(range.from(), to);
|
||||
}
|
||||
|
||||
ui->lineEditStart->setText(QString::fromLatin1(range.from().toString().c_str()));
|
||||
ui->lineEditEnd->setText(QString::fromLatin1(range.to().toString().c_str()));
|
||||
|
||||
ui->lineEditProp->setDocumentObject(sheet, false);
|
||||
|
||||
connect(ui->btnDiscard, &QPushButton::clicked, this, &DlgSheetConf::onDiscard);
|
||||
|
||||
CellAddress from, to;
|
||||
std::string rangeConf;
|
||||
ObjectIdentifier path;
|
||||
auto prop = prepare(from, to, rangeConf, path, true);
|
||||
if (prop) {
|
||||
ui->lineEditProp->setText(QString::fromUtf8(path.toString().c_str()));
|
||||
if (auto group = prop->getGroup()) {
|
||||
ui->lineEditGroup->setText(QString::fromUtf8(group));
|
||||
}
|
||||
}
|
||||
|
||||
ui->lineEditStart->setText(QString::fromLatin1(from.toString().c_str()));
|
||||
ui->lineEditEnd->setText(QString::fromLatin1(to.toString().c_str()));
|
||||
}
|
||||
|
||||
DlgSheetConf::~DlgSheetConf()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
App::Property* DlgSheetConf::prepare(
|
||||
CellAddress& from,
|
||||
CellAddress& to,
|
||||
std::string& rangeConf,
|
||||
ObjectIdentifier& path,
|
||||
bool init
|
||||
)
|
||||
{
|
||||
from = sheet->getCellAddress(ui->lineEditStart->text().trimmed().toLatin1().constData());
|
||||
to = sheet->getCellAddress(ui->lineEditEnd->text().trimmed().toLatin1().constData());
|
||||
|
||||
if (from.col() >= to.col()) {
|
||||
FC_THROWM(Base::RuntimeError, "Invalid cell range");
|
||||
}
|
||||
|
||||
// Setup row as parameters, and column as configurations
|
||||
to.setRow(from.row());
|
||||
|
||||
CellAddress confFrom(from.row() + 1, from.col());
|
||||
rangeConf = confFrom.toString();
|
||||
// rangeConf is supposed to hold the range of string cells, each
|
||||
// holding the name of a configuration. The '|' below indicates a
|
||||
// growing but continuous column, so that we can auto include new
|
||||
// configurations. We'll bind the string list to a
|
||||
// PropertyEnumeration for dynamical switching of the
|
||||
// configuration.
|
||||
rangeConf += ":|";
|
||||
|
||||
if (!init) {
|
||||
std::string exprTxt(ui->lineEditProp->text().trimmed().toUtf8().constData());
|
||||
ExpressionPtr expr;
|
||||
try {
|
||||
expr = App::Expression::parse(sheet, exprTxt);
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
e.reportException();
|
||||
FC_THROWM(Base::RuntimeError, "Failed to parse expression for property");
|
||||
}
|
||||
if (expr->hasComponent() || !expr->isDerivedFrom<App::VariableExpression>()) {
|
||||
FC_THROWM(Base::RuntimeError, "Invalid property expression: " << expr->toString());
|
||||
}
|
||||
|
||||
path = static_cast<App::VariableExpression*>(expr.get())->getPath();
|
||||
auto obj = path.getDocumentObject();
|
||||
if (!obj) {
|
||||
FC_THROWM(Base::RuntimeError, "Invalid object referenced in: " << expr->toString());
|
||||
}
|
||||
|
||||
int pseudoType;
|
||||
auto prop = path.getProperty(&pseudoType);
|
||||
if (pseudoType
|
||||
|| (prop
|
||||
&& (!prop->isDerivedFrom<App::PropertyEnumeration>()
|
||||
|| !prop->testStatus(App::Property::PropDynamic)))) {
|
||||
FC_THROWM(Base::RuntimeError, "Invalid property referenced in: " << expr->toString());
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
|
||||
Cell* cell = sheet->getCell(from);
|
||||
if (cell && cell->getExpression()) {
|
||||
auto expr = cell->getExpression();
|
||||
if (expr->isDerivedFrom<FunctionExpression>()) {
|
||||
auto fexpr = freecad_cast<FunctionExpression*>(cell->getExpression());
|
||||
if (fexpr
|
||||
&& (fexpr->getFunction() == FunctionExpression::HREF
|
||||
|| fexpr->getFunction() == FunctionExpression::HIDDENREF)
|
||||
&& fexpr->getArgs().size() == 1) {
|
||||
expr = fexpr->getArgs().front();
|
||||
}
|
||||
}
|
||||
auto vexpr = freecad_cast<VariableExpression*>(expr);
|
||||
if (vexpr) {
|
||||
auto prop = freecad_cast<PropertyEnumeration*>(vexpr->getPath().getProperty());
|
||||
if (prop) {
|
||||
auto obj = freecad_cast<DocumentObject*>(prop->getContainer());
|
||||
if (obj && prop->hasName()) {
|
||||
path = ObjectIdentifier(sheet);
|
||||
path.setDocumentObjectName(obj, true);
|
||||
path << ObjectIdentifier::SimpleComponent(prop->getName());
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void DlgSheetConf::accept()
|
||||
{
|
||||
bool commandActive = false;
|
||||
try {
|
||||
std::string rangeConf;
|
||||
CellAddress from, to;
|
||||
ObjectIdentifier path;
|
||||
App::Property* prop = prepare(from, to, rangeConf, path, false);
|
||||
|
||||
Range range(from, to);
|
||||
|
||||
// check rangeConf, make sure it is a sequence of string only
|
||||
Range r(sheet->getRange(rangeConf.c_str()));
|
||||
do {
|
||||
auto cell = sheet->getCell(*r);
|
||||
if (cell && cell->getExpression()) {
|
||||
ExpressionPtr expr(cell->getExpression()->eval());
|
||||
if (expr->isDerivedFrom<StringExpression>()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
FC_THROWM(
|
||||
Base::RuntimeError,
|
||||
"Expects cell " << r.address() << " evaluates to string.\n"
|
||||
<< rangeConf << " is supposed to contain a list of configuration names"
|
||||
);
|
||||
} while (r.next());
|
||||
|
||||
std::string exprTxt(ui->lineEditProp->text().trimmed().toUtf8().constData());
|
||||
App::ExpressionPtr expr(App::Expression::parse(sheet, exprTxt));
|
||||
if (expr->hasComponent() || !expr->isDerivedFrom<App::VariableExpression>()) {
|
||||
FC_THROWM(Base::RuntimeError, "Invalid property expression: " << expr->toString());
|
||||
}
|
||||
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Setup conf table"));
|
||||
commandActive = true;
|
||||
|
||||
// unbind any previous binding
|
||||
int count = range.rowCount() * range.colCount();
|
||||
for (int i = 0; i < count; ++i) {
|
||||
auto r = range;
|
||||
auto binding = sheet->getCellBinding(r);
|
||||
if (!binding) {
|
||||
break;
|
||||
}
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setExpression('.cells.%s.%s.%s', None)",
|
||||
binding == PropertySheet::BindingNormal ? "Bind" : "BindHiddenRef",
|
||||
r.from().toString(),
|
||||
r.to().toString()
|
||||
);
|
||||
}
|
||||
|
||||
auto obj = path.getDocumentObject();
|
||||
if (!obj) {
|
||||
FC_THROWM(Base::RuntimeError, "Object not found");
|
||||
}
|
||||
|
||||
// Add a dynamic PropertyEnumeration for user to switch the configuration
|
||||
std::string propName = path.getPropertyName();
|
||||
QString groupName = ui->lineEditGroup->text().trimmed();
|
||||
if (!prop) {
|
||||
prop = obj->addDynamicProperty(
|
||||
"App::PropertyEnumeration",
|
||||
propName.c_str(),
|
||||
groupName.toUtf8().constData()
|
||||
);
|
||||
}
|
||||
else if (groupName.size()) {
|
||||
obj->changeDynamicProperty(prop, groupName.toUtf8().constData(), nullptr);
|
||||
}
|
||||
prop->setStatus(App::Property::CopyOnChange, true);
|
||||
|
||||
// Bind the enumeration items to the column of configuration names
|
||||
Gui::cmdAppObjectArgs(
|
||||
obj,
|
||||
"setExpression('%s.Enum', '%s.cells[<<%s>>]')",
|
||||
propName,
|
||||
sheet->getFullName(),
|
||||
rangeConf
|
||||
);
|
||||
|
||||
Gui::cmdAppObjectArgs(obj, "recompute()");
|
||||
|
||||
// Bind the first cell to string value of the PropertyEnumeration. We
|
||||
// could have just bind the entire row as below, but binding the first
|
||||
// cell separately using a simpler expression can make it easy for us
|
||||
// to extract the name of the PropertyEnumeration for editing or unsetup.
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"set('%s', '=hiddenref(%s.String)')",
|
||||
from.toString(CellAddress::Cell::ShowRowColumn),
|
||||
prop->getFullName()
|
||||
);
|
||||
|
||||
// Adjust the range to skip the first cell
|
||||
range = Range(from.row(), from.col() + 1, to.row(), to.col());
|
||||
|
||||
// Formulate expression to calculate the row binding using
|
||||
// PropertyEnumeration
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setExpression('.cells.Bind.%s.%s', "
|
||||
"'tuple(.cells, <<%s>> + str(hiddenref(%s)+%d), <<%s>> + str(hiddenref(%s)+%d))')",
|
||||
range.from().toString(CellAddress::Cell::ShowRowColumn),
|
||||
range.to().toString(CellAddress::Cell::ShowRowColumn),
|
||||
range.from().toString(CellAddress::Cell::ShowColumn),
|
||||
prop->getFullName(),
|
||||
from.row() + 2,
|
||||
range.to().toString(CellAddress::Cell::ShowColumn),
|
||||
prop->getFullName(),
|
||||
from.row() + 2
|
||||
);
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
sheet->getDocument()->commitTransaction();
|
||||
QDialog::accept();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
e.reportException();
|
||||
QMessageBox::critical(this, tr("Setup Configuration Table"), QString::fromUtf8(e.what()));
|
||||
if (commandActive) {
|
||||
sheet->getDocument()->abortTransaction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DlgSheetConf::onDiscard()
|
||||
{
|
||||
bool commandActive = false;
|
||||
try {
|
||||
std::string rangeConf;
|
||||
CellAddress from, to;
|
||||
ObjectIdentifier path;
|
||||
auto prop = prepare(from, to, rangeConf, path, true);
|
||||
|
||||
Range range(from, to);
|
||||
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Unsetup conf table"));
|
||||
commandActive = true;
|
||||
|
||||
// unbind any previous binding
|
||||
int count = range.rowCount() * range.colCount();
|
||||
for (int i = 0; i < count; ++i) {
|
||||
auto r = range;
|
||||
auto binding = sheet->getCellBinding(r);
|
||||
if (!binding) {
|
||||
break;
|
||||
}
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setExpression('.cells.%s.%s.%s', None)",
|
||||
binding == PropertySheet::BindingNormal ? "Bind" : "BindHiddenRef",
|
||||
r.from().toString(),
|
||||
r.to().toString()
|
||||
);
|
||||
}
|
||||
|
||||
Gui::cmdAppObjectArgs(sheet, "clear('%s')", from.toString(CellAddress::Cell::ShowRowColumn));
|
||||
|
||||
if (prop && prop->getName()) {
|
||||
auto obj = path.getDocumentObject();
|
||||
if (!obj) {
|
||||
FC_THROWM(Base::RuntimeError, "Object not found");
|
||||
}
|
||||
Gui::cmdAppObjectArgs(obj, "setExpression('%s.Enum', None)", prop->getName());
|
||||
if (prop->testStatus(Property::PropDynamic)) {
|
||||
Gui::cmdAppObjectArgs(obj, "removeProperty('%s')", prop->getName());
|
||||
}
|
||||
}
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
sheet->getDocument()->commitTransaction();
|
||||
QDialog::accept();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
e.reportException();
|
||||
QMessageBox::critical(this, tr("Unsetup Configuration Table"), QString::fromUtf8(e.what()));
|
||||
if (commandActive) {
|
||||
sheet->getDocument()->abortTransaction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_DlgSheetConf.cpp"
|
||||
64
src/Mod/Spreadsheet/Gui/DlgSheetConf.h
Normal file
@@ -0,0 +1,64 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2019 Zheng, Lei (realthunder) <realthunder.dev@gmail.com>*
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class DlgSheetConf;
|
||||
}
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class DlgSheetConf: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DlgSheetConf(Spreadsheet::Sheet* sheet, App::Range range, QWidget* parent = nullptr);
|
||||
~DlgSheetConf() override;
|
||||
|
||||
void accept() override;
|
||||
|
||||
App::Property* prepare(
|
||||
App::CellAddress& from,
|
||||
App::CellAddress& to,
|
||||
std::string& rangeConf,
|
||||
App::ObjectIdentifier& path,
|
||||
bool init
|
||||
);
|
||||
|
||||
public Q_SLOTS:
|
||||
void onDiscard();
|
||||
|
||||
private:
|
||||
Spreadsheet::Sheet* sheet;
|
||||
Ui::DlgSheetConf* ui;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
155
src/Mod/Spreadsheet/Gui/DlgSheetConf.ui
Normal file
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DlgSheetConf</class>
|
||||
<widget class="QDialog" name="DlgSheetConf">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>366</width>
|
||||
<height>146</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Setup Configuration Table</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Cell range</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditStart">
|
||||
<property name="toolTip">
|
||||
<string>Starting cell address.
|
||||
|
||||
The first column of the range is assumed to contain a list of configuration
|
||||
names, which will be used to generate a string list and bind to the given
|
||||
property for user to dynamically switch configuration.
|
||||
|
||||
The first row of the range will be bound to whatever row (indirectly) selected
|
||||
by that property.
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="lineEditEnd">
|
||||
<property name="toolTip">
|
||||
<string>Ending cell address.
|
||||
|
||||
The first column of the range is assumed to contain a list of configuration
|
||||
names, which will be used to generate a string list and bind to the given
|
||||
property for user to dynamically switch configuration.
|
||||
|
||||
The first row of the range will be bound to whatever row (indirectly) selected
|
||||
by that property.
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Property</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="Gui::ExpressionLineEdit" name="lineEditProp">
|
||||
<property name="toolTip">
|
||||
<string>Type in an expression to specify the object and property name to dynamically
|
||||
switch the design configuration. The property will be created if not exist.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Group</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="lineEditGroup">
|
||||
<property name="toolTip">
|
||||
<string>Optional property group name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDiscard">
|
||||
<property name="text">
|
||||
<string>Unsetup</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="bthCancel">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnOk">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::ExpressionLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header location="global">Gui/ExpressionCompleter.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>btnOk</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DlgSheetConf</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>313</x>
|
||||
<y>122</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>182</x>
|
||||
<y>72</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>bthCancel</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DlgSheetConf</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>222</x>
|
||||
<y>122</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>182</x>
|
||||
<y>72</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
166
src/Mod/Spreadsheet/Gui/LineEdit.cpp
Normal file
@@ -0,0 +1,166 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include <QEvent>
|
||||
#include <QKeyEvent>
|
||||
#include <QGraphicsProxyWidget>
|
||||
|
||||
#include "LineEdit.h"
|
||||
#include <Gui/MainWindow.h>
|
||||
#include "ZoomableView.h"
|
||||
|
||||
|
||||
using namespace SpreadsheetGui;
|
||||
|
||||
LineEdit::LineEdit(QWidget* parent)
|
||||
: Gui::ExpressionLineEdit(parent, false, '=', true)
|
||||
, lastKeyPressed(0)
|
||||
{
|
||||
setFocusPolicy(Qt::FocusPolicy::ClickFocus);
|
||||
}
|
||||
|
||||
void LineEdit::setDocumentObject(const App::DocumentObject* currentDocObj, bool checkInList)
|
||||
{
|
||||
ExpressionLineEdit::setDocumentObject(currentDocObj, checkInList);
|
||||
|
||||
/* The code below is supposed to fix the input of an expression and to make the popup
|
||||
* functional. The input seems to be broken because of installed event filters. My solution is
|
||||
* to re-add the widget into the scene. Only a parentless widget can be added to the scene.
|
||||
* Making a widget parentless makes it lose its windowFlags, even if it is added to the scene.
|
||||
* So, the algorithm is to obtain globalPos, then to make the widget parentless,
|
||||
* to add it to the scene, setting the globalPos after. */
|
||||
|
||||
QPointer<Gui::MDIView> active_view = Gui::MainWindow::getInstance()->activeWindow();
|
||||
if (!active_view) {
|
||||
Base::Console().developerWarning(
|
||||
"LineEdit::setDocumentObject",
|
||||
"The active view is not a spreadsheet"
|
||||
);
|
||||
return;
|
||||
}
|
||||
QPointer<ZoomableView> zv = active_view->findChild<ZoomableView*>();
|
||||
if (!zv) {
|
||||
Base::Console().developerWarning("LineEdit::setDocumentObject", "ZoomableView not found");
|
||||
return;
|
||||
}
|
||||
|
||||
auto getPos = [this]() {
|
||||
return this->mapToGlobal(QPoint {0, 0});
|
||||
};
|
||||
const QPoint old_pos = getPos();
|
||||
|
||||
auto xpopup = new XListView(this);
|
||||
getCompleter()->setPopup(xpopup);
|
||||
setParent(nullptr);
|
||||
QGraphicsProxyWidget* proxy_lineedit = zv->scene()->addWidget(this);
|
||||
|
||||
const QPoint new_pos = getPos();
|
||||
const QPoint shift = old_pos - new_pos;
|
||||
const qreal scale_factor = static_cast<qreal>(zv->zoomLevel()) / 100.0;
|
||||
const qreal shift_x = static_cast<qreal>(shift.x()) / scale_factor,
|
||||
shift_y = static_cast<qreal>(shift.y()) / scale_factor;
|
||||
|
||||
QTransform trans = proxy_lineedit->transform();
|
||||
proxy_lineedit->setTransform(trans.translate(shift_x, shift_y));
|
||||
|
||||
|
||||
auto getPopupPos = [proxy_lineedit, zv]() {
|
||||
const QPointF scene_pos = proxy_lineedit->mapToScene(
|
||||
proxy_lineedit->boundingRect().bottomLeft()
|
||||
);
|
||||
const QPoint view_pos = zv->mapFromScene(scene_pos);
|
||||
const QPoint global_pos = zv->viewport()->mapToGlobal(view_pos);
|
||||
|
||||
return global_pos;
|
||||
};
|
||||
|
||||
auto getPopupWidth = [this, zv]() {
|
||||
const int zoom_level = zv->zoomLevel(), editors_width = this->width();
|
||||
|
||||
return qMax(editors_width * zoom_level / 100, editors_width);
|
||||
};
|
||||
|
||||
auto updatePopupGeom = [getPopupPos, getPopupWidth, xpopup]() {
|
||||
const QPoint new_pos = getPopupPos();
|
||||
xpopup->setGeometry(new_pos.x(), new_pos.y(), getPopupWidth(), xpopup->height());
|
||||
};
|
||||
|
||||
QObject::connect(xpopup, &XListView::geometryChanged, this, updatePopupGeom);
|
||||
}
|
||||
|
||||
void LineEdit::focusOutEvent(QFocusEvent* event)
|
||||
{
|
||||
if (lastKeyPressed) {
|
||||
Q_EMIT finishedWithKey(lastKeyPressed, lastModifiers);
|
||||
}
|
||||
|
||||
Gui::ExpressionLineEdit::focusOutEvent(event);
|
||||
}
|
||||
|
||||
void LineEdit::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
if (event->key() == Qt::Key::Key_Tab && completerActive()) {
|
||||
hideCompleter();
|
||||
Gui::ExpressionLineEdit::keyPressEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
lastKeyPressed = event->key();
|
||||
lastModifiers = event->modifiers();
|
||||
|
||||
if ((lastKeyPressed == Qt::Key::Key_Down || lastKeyPressed == Qt::Key::Key_Up)
|
||||
&& completerActive()) {
|
||||
auto kevent = new QKeyEvent(QEvent::KeyPress, lastKeyPressed, Qt::NoModifier);
|
||||
QCoreApplication::postEvent(getCompleter()->popup(), kevent);
|
||||
}
|
||||
|
||||
Gui::ExpressionLineEdit::keyPressEvent(event);
|
||||
}
|
||||
|
||||
XListView::XListView(LineEdit* parent)
|
||||
: QListView(parent)
|
||||
{
|
||||
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
||||
setAttribute(Qt::WidgetAttribute::WA_ShowWithoutActivating);
|
||||
}
|
||||
|
||||
void XListView::resizeEvent(QResizeEvent* event)
|
||||
{
|
||||
Q_EMIT geometryChanged();
|
||||
QListView::resizeEvent(event);
|
||||
}
|
||||
|
||||
void XListView::updateGeometries()
|
||||
{
|
||||
QListView::updateGeometries();
|
||||
Q_EMIT geometryChanged();
|
||||
}
|
||||
|
||||
#include "moc_LineEdit.cpp"
|
||||
70
src/Mod/Spreadsheet/Gui/LineEdit.h
Normal file
@@ -0,0 +1,70 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Gui/ExpressionCompleter.h>
|
||||
#include <QListView>
|
||||
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class LineEdit: public Gui::ExpressionLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LineEdit(QWidget* parent = nullptr);
|
||||
void setDocumentObject(const App::DocumentObject* currentDocObj, bool checkInList = true);
|
||||
|
||||
Q_SIGNALS:
|
||||
void finishedWithKey(int key, Qt::KeyboardModifiers modifiers);
|
||||
|
||||
private:
|
||||
int lastKeyPressed;
|
||||
Qt::KeyboardModifiers lastModifiers;
|
||||
|
||||
protected:
|
||||
void focusOutEvent(QFocusEvent* event) override;
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
};
|
||||
|
||||
/* QCompleter uses a parentless QListView as a popup, whose geometry
|
||||
* is corrected using its own algorithm, which does not take into account QGraphicsScene,
|
||||
* therefore we have to use our own widget to adjust the geometry. */
|
||||
class XListView: public QListView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit XListView(LineEdit* parent);
|
||||
|
||||
Q_SIGNALS:
|
||||
void geometryChanged(void);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
void updateGeometries(void) override;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
42
src/Mod/Spreadsheet/Gui/PreCompiled.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
// standard
|
||||
#include <cmath>
|
||||
|
||||
// STL
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
// Qt Toolkit
|
||||
#include <Gui/QtAll.h>
|
||||
350
src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp
Normal file
@@ -0,0 +1,350 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/ExpressionParser.h>
|
||||
#include <App/Range.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/CommandT.h>
|
||||
|
||||
#include "PropertiesDialog.h"
|
||||
#include "ui_PropertiesDialog.h"
|
||||
|
||||
|
||||
using namespace App;
|
||||
using namespace Spreadsheet;
|
||||
using namespace SpreadsheetGui;
|
||||
|
||||
PropertiesDialog::PropertiesDialog(Sheet* _sheet, const std::vector<Range>& _ranges, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, sheet(_sheet)
|
||||
, ranges(_ranges)
|
||||
, ui(new Ui::PropertiesDialog)
|
||||
, alignment(0)
|
||||
, displayUnitOk(true)
|
||||
, aliasOk(true)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->foregroundColor->setStandardColors();
|
||||
ui->backgroundColor->setStandardColors();
|
||||
|
||||
assert(ranges.size() > 0);
|
||||
Range range = ranges[0];
|
||||
|
||||
Cell* cell = sheet->getNewCell(*range);
|
||||
|
||||
assert(cell);
|
||||
|
||||
(void)cell->getForeground(foregroundColor);
|
||||
(void)cell->getBackground(backgroundColor);
|
||||
(void)cell->getAlignment(alignment);
|
||||
(void)cell->getStyle(style);
|
||||
(void)cell->getDisplayUnit(displayUnit);
|
||||
(void)cell->getAlias(alias);
|
||||
|
||||
orgForegroundColor = foregroundColor;
|
||||
orgBackgroundColor = backgroundColor;
|
||||
orgAlignment = alignment;
|
||||
orgStyle = style;
|
||||
orgDisplayUnit = displayUnit;
|
||||
orgAlias = alias;
|
||||
|
||||
ui->foregroundColor->setCurrentColor(
|
||||
QColor::fromRgbF(foregroundColor.r, foregroundColor.g, foregroundColor.b, foregroundColor.a)
|
||||
);
|
||||
ui->backgroundColor->setCurrentColor(
|
||||
QColor::fromRgbF(backgroundColor.r, backgroundColor.g, backgroundColor.b, backgroundColor.a)
|
||||
);
|
||||
|
||||
if (alignment & Cell::ALIGNMENT_LEFT) {
|
||||
ui->alignLeft->setChecked(true);
|
||||
}
|
||||
else if (alignment & Cell::ALIGNMENT_HCENTER) {
|
||||
ui->alignHCenter->setChecked(true);
|
||||
}
|
||||
else if (alignment & Cell::ALIGNMENT_RIGHT) {
|
||||
ui->alignRight->setChecked(true);
|
||||
}
|
||||
|
||||
if (alignment & Cell::ALIGNMENT_TOP) {
|
||||
ui->alignTop->setChecked(true);
|
||||
}
|
||||
else if (alignment & Cell::ALIGNMENT_VCENTER) {
|
||||
ui->alignVCenter->setChecked(true);
|
||||
}
|
||||
else if (alignment & Cell::ALIGNMENT_BOTTOM) {
|
||||
ui->alignBottom->setChecked(true);
|
||||
}
|
||||
|
||||
if (style.find("bold") != style.end()) {
|
||||
ui->styleBold->setChecked(true);
|
||||
}
|
||||
if (style.find("italic") != style.end()) {
|
||||
ui->styleItalic->setChecked(true);
|
||||
}
|
||||
if (style.find("underline") != style.end()) {
|
||||
ui->styleUnderline->setChecked(true);
|
||||
}
|
||||
|
||||
ui->displayUnit->setText(QString::fromStdString(displayUnit.stringRep));
|
||||
|
||||
ui->alias->setText(QString::fromStdString(alias));
|
||||
|
||||
// Colors
|
||||
connect(
|
||||
ui->foregroundColor,
|
||||
&QtColorPicker::colorChanged,
|
||||
this,
|
||||
&PropertiesDialog::foregroundColorChanged
|
||||
);
|
||||
connect(
|
||||
ui->backgroundColor,
|
||||
&QtColorPicker::colorChanged,
|
||||
this,
|
||||
&PropertiesDialog::backgroundColorChanged
|
||||
);
|
||||
|
||||
// Alignment
|
||||
connect(ui->alignLeft, &QRadioButton::clicked, this, &PropertiesDialog::alignmentChanged);
|
||||
connect(ui->alignRight, &QRadioButton::clicked, this, &PropertiesDialog::alignmentChanged);
|
||||
connect(ui->alignHCenter, &QRadioButton::clicked, this, &PropertiesDialog::alignmentChanged);
|
||||
connect(ui->alignTop, &QRadioButton::clicked, this, &PropertiesDialog::alignmentChanged);
|
||||
connect(ui->alignVCenter, &QRadioButton::clicked, this, &PropertiesDialog::alignmentChanged);
|
||||
connect(ui->alignBottom, &QRadioButton::clicked, this, &PropertiesDialog::alignmentChanged);
|
||||
|
||||
// Style
|
||||
connect(ui->styleBold, &QCheckBox::clicked, this, &PropertiesDialog::styleChanged);
|
||||
connect(ui->styleItalic, &QCheckBox::clicked, this, &PropertiesDialog::styleChanged);
|
||||
connect(ui->styleUnderline, &QCheckBox::clicked, this, &PropertiesDialog::styleChanged);
|
||||
|
||||
// Display unit
|
||||
connect(ui->displayUnit, &QLineEdit::textEdited, this, &PropertiesDialog::displayUnitChanged);
|
||||
|
||||
// Alias is only allowed for a single cell
|
||||
ui->tabWidget->widget(4)->setEnabled(_ranges.size() == 1 && _ranges[0].size() == 1);
|
||||
|
||||
// Alias
|
||||
connect(ui->alias, &QLineEdit::textEdited, this, &PropertiesDialog::aliasChanged);
|
||||
|
||||
ui->tabWidget->setCurrentIndex(0);
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(displayUnitOk && aliasOk);
|
||||
}
|
||||
|
||||
void PropertiesDialog::foregroundColorChanged(const QColor& color)
|
||||
{
|
||||
foregroundColor = Base::Color(color.redF(), color.greenF(), color.blueF(), color.alphaF());
|
||||
}
|
||||
|
||||
void PropertiesDialog::backgroundColorChanged(const QColor& color)
|
||||
{
|
||||
backgroundColor = Base::Color(color.redF(), color.greenF(), color.blueF(), color.alphaF());
|
||||
}
|
||||
|
||||
void PropertiesDialog::alignmentChanged()
|
||||
{
|
||||
if (sender() == ui->alignLeft) {
|
||||
alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_LEFT;
|
||||
}
|
||||
else if (sender() == ui->alignHCenter) {
|
||||
alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_HCENTER;
|
||||
}
|
||||
else if (sender() == ui->alignRight) {
|
||||
alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_RIGHT;
|
||||
}
|
||||
else if (sender() == ui->alignTop) {
|
||||
alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_TOP;
|
||||
}
|
||||
else if (sender() == ui->alignVCenter) {
|
||||
alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_VCENTER;
|
||||
}
|
||||
else if (sender() == ui->alignBottom) {
|
||||
alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_BOTTOM;
|
||||
}
|
||||
}
|
||||
|
||||
void PropertiesDialog::styleChanged()
|
||||
{
|
||||
if (sender() == ui->styleBold) {
|
||||
if (ui->styleBold->isChecked()) {
|
||||
style.insert("bold");
|
||||
}
|
||||
else {
|
||||
style.erase("bold");
|
||||
}
|
||||
}
|
||||
else if (sender() == ui->styleItalic) {
|
||||
if (ui->styleItalic->isChecked()) {
|
||||
style.insert("italic");
|
||||
}
|
||||
else {
|
||||
style.erase("italic");
|
||||
}
|
||||
}
|
||||
else if (sender() == ui->styleUnderline) {
|
||||
if (ui->styleUnderline->isChecked()) {
|
||||
style.insert("underline");
|
||||
}
|
||||
else {
|
||||
style.erase("underline");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PropertiesDialog::displayUnitChanged(const QString& text)
|
||||
{
|
||||
if (text.isEmpty()) {
|
||||
displayUnit = DisplayUnit();
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
QPalette palette = ui->displayUnit->palette();
|
||||
try {
|
||||
std::unique_ptr<UnitExpression> expr(
|
||||
App::ExpressionParser::parseUnit(sheet, text.toUtf8().constData())
|
||||
);
|
||||
|
||||
if (expr) {
|
||||
displayUnit = DisplayUnit(text.toStdString(), expr->getUnit(), expr->getScaler());
|
||||
palette.setColor(QPalette::Text, Qt::black);
|
||||
displayUnitOk = true;
|
||||
}
|
||||
else {
|
||||
displayUnit = DisplayUnit();
|
||||
palette.setColor(QPalette::Text, text.size() == 0 ? Qt::black : Qt::red);
|
||||
displayUnitOk = false;
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
displayUnit = DisplayUnit();
|
||||
palette.setColor(QPalette::Text, text.size() == 0 ? Qt::black : Qt::red);
|
||||
displayUnitOk = false;
|
||||
}
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(displayUnitOk && aliasOk);
|
||||
ui->displayUnit->setPalette(palette);
|
||||
}
|
||||
|
||||
void PropertiesDialog::aliasChanged(const QString& text)
|
||||
{
|
||||
QPalette palette = ui->alias->palette();
|
||||
|
||||
aliasOk = text.isEmpty() || sheet->isValidAlias(text.toStdString());
|
||||
|
||||
alias = aliasOk ? text.toStdString() : "";
|
||||
palette.setColor(QPalette::Text, aliasOk ? Qt::black : Qt::red);
|
||||
ui->alias->setPalette(palette);
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(displayUnitOk && aliasOk);
|
||||
}
|
||||
|
||||
PropertiesDialog::~PropertiesDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void PropertiesDialog::apply()
|
||||
{
|
||||
if (!ranges.empty()) {
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Set cell properties"));
|
||||
std::vector<Range>::const_iterator i = ranges.begin();
|
||||
bool changes = false;
|
||||
|
||||
for (; i != ranges.end(); ++i) {
|
||||
if (orgAlignment != alignment) {
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setAlignment('%s', '%s')",
|
||||
i->rangeString().c_str(),
|
||||
Cell::encodeAlignment(alignment).c_str()
|
||||
);
|
||||
changes = true;
|
||||
}
|
||||
if (orgStyle != style) {
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setStyle('%s', '%s')",
|
||||
i->rangeString().c_str(),
|
||||
Cell::encodeStyle(style).c_str()
|
||||
);
|
||||
changes = true;
|
||||
}
|
||||
if (orgForegroundColor != foregroundColor) {
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setForeground('%s', (%f,%f,%f,%f))",
|
||||
i->rangeString().c_str(),
|
||||
foregroundColor.r,
|
||||
foregroundColor.g,
|
||||
foregroundColor.b,
|
||||
foregroundColor.a
|
||||
);
|
||||
changes = true;
|
||||
}
|
||||
if (orgBackgroundColor != backgroundColor) {
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setBackground('%s', (%f,%f,%f,%f))",
|
||||
i->rangeString().c_str(),
|
||||
backgroundColor.r,
|
||||
backgroundColor.g,
|
||||
backgroundColor.b,
|
||||
backgroundColor.a
|
||||
);
|
||||
changes = true;
|
||||
}
|
||||
if (orgDisplayUnit != displayUnit) {
|
||||
std::string escapedstr = Base::Tools::escapedUnicodeFromUtf8(
|
||||
displayUnit.stringRep.c_str()
|
||||
);
|
||||
escapedstr = Base::Tools::escapeQuotesFromString(escapedstr);
|
||||
Gui::cmdAppObjectArgs(
|
||||
sheet,
|
||||
"setDisplayUnit('%s', '%s')",
|
||||
i->rangeString().c_str(),
|
||||
escapedstr.c_str()
|
||||
);
|
||||
changes = true;
|
||||
}
|
||||
if (ranges.size() == 1 && ranges[0].size() == 1 && orgAlias != alias) {
|
||||
Gui::cmdAppObjectArgs(sheet, "setAlias('%s', '%s')", i->address().c_str(), alias.c_str());
|
||||
changes = true;
|
||||
}
|
||||
}
|
||||
if (changes) {
|
||||
sheet->getDocument()->commitTransaction();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
}
|
||||
else {
|
||||
sheet->getDocument()->abortTransaction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PropertiesDialog::selectAlias()
|
||||
{
|
||||
ui->tabWidget->setCurrentIndex(4);
|
||||
ui->alias->setFocus();
|
||||
}
|
||||
|
||||
#include "moc_PropertiesDialog.cpp"
|
||||
83
src/Mod/Spreadsheet/Gui/PropertiesDialog.h
Normal file
@@ -0,0 +1,83 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class PropertiesDialog;
|
||||
}
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class PropertiesDialog: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PropertiesDialog(
|
||||
Spreadsheet::Sheet* _sheet,
|
||||
const std::vector<App::Range>& _ranges,
|
||||
QWidget* parent = nullptr
|
||||
);
|
||||
~PropertiesDialog() override;
|
||||
|
||||
void apply();
|
||||
void selectAlias();
|
||||
|
||||
private Q_SLOTS:
|
||||
void foregroundColorChanged(const QColor& color);
|
||||
void backgroundColorChanged(const QColor& color);
|
||||
void alignmentChanged();
|
||||
void styleChanged();
|
||||
void displayUnitChanged(const QString& text);
|
||||
void aliasChanged(const QString& text);
|
||||
|
||||
private:
|
||||
Spreadsheet::Sheet* sheet;
|
||||
std::vector<App::Range> ranges;
|
||||
Ui::PropertiesDialog* ui;
|
||||
Base::Color foregroundColor;
|
||||
Base::Color backgroundColor;
|
||||
int alignment;
|
||||
std::set<std::string> style;
|
||||
Spreadsheet::DisplayUnit displayUnit;
|
||||
std::string alias;
|
||||
|
||||
Base::Color orgForegroundColor;
|
||||
Base::Color orgBackgroundColor;
|
||||
int orgAlignment;
|
||||
std::set<std::string> orgStyle;
|
||||
Spreadsheet::DisplayUnit orgDisplayUnit;
|
||||
std::string orgAlias;
|
||||
|
||||
bool displayUnitOk;
|
||||
bool aliasOk;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
348
src/Mod/Spreadsheet/Gui/PropertiesDialog.ui
Normal file
@@ -0,0 +1,348 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PropertiesDialog</class>
|
||||
<widget class="QDialog" name="PropertiesDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>426</width>
|
||||
<height>249</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Cell Properties</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="usesScrollButtons">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>&Color</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QtColorPicker" name="foregroundColor"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Background</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QtColorPicker" name="backgroundColor"/>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>&Alignment</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Horizontal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="alignLeft">
|
||||
<property name="text">
|
||||
<string>Left</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="alignHCenter">
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="alignRight">
|
||||
<property name="text">
|
||||
<string>Right</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Vertical</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="alignTop">
|
||||
<property name="text">
|
||||
<string>Top</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="alignVCenter">
|
||||
<property name="text">
|
||||
<string>Center</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="alignBottom">
|
||||
<property name="text">
|
||||
<string>Bottom</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>&Style</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="styleBold">
|
||||
<property name="text">
|
||||
<string>Bold</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="styleItalic">
|
||||
<property name="text">
|
||||
<string>Italic</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="styleUnderline">
|
||||
<property name="text">
|
||||
<string>Underline</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>&Display unit</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Text for the unit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="displayUnit"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>123</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="title">
|
||||
<string>A&lias</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Alias for this cell</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="alias"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QtColorPicker</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>qtcolorpicker.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>PropertiesDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>PropertiesDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
22
src/Mod/Spreadsheet/Gui/Resources/Spreadsheet.qrc
Normal file
@@ -0,0 +1,22 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/preferences-spreadsheet.svg</file>
|
||||
<file>icons/Spreadsheet.svg</file>
|
||||
<file>icons/SpreadsheetController.svg</file>
|
||||
<file>icons/SpreadsheetImport.svg</file>
|
||||
<file>icons/SpreadsheetExport.svg</file>
|
||||
<file>icons/SpreadsheetSplitCell.svg</file>
|
||||
<file>icons/SpreadsheetMergeCells.svg</file>
|
||||
<file>icons/SpreadsheetAlignRight.svg</file>
|
||||
<file>icons/SpreadsheetAlignLeft.svg</file>
|
||||
<file>icons/SpreadsheetAlignCenter.svg</file>
|
||||
<file>icons/SpreadsheetAlignVCenter.svg</file>
|
||||
<file>icons/SpreadsheetAlignTop.svg</file>
|
||||
<file>icons/SpreadsheetAlignBottom.svg</file>
|
||||
<file>icons/SpreadsheetStyleUnderline.svg</file>
|
||||
<file>icons/SpreadsheetStyleItalic.svg</file>
|
||||
<file>icons/SpreadsheetStyleBold.svg</file>
|
||||
<file>icons/SpreadsheetWorkbench.svg</file>
|
||||
<file>icons/SpreadsheetAlias.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
122
src/Mod/Spreadsheet/Gui/Resources/icons/Spreadsheet.svg
Normal file
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3783">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3785" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3787" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3783"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.77777777,0,7.1111114)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/Spreadsheet.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9"
|
||||
width="56"
|
||||
height="44"
|
||||
x="4"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="54"
|
||||
height="42"
|
||||
x="5"
|
||||
y="11" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,20 H 61"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 22,9 V 55"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,32 H 61"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,44 H 61"
|
||||
id="path3796" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
68
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlias.svg
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="64px" height="64px" id="svg2860" sodipodi:version="0.32" inkscape:version="0.48.5 r10040" sodipodi:docname="SpreadsheetAlias.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.1">
|
||||
<defs id="defs2862">
|
||||
<linearGradient inkscape:collect="always" id="linearGradient3790">
|
||||
<stop style="stop-color:#d3d7cf;stop-opacity:1" offset="0" id="stop3792"/>
|
||||
<stop style="stop-color:#ffffff;stop-opacity:1" offset="1" id="stop3794"/>
|
||||
</linearGradient>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient3377" id="radialGradient3692" cx="45.883327" cy="28.869568" fx="45.883327" fy="28.869568" r="19.467436" gradientUnits="userSpaceOnUse"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient3377" id="radialGradient3703" gradientUnits="userSpaceOnUse" cx="135.38333" cy="97.369568" fx="135.38333" fy="97.369568" r="19.467436" gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)"/>
|
||||
<linearGradient id="linearGradient3377">
|
||||
<stop id="stop3379" offset="0" style="stop-color:#faff2b;stop-opacity:1;"/>
|
||||
<stop id="stop3381" offset="1" style="stop-color:#ffaa00;stop-opacity:1;"/>
|
||||
</linearGradient>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient3377" id="radialGradient3705" gradientUnits="userSpaceOnUse" cx="148.88333" cy="81.869568" fx="148.88333" fy="81.869568" r="19.467436" gradientTransform="matrix(1.3852588,-0.05136783,0.03705629,0.9993132,-60.392403,7.7040438)"/>
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 32 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="64 : 32 : 1" inkscape:persp3d-origin="32 : 21.333333 : 1" id="perspective2868"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient4150" id="radialGradient4160" cx="16.19231" cy="-8.2562485" fx="16.19231" fy="-8.2562485" r="24.568377" gradientTransform="matrix(-0.64879807,1.5256071,-1.4159262,-0.58281661,2.2505901,-36.277567)" gradientUnits="userSpaceOnUse"/>
|
||||
<linearGradient id="linearGradient4150">
|
||||
<stop style="stop-color:#ff0000;stop-opacity:0.07826087;" offset="0" id="stop4152"/>
|
||||
<stop style="stop-color:#ff0000;stop-opacity:1;" offset="1" id="stop4154"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3790" id="linearGradient3796" x1="43.886322" y1="53.375275" x2="16.080608" y2="5.1512713" gradientUnits="userSpaceOnUse"/>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="8.6782507" inkscape:cx="17.389794" inkscape:cy="25.271721" inkscape:current-layer="layer1" showgrid="true" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:window-width="1600" inkscape:window-height="837" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" inkscape:snap-global="false" inkscape:snap-bbox="false" inkscape:snap-nodes="true">
|
||||
<inkscape:grid type="xygrid" id="grid3088" empspacing="2" visible="true" enabled="true" snapvisiblegridlinesonly="true"/>
|
||||
</sodipodi:namedview>
|
||||
<metadata id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:title>SpreadsheetAlias</dc:title>
|
||||
<dc:date>2015-09-30</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlias.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer">
|
||||
<path style="fill:url(#linearGradient3796);stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1" d="M 3 3 L 3 23 L 41 61 L 61 41 L 23 3 L 3 3 z M 12.6875 9 C 14.889845 8.832767 16.828285 10.484805 17 12.6875 C 17.171715 14.890195 15.514845 16.832767 13.3125 17 C 11.110155 17.167233 9.1717146 15.515195 9 13.3125 C 8.8282854 11.109805 10.485155 9.167233 12.6875 9 z " id="path3086"/>
|
||||
<path style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" d="M 35,25 50,40" id="path5152" inkscape:connector-curvature="0" sodipodi:nodetypes="cc"/>
|
||||
<path style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" d="M 31,29 46,44" id="path5152-7" inkscape:connector-curvature="0" sodipodi:nodetypes="cc"/>
|
||||
<path style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" d="M 27,33 42,48" id="path5152-3" inkscape:connector-curvature="0" sodipodi:nodetypes="cc"/>
|
||||
<path inkscape:connector-curvature="0" style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="M 5,5 5,22.2 41.028808,58.230461 58.401827,41 22.200173,5 z" id="path3086-3" sodipodi:nodetypes="cccccc"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title
|
||||
id="title1">SpreadsheetAlignBottom</title>
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3782">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3786" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788"
|
||||
x1="32"
|
||||
y1="58.851852"
|
||||
x2="32"
|
||||
y2="5.1481481"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.89655173,0,0,0.89655173,4.3103449,4.3103449)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:title>SpreadsheetAlignBottom</dc:title>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignBottom.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
transform="translate(-1,-1)">
|
||||
<rect
|
||||
style="fill:url(#linearGradient3788);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068"
|
||||
width="52"
|
||||
height="52"
|
||||
x="7"
|
||||
y="7" />
|
||||
<rect
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-3"
|
||||
width="48"
|
||||
height="48"
|
||||
x="9"
|
||||
y="9" />
|
||||
<g
|
||||
id="g3812"
|
||||
style="display:inline;stroke-width:0.999995"
|
||||
transform="matrix(1.0000094,0,0,-1,16.999859,40.000067)" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,36 H 52"
|
||||
id="path3790-2" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,44 H 30"
|
||||
id="path3794-9" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,52 H 52"
|
||||
id="path3790-40" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3782">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3786" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788"
|
||||
x1="40"
|
||||
y1="59"
|
||||
x2="23"
|
||||
y2="6"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.93103448,0,0,0.93103448,2.2068966,2.2068966)" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788-3"
|
||||
x1="32"
|
||||
y1="58.851852"
|
||||
x2="32"
|
||||
y2="5.1481481"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.89655173,0,0,0.89655173,3.3103449,3.3103449)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignLeft.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:url(#linearGradient3788-3);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068"
|
||||
width="52"
|
||||
height="52"
|
||||
x="6"
|
||||
y="6" />
|
||||
<rect
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-3"
|
||||
width="48"
|
||||
height="48"
|
||||
x="8"
|
||||
y="8" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 41,16 H 23"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 51,24 H 13"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 41,48 H 23"
|
||||
id="path3790-40" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 51,40 H 13"
|
||||
id="path3794-6" />
|
||||
<path
|
||||
d="M 41,32 H 23"
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path1" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
135
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignLeft.svg
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3782">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3786" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788"
|
||||
x1="40"
|
||||
y1="59"
|
||||
x2="23"
|
||||
y2="6"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.93103448,0,0,0.93103448,2.2068966,2.2068966)" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788-3"
|
||||
x1="32"
|
||||
y1="58.851852"
|
||||
x2="32"
|
||||
y2="5.1481481"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.89655173,0,0,0.89655173,3.3103449,3.3103449)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignLeft.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:url(#linearGradient3788-3);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-9"
|
||||
width="52"
|
||||
height="52"
|
||||
x="6"
|
||||
y="6" />
|
||||
<rect
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-3-1"
|
||||
width="48"
|
||||
height="48"
|
||||
x="8"
|
||||
y="8" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 30,16 H 13"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 51,24 H 13"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 30,48 H 13"
|
||||
id="path3790-40" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 51,40 H 13"
|
||||
id="path3794-6" />
|
||||
<path
|
||||
d="M 30,32 H 13"
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path1" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3782">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3786" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788"
|
||||
x1="40"
|
||||
y1="59"
|
||||
x2="23"
|
||||
y2="6"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.93103448,0,0,0.93103448,2.2068966,2.2068966)" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788-3"
|
||||
x1="32"
|
||||
y1="58.851852"
|
||||
x2="32"
|
||||
y2="5.1481481"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.89655173,0,0,0.89655173,-60.689655,3.3103449)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignLeft.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:url(#linearGradient3788-3);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-9"
|
||||
width="52"
|
||||
height="52"
|
||||
x="-58"
|
||||
y="6"
|
||||
transform="scale(-1,1)" />
|
||||
<rect
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-3-1"
|
||||
width="48"
|
||||
height="48"
|
||||
x="-56"
|
||||
y="8"
|
||||
transform="scale(-1,1)" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 34,16 H 51"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 13,24 H 51"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 34,48 H 51"
|
||||
id="path3790-40" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 13,40 H 51"
|
||||
id="path3794-6" />
|
||||
<path
|
||||
d="M 34,32 H 51"
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path1" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
127
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignTop.svg
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title
|
||||
id="title1">SpreadsheetAlignBottom</title>
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3782">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3786" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788"
|
||||
x1="32"
|
||||
y1="58.851852"
|
||||
x2="32"
|
||||
y2="5.1481481"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.89655173,0,0,0.89655173,4.3103449,-61.689655)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:title>SpreadsheetAlignBottom</dc:title>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignBottom.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
transform="matrix(1,0,0,-1,-1,65)">
|
||||
<rect
|
||||
style="fill:url(#linearGradient3788);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068"
|
||||
width="52"
|
||||
height="52"
|
||||
x="7"
|
||||
y="-59"
|
||||
transform="scale(1,-1)" />
|
||||
<rect
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-3"
|
||||
width="48"
|
||||
height="48"
|
||||
x="9"
|
||||
y="9" />
|
||||
<g
|
||||
id="g3812"
|
||||
style="display:inline;stroke-width:0.999995"
|
||||
transform="matrix(1.0000094,0,0,-1,16.999859,40.000067)" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,36 H 52"
|
||||
id="path3790-2" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,44 H 30"
|
||||
id="path3794-9" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,52 H 52"
|
||||
id="path3790-40" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title
|
||||
id="title1">SpreadsheetAlignBottom</title>
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3782">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3786" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3782"
|
||||
id="linearGradient3788"
|
||||
x1="32"
|
||||
y1="58.851852"
|
||||
x2="32"
|
||||
y2="5.1481481"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.89655173,0,0,0.89655173,4.3103449,-61.689655)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:title>SpreadsheetAlignBottom</dc:title>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetAlignBottom.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
transform="matrix(1,0,0,-1,-1,65)">
|
||||
<rect
|
||||
style="fill:url(#linearGradient3788);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068"
|
||||
width="52"
|
||||
height="52"
|
||||
x="7"
|
||||
y="-59"
|
||||
transform="scale(1,-1)" />
|
||||
<rect
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3068-3"
|
||||
width="48"
|
||||
height="48"
|
||||
x="9"
|
||||
y="9" />
|
||||
<g
|
||||
id="g3812"
|
||||
style="display:inline;stroke-width:0.999995"
|
||||
transform="matrix(1.0000094,0,0,-1,16.999859,40.000067)" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,25 H 52"
|
||||
id="path3790-2" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,33 H 30"
|
||||
id="path3794-9" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 14,41 H 52"
|
||||
id="path3790-40" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3783">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3785" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3787" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3783"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.77777777,0,7.1111114)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/Spreadsheet.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9"
|
||||
width="56"
|
||||
height="44"
|
||||
x="4"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="54"
|
||||
height="42"
|
||||
x="5"
|
||||
y="11" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,20 H 61"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 22,8 V 56"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,32 H 61"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,44 H 61"
|
||||
id="path3796" />
|
||||
<rect
|
||||
style="fill:#ef2929;fill-opacity:1;stroke:#a40000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:6.8;stroke-opacity:1"
|
||||
id="rect3000"
|
||||
width="38.974358"
|
||||
height="24"
|
||||
x="22.000002"
|
||||
y="20" />
|
||||
<path
|
||||
style="fill:none;stroke:#a40000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 22.000001,32 H 61"
|
||||
id="path3794-3" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.0 KiB |
173
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetExport.svg
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg2869"
|
||||
version="1.1"
|
||||
viewBox="0 0 64 64"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2871">
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3765"
|
||||
id="linearGradient3771"
|
||||
x1="98"
|
||||
y1="1047.3622"
|
||||
x2="81"
|
||||
y2="993.36218"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-60,-988.36218)" />
|
||||
<linearGradient
|
||||
id="linearGradient3765">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3767" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3769" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3806"
|
||||
id="linearGradient3012"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.73269922,0,0,0.5925111,13.613318,24.513214)"
|
||||
x1="48.014042"
|
||||
y1="26.323408"
|
||||
x2="43.478561"
|
||||
y2="42.076672" />
|
||||
<linearGradient
|
||||
id="linearGradient3806">
|
||||
<stop
|
||||
style="stop-color:#ef2929;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3808" />
|
||||
<stop
|
||||
style="stop-color:#a40000;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3810" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3765"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.55555555,0,0,0.44444445,14.222223,8.7777781)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2874">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[maxwxyz]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:date>2024</dc:date>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer3"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:url(#linearGradient3771);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="m 11,3 v 58.00002 h 42 v -48 L 43,3 Z"
|
||||
id="path2991" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13,5 V 59.00002 H 51 V 13.81392 L 41.99741,5 Z"
|
||||
id="path3763" />
|
||||
</g>
|
||||
<g
|
||||
id="g2"
|
||||
style="display:inline"
|
||||
transform="translate(0,10)">
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9"
|
||||
width="32"
|
||||
height="26"
|
||||
x="16"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="30"
|
||||
height="24"
|
||||
x="17"
|
||||
y="11" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 15.000002,16 H 49"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 28,9 V 37"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 15.000002,23 H 49"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 15.000002,30 H 49"
|
||||
id="path3796" />
|
||||
</g>
|
||||
<path
|
||||
style="display:inline;fill:#adafb0;fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 43,3 V 13.00002 H 53 Z"
|
||||
id="path2993-3" />
|
||||
<path
|
||||
style="display:inline;fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:#280000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 45.628392,34.16514 v 5.682261 H 29 v 9.470435 h 16.628392 v 5.682261 L 59.881299,44.582619 Z"
|
||||
id="path3343" />
|
||||
<path
|
||||
style="display:inline;fill:url(#linearGradient3012);fill-opacity:1;fill-rule:evenodd;stroke:#ef2929;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 47.629277,38.105469 v 3.742187 H 31.000371 v 5.470703 h 16.628906 v 3.742188 l 8.863281,-6.478516 z"
|
||||
id="path1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
179
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetImport.svg
Normal file
@@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg2869"
|
||||
version="1.1"
|
||||
viewBox="0 0 64 64"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2871">
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3765"
|
||||
id="linearGradient3771"
|
||||
x1="98"
|
||||
y1="1047.3622"
|
||||
x2="81"
|
||||
y2="993.36218"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-60,-988.36218)" />
|
||||
<linearGradient
|
||||
id="linearGradient3765">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3767" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3769" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient8"
|
||||
id="linearGradient9"
|
||||
x1="32"
|
||||
y1="64"
|
||||
x2="32"
|
||||
y2="14.419661"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(0,2)" />
|
||||
<linearGradient
|
||||
id="linearGradient8">
|
||||
<stop
|
||||
style="stop-color:#3465a4;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop8" />
|
||||
<stop
|
||||
style="stop-color:#729fcf;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop9" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3765"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.55555555,0,0,0.77777777,14.222223,7.1111114)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2874">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[maxwxyz]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:date>2024</dc:date>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path
|
||||
style="fill:#204a87;fill-opacity:1;stroke:#0c1522;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="path4"
|
||||
d="M 29.921921,12.073012 26.993293,8.1977395 C 26.21651,7.1698698 25.163057,6.5924975 24.064598,6.5924975 H 5.0714589 c -1.1437425,0 -2.0708717,1.2268134 -2.0708717,2.740257 V 60.484215 c 0,0.504481 0.309043,0.913419 0.6902905,0.913419 H 60.294706 c 0.381247,0 0.690291,-0.408938 0.690291,-0.913419 V 14.813269 c 0,-1.513445 -0.927129,-2.740257 -2.070872,-2.740257 z" />
|
||||
<path
|
||||
style="fill:#204a87;fill-opacity:1;stroke:#3465a4;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="path7"
|
||||
d="M 5.2089844,8.5917969 H 24.064453 c 0.375444,0 0.874561,0.2026195 1.333984,0.8105468 l 3.527344,4.6699223 h 29.84961 c 0.0082,0.01044 0.01784,0.02289 0.02734,0.03711 0.01056,0.0158 0.02193,0.03237 0.0332,0.05273 0.08049,0.145363 0.148438,0.361331 0.148438,0.650391 v 44.58594 H 5 V 9.3320312 C 5,9.0436394 5.0678061,8.828994 5.1484375,8.6835937 c 0.011294,-0.020366 0.022609,-0.038859 0.033203,-0.054687 0.00953,-0.014245 0.019073,-0.026632 0.027344,-0.03711 z" />
|
||||
<g
|
||||
id="layer3-3"
|
||||
style="display:inline">
|
||||
<path
|
||||
style="fill:url(#linearGradient3771);fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="m 11,3 v 58.00002 h 42 v -48 L 43,3 Z"
|
||||
id="path2991" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13,5 V 59.00002 H 51 V 13.81392 L 41.99741,5 Z"
|
||||
id="path3763" />
|
||||
</g>
|
||||
<g
|
||||
id="g1">
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9"
|
||||
width="32"
|
||||
height="44"
|
||||
x="16"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="30"
|
||||
height="42"
|
||||
x="17"
|
||||
y="11" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 15.000002,16 H 49"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 28,9 V 55"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 15.000002,23 H 49"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 15.000002,30 H 49"
|
||||
id="path3796" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#729fcf;fill-opacity:1;stroke:#0c1522;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="path6"
|
||||
d="m 27.919677,30.419661 -2.927223,3.534545 C 24.216046,34.891703 23.1628,35.41831 22.064342,35.41831 H 3.0000008 l 0.015588,25.156085 c 2.171e-4,0.460126 0.3093777,0.833108 0.6906252,0.833108 h 56.603828 c 0.381248,0 0.690139,-0.372982 0.689957,-0.833108 L 60.983419,32.918986 C 60.982865,31.538609 60.055293,30.419661 58.91155,30.419661 H 27.919674 Z" />
|
||||
<path
|
||||
style="fill:url(#linearGradient9);fill-opacity:1;stroke:#729fcf;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="path8"
|
||||
d="m 28.861658,32.419922 h 30.050451 c 0,0 0.07225,0.463543 0.07227,0.5 L 59,59.408203 H 5.015625 L 5,37.417969 h 17.064783 c 1.756119,0 3.349555,-0.836095 4.46875,-2.1875 z" />
|
||||
<path
|
||||
style="display:inline;fill:#adafb0;fill-opacity:1;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 43,3 V 13.00002 H 53 Z"
|
||||
id="path2993" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.9 KiB |
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3962">
|
||||
<stop
|
||||
style="stop-color:#3465a4;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3966" />
|
||||
<stop
|
||||
style="stop-color:#729fcf;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3964" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3783"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.77777777,-3e-6,7.1111118)" />
|
||||
<linearGradient
|
||||
id="linearGradient3783">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3785" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3787" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3962"
|
||||
id="linearGradient3968"
|
||||
x1="110"
|
||||
y1="30"
|
||||
x2="86"
|
||||
y2="30"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-66,2)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetMergeCells.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="color:#000000;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="rect3002-9-36"
|
||||
width="56"
|
||||
height="44"
|
||||
x="4"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="54"
|
||||
height="42"
|
||||
x="5"
|
||||
y="11.000001" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 21,41 V 55"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 2.999997,23 61,23"
|
||||
id="path3794-7" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 2.999997,41 61,41"
|
||||
id="path3796-5" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 43,41 V 55"
|
||||
id="path3792-3" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 21,8.9999999 V 23"
|
||||
id="path3792-5" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 43,8.9999999 V 23"
|
||||
id="path3792-3-6" />
|
||||
<path
|
||||
style="fill:none;stroke:url(#linearGradient3968);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 22,32 H 42"
|
||||
id="path3158" />
|
||||
<path
|
||||
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 22,31 H 42"
|
||||
id="path3158-9" />
|
||||
<path
|
||||
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 61,41 3,41 V 23 h 58 z"
|
||||
id="path3158-7" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.0 KiB |
146
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetSplitCell.svg
Normal file
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3783"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.77777777,-3e-6,7.1111118)" />
|
||||
<linearGradient
|
||||
id="linearGradient3783">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3785" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3787" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetMergeCells.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="color:#000000;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="rect3002-9-36"
|
||||
width="56"
|
||||
height="44"
|
||||
x="4"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="54"
|
||||
height="42"
|
||||
x="5"
|
||||
y="11.000001" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 21,41 V 55"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 2.999997,23 61,23"
|
||||
id="path3794-7" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 2.999997,41 61,41"
|
||||
id="path3796-5" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 43,41 V 55"
|
||||
id="path3792-3" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 21,9 V 23"
|
||||
id="path3792-5" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 43,9 V 23"
|
||||
id="path3792-3-6" />
|
||||
<path
|
||||
style="fill:none;stroke:#a40000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 17,23 V 41"
|
||||
id="path3158-9" />
|
||||
<path
|
||||
style="fill:none;stroke:#a40000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 61,41 3,41 V 23 h 58 z"
|
||||
id="path3158-7" />
|
||||
<path
|
||||
style="fill:none;stroke:#a40000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 47,23 V 41"
|
||||
id="path3158-9-0" />
|
||||
<path
|
||||
d="M 32,23 V 41"
|
||||
style="fill:none;stroke:#a40000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="path1" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
338
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetStyleBold.svg
Normal file
@@ -0,0 +1,338 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg1306"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="SpreadsheetStyleBold.svg"
|
||||
version="1.0"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<defs
|
||||
id="defs1308">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 24 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="48 : 24 : 1"
|
||||
inkscape:persp3d-origin="24 : 16 : 1"
|
||||
id="perspective46" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2288">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2290" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2292" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2243">
|
||||
<stop
|
||||
id="stop2245"
|
||||
offset="0"
|
||||
style="stop-color:#2a5387;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop2247"
|
||||
offset="1"
|
||||
style="stop-color:#3465a4;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2233">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2235" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2237" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3682">
|
||||
<stop
|
||||
style="stop-color:#497fc6;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3684" />
|
||||
<stop
|
||||
style="stop-color:#90b3d9;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3686" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2834">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2836" />
|
||||
<stop
|
||||
style="stop-color:#b3b3b3;stop-opacity:0.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop2838" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient8662">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop8664" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop8666" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3682"
|
||||
id="linearGradient2475"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="29.122221"
|
||||
y1="33.438889"
|
||||
x2="14.296363"
|
||||
y2="6.3463993" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2243"
|
||||
id="linearGradient2477"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="19.988434"
|
||||
y1="34.98325"
|
||||
x2="19.988434"
|
||||
y2="6.4341555" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2834"
|
||||
id="linearGradient2479"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(0,-3)"
|
||||
x1="19.891792"
|
||||
y1="16.114628"
|
||||
x2="31.856716"
|
||||
y2="72.780548" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2233"
|
||||
id="linearGradient2481"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-1,-4)"
|
||||
x1="25"
|
||||
y1="27.5"
|
||||
x2="26.673967"
|
||||
y2="10" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient8662"
|
||||
id="radialGradient2490"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.536723,0,16.87306)"
|
||||
cx="24.837126"
|
||||
cy="36.421127"
|
||||
fx="24.837126"
|
||||
fy="36.421127"
|
||||
r="15.644737" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient8662"
|
||||
id="radialGradient2494"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.536723,0,16.87306)"
|
||||
cx="24.837126"
|
||||
cy="36.421127"
|
||||
fx="24.837126"
|
||||
fy="36.421127"
|
||||
r="15.644737" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2288"
|
||||
id="linearGradient2294"
|
||||
x1="24"
|
||||
y1="42.25"
|
||||
x2="24"
|
||||
y2="36.615528"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.97619,0,0,0.406377,0.571429,24.97647)" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="7.4085446"
|
||||
inkscape:cx="-8.1728792"
|
||||
inkscape:cy="15.488451"
|
||||
inkscape:current-layer="layer4"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="837"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:grid-points="true"
|
||||
stroke="#204a87"
|
||||
fill="#2e3436"
|
||||
showborder="true"
|
||||
inkscape:showpageshadow="false"
|
||||
borderlayer="true"
|
||||
inkscape:window-maximized="1">
|
||||
<sodipodi:guide
|
||||
orientation="vertical"
|
||||
position="14.406922"
|
||||
id="guide2257" />
|
||||
<sodipodi:guide
|
||||
orientation="horizontal"
|
||||
position="41.565351"
|
||||
id="guide2259" />
|
||||
<sodipodi:guide
|
||||
orientation="vertical"
|
||||
position="29.03324"
|
||||
id="guide2261" />
|
||||
<sodipodi:guide
|
||||
orientation="vertical"
|
||||
position="19.964923"
|
||||
id="guide2265" />
|
||||
<sodipodi:guide
|
||||
orientation="horizontal"
|
||||
position="31.739108"
|
||||
id="guide2267" />
|
||||
<sodipodi:guide
|
||||
orientation="horizontal"
|
||||
position="28.59445"
|
||||
id="guide2269" />
|
||||
<sodipodi:guide
|
||||
orientation="vertical"
|
||||
position="24.133423"
|
||||
id="guide2271" />
|
||||
<sodipodi:guide
|
||||
orientation="horizontal"
|
||||
position="14.56111"
|
||||
id="guide2266" />
|
||||
<inkscape:grid
|
||||
id="GridFromPre046Settings"
|
||||
type="xygrid"
|
||||
originx="0px"
|
||||
originy="0px"
|
||||
spacingx="1px"
|
||||
spacingy="1px"
|
||||
color="#0000ff"
|
||||
empcolor="#0000ff"
|
||||
opacity="0.2"
|
||||
empopacity="0.4"
|
||||
empspacing="2"
|
||||
visible="true"
|
||||
enabled="true"
|
||||
snapvisiblegridlinesonly="true" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata1311">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Bold</dc:title>
|
||||
<dc:date>2006-01-04</dc:date>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lapo Calamandrei</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>http://tango-project.org</dc:source>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>text</rdf:li>
|
||||
<rdf:li>a</rdf:li>
|
||||
<rdf:li>bold</rdf:li>
|
||||
<rdf:li>write</rdf:li>
|
||||
<rdf:li>letter</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>Andreas Nilsson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer5"
|
||||
inkscape:label="Shadow"
|
||||
style="display:inline"
|
||||
transform="translate(0,16)">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="opacity:0.20000000000000001;color:#000000;fill:url(#radialGradient2494);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.61849948;marker:none;visibility:visible;display:inline;overflow:visible"
|
||||
id="path2492"
|
||||
sodipodi:cx="24.837126"
|
||||
sodipodi:cy="36.421127"
|
||||
sodipodi:rx="15.644737"
|
||||
sodipodi:ry="8.3968935"
|
||||
d="m 40.481863,36.421127 a 15.644737,8.3968935 0 1 1 -31.2894745,0 15.644737,8.3968935 0 1 1 31.2894745,0 z"
|
||||
transform="matrix(2.0290598,0,0,0.75255807,-18.75734,12.070208)"
|
||||
inkscape:r_cx="true"
|
||||
inkscape:r_cy="true" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer4"
|
||||
inkscape:label="A"
|
||||
style="display:inline"
|
||||
transform="translate(0,16)">
|
||||
<g
|
||||
id="g2464"
|
||||
transform="matrix(1.3801775,0,0,1.4054054,-1.1405326,-11.702703)"
|
||||
style="stroke-width:1.43602406">
|
||||
<path
|
||||
id="path2277"
|
||||
d="m 18,0.5 -15,37 10.143623,0 2.173633,-5.692307 17.269027,0 L 34.879958,37.5 45,37.5 30,0.5 l -3,0 -6,0 z m 6.01179,8.5384618 5.796356,14.2307692 -11.592712,0 z"
|
||||
style="fill:url(#linearGradient2475);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2477);stroke-width:1.43602407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
|
||||
sodipodi:nodetypes="ccccccccccccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="font-size:54.8693924px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:0.7;fill:none;stroke:url(#linearGradient2479);stroke-width:1.43602407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;font-family:Bitstream Vera Sans"
|
||||
d="M 5.1736335,36.076923 18.939979,1.9230771 l 10.143623,0 13.766345,34.1538459 -7.028082,0 -2.318542,-5.692307 -19.127974,0 -2.246088,5.692307 z"
|
||||
id="path2304"
|
||||
sodipodi:nodetypes="ccccccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path2306"
|
||||
d="m 16.041801,24.692308 15.939979,0 -7.96999,-19.2115385 z"
|
||||
style="opacity:0.7;fill:none;stroke:url(#linearGradient2481);stroke-width:1.43602407;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="64" height="64" id="svg1306" sodipodi:version="0.32" inkscape:version="0.48.5 r10040" sodipodi:docname="SpreadsheetStyleItalic.svg" version="1.0" inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<defs id="defs1308">
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 24 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="48 : 24 : 1" inkscape:persp3d-origin="24 : 16 : 1" id="perspective46"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient2494" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient3118">
|
||||
<stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop3120"/>
|
||||
<stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop3122"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient2243">
|
||||
<stop id="stop2245" offset="0" style="stop-color:#2a5387;stop-opacity:1"/>
|
||||
<stop id="stop2247" offset="1" style="stop-color:#3465a4;stop-opacity:1;"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient2233">
|
||||
<stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop2235"/>
|
||||
<stop style="stop-color:#ffffff;stop-opacity:0;" offset="1" id="stop2237"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient3682">
|
||||
<stop style="stop-color:#497fc6;stop-opacity:1;" offset="0" id="stop3684"/>
|
||||
<stop style="stop-color:#90b3d9;stop-opacity:1;" offset="1" id="stop3686"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient2834">
|
||||
<stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop2836"/>
|
||||
<stop style="stop-color:#b3b3b3;stop-opacity:0.0000000;" offset="1.0000000" id="stop2838"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient8662">
|
||||
<stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop8664"/>
|
||||
<stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop8666"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2233" id="linearGradient2327" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.4666667,0,0,1.4594595,5.4666754,-18.108108)" x1="30.123499" y1="28.5" x2="30.916004" y2="5.3994164"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2834" id="linearGradient2330" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.4666667,0,0,1.4594595,6.9333392,-18.108108)" x1="20.846664" y1="15.432576" x2="21.077463" y2="61.926037"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3682" id="linearGradient2333" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.4666667,0,0,1.4594595,6.9333392,-18.108108)" x1="29.033241" y1="36.44521" x2="14.33379" y2="9.4596548"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2243" id="linearGradient2335" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.4666667,0,0,1.4594595,6.9333392,-13.72973)" x1="22.125" y1="34.962811" x2="22.125" y2="6.25"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient2499" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient2503" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3118" id="linearGradient3124" x1="27.0625" y1="42.001186" x2="27.0625" y2="37.981052" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.555556,0,18.66667)"/>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="10.477264" inkscape:cx="-4.3239769" inkscape:cy="43.65142" inkscape:current-layer="layer2" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" showguides="false" inkscape:guide-bbox="true" inkscape:window-width="1600" inkscape:window-height="837" inkscape:window-x="0" inkscape:window-y="27" inkscape:grid-points="true" stroke="#204a87" fill="#2e3436" showborder="true" inkscape:showpageshadow="false" borderlayer="true" inkscape:snap-global="false" inkscape:window-maximized="1">
|
||||
<sodipodi:guide orientation="vertical" position="14.406922" id="guide2257"/>
|
||||
<sodipodi:guide orientation="horizontal" position="41.565351" id="guide2259"/>
|
||||
<sodipodi:guide orientation="vertical" position="29.03324" id="guide2261"/>
|
||||
<sodipodi:guide orientation="vertical" position="19.964923" id="guide2265"/>
|
||||
<sodipodi:guide orientation="horizontal" position="31.739108" id="guide2267"/>
|
||||
<sodipodi:guide orientation="horizontal" position="28.59445" id="guide2269"/>
|
||||
<sodipodi:guide orientation="vertical" position="24.133423" id="guide2271"/>
|
||||
<sodipodi:guide orientation="horizontal" position="6.0450673" id="guide2266"/>
|
||||
<inkscape:grid id="GridFromPre046Settings" type="xygrid" originx="0px" originy="0px" spacingx="1px" spacingy="1px" color="#0000ff" empcolor="#0000ff" opacity="0.2" empopacity="0.4" empspacing="2" visible="true" enabled="true" snapvisiblegridlinesonly="true"/>
|
||||
</sodipodi:namedview>
|
||||
<metadata id="metadata1311">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title>Italic</dc:title>
|
||||
<dc:date>2006-01-04</dc:date>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lapo Calamandrei</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>http://tango-project.org</dc:source>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>text</rdf:li>
|
||||
<rdf:li>a</rdf:li>
|
||||
<rdf:li>italic</rdf:li>
|
||||
<rdf:li>cursive</rdf:li>
|
||||
<rdf:li>write</rdf:li>
|
||||
<rdf:li>letter</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetStyleItalic.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:groupmode="layer" id="layer5" inkscape:label="Shadow" style="display:inline" transform="translate(0,16)">
|
||||
<path sodipodi:type="arc" style="opacity:0.15;color:#000000;fill:url(#radialGradient2494);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" id="path2492" sodipodi:cx="24.837126" sodipodi:cy="36.421127" sodipodi:rx="15.644737" sodipodi:ry="8.3968935" d="m 40.481863,36.421127 c 0,4.637477 -7.004387,8.396894 -15.644737,8.396894 -8.64035,0 -15.6447375,-3.759417 -15.6447375,-8.396894 0,-4.637476 7.0043875,-8.396893 15.6447375,-8.396893 8.64035,0 15.644737,3.759417 15.644737,8.396893 z" transform="matrix(1.470144,0,0,0.535474,-12.76416,20.91534)" inkscape:r_cx="true" inkscape:r_cy="true"/>
|
||||
</g>
|
||||
<g inkscape:groupmode="layer" id="layer2" inkscape:label="A" style="display:inline" transform="translate(0,16)">
|
||||
<path sodipodi:nodetypes="ccccccccccccc" style="fill:url(#linearGradient2333);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2335);stroke-width:1.98582077;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="M 47.999999,-13 4,41 13.533339,41 23,29 l 28,0 0,12 8,0 0,-54 z M 51,-5 l 0,27 -21.997607,0.02703 z" id="path2211" inkscape:connector-curvature="0"/>
|
||||
<path sodipodi:nodetypes="ccccccccc" id="path2237" d="m 8,39 41,-50 8,0 0,50 -4,0 0,-12 -31,0 -9.5,12 z" style="font-size:54.8693924px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:0.7;fill:none;stroke:url(#linearGradient2330);stroke-width:1.98582077;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;font-family:Bitstream Vera Sans" inkscape:connector-curvature="0"/>
|
||||
<path style="opacity:0.38461543;fill:none;stroke:url(#linearGradient2327);stroke-width:1.98582077;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 25,24 28,0 0,-34 z" id="path2239" sodipodi:nodetypes="cccc" inkscape:connector-curvature="0"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.9 KiB |
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="64" height="64" id="svg1306" sodipodi:version="0.32" inkscape:version="0.48.5 r10040" sodipodi:docname="SpreadsheetStyleUnderline.svg" version="1.0" inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<defs id="defs1308">
|
||||
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 24 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="48 : 24 : 1" inkscape:persp3d-origin="24 : 16 : 1" id="perspective61"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient2494" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient3135">
|
||||
<stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop3137"/>
|
||||
<stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop3139"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient2521">
|
||||
<stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop2523"/>
|
||||
<stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop2525"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient2249">
|
||||
<stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop2251"/>
|
||||
<stop style="stop-color:#ffffff;stop-opacity:0;" offset="1" id="stop2253"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient2243">
|
||||
<stop id="stop2245" offset="0" style="stop-color:#2a5387;stop-opacity:1"/>
|
||||
<stop id="stop2247" offset="1" style="stop-color:#3465a4;stop-opacity:1;"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient2233">
|
||||
<stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop2235"/>
|
||||
<stop style="stop-color:#ffffff;stop-opacity:0;" offset="1" id="stop2237"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient3682">
|
||||
<stop style="stop-color:#497fc6;stop-opacity:1;" offset="0" id="stop3684"/>
|
||||
<stop style="stop-color:#90b3d9;stop-opacity:1;" offset="1" id="stop3686"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient2834">
|
||||
<stop style="stop-color:#ffffff;stop-opacity:1;" offset="0" id="stop2836"/>
|
||||
<stop style="stop-color:#b3b3b3;stop-opacity:0.0000000;" offset="1.0000000" id="stop2838"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" id="linearGradient8662">
|
||||
<stop style="stop-color:#000000;stop-opacity:1;" offset="0" id="stop8664"/>
|
||||
<stop style="stop-color:#000000;stop-opacity:0;" offset="1" id="stop8666"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linearGradient1467">
|
||||
<stop style="stop-color:#2a5387;stop-opacity:1" offset="0" id="stop1469"/>
|
||||
<stop style="stop-color:#3465a4;stop-opacity:1;" offset="1" id="stop1471"/>
|
||||
</linearGradient>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2233" id="linearGradient1621" gradientUnits="userSpaceOnUse" gradientTransform="translate(-1,-1)" x1="24.911612" y1="22.13604" x2="24.911612" y2="6.4029131"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2834" id="linearGradient1624" gradientUnits="userSpaceOnUse" x1="19.891792" y1="16.114628" x2="21.506844" y2="85.696808" gradientTransform="translate(0,-1)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2249" id="linearGradient1633" gradientUnits="userSpaceOnUse" x1="39.421204" y1="41.459263" x2="-24.130018" y2="41.5" gradientTransform="translate(0,1)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3682" id="linearGradient1635" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,-2)" x1="27.675018" y1="45.398964" x2="16.0744" y2="27.920008"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2521" id="linearGradient2527" x1="16.841536" y1="24" x2="16.841536" y2="25.010555" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,21)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient1467" id="linearGradient2535" x1="5.0271654" y1="27.761904" x2="5.0271654" y2="20.416153" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,21)"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient2559" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
|
||||
<radialGradient inkscape:collect="always" xlink:href="#linearGradient8662" id="radialGradient2561" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" cx="24.837126" cy="36.421127" fx="24.837126" fy="36.421127" r="15.644737"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3682" id="linearGradient1364" gradientUnits="userSpaceOnUse" x1="29.033241" y1="36.44521" x2="14.33379" y2="9.4596548" gradientTransform="translate(0,-1)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2243" id="linearGradient1366" gradientUnits="userSpaceOnUse" x1="22.125" y1="34.962811" x2="22.125" y2="6.25" gradientTransform="translate(0,2)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3135" id="linearGradient3141" x1="24.0625" y1="41.9375" x2="24" y2="37.937214" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,0.555556,0,18.66667)"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3682" id="linearGradient3228" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,-1)" x1="29.033241" y1="36.44521" x2="14.33379" y2="9.4596548"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2243" id="linearGradient3230" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,2)" x1="22.125" y1="34.962811" x2="22.125" y2="6.25"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2834" id="linearGradient3232" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,-1)" x1="19.891792" y1="16.114628" x2="21.506844" y2="85.696808"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2233" id="linearGradient3234" gradientUnits="userSpaceOnUse" gradientTransform="translate(-1,-1)" x1="24.911612" y1="22.13604" x2="24.911612" y2="6.4029131"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3682" id="linearGradient3236" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,-2)" x1="27.675018" y1="45.398964" x2="16.0744" y2="27.920008"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient1467" id="linearGradient3238" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,21)" x1="5.0271654" y1="27.761904" x2="5.0271654" y2="20.416153"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2249" id="linearGradient3240" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,1)" x1="39.421204" y1="41.459263" x2="-24.130018" y2="41.5"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2249" id="linearGradient3243" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.37865,0,0,1.3926468,-1.0876003,-15.294842)" x1="39.421204" y1="41.459263" x2="-24.130018" y2="41.5"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3682" id="linearGradient3246" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.3846154,0,0,1.3333333,-1.2307689,-17.000002)" x1="27.675018" y1="45.398964" x2="16.0744" y2="27.920008"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient1467" id="linearGradient3248" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.3846154,0,0,1.3333333,-1.2307689,13.666665)" x1="5.0271654" y1="27.761904" x2="5.0271654" y2="20.416153"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2233" id="linearGradient3251" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.4370357,0,0,1.3696824,-3.9258908,-18.168461)" x1="24.911612" y1="22.13604" x2="24.911612" y2="6.4029131"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2834" id="linearGradient3254" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.3674829,0,0,1.3251606,-1.0005576,-17.08137)" x1="19.891792" y1="16.114628" x2="21.506844" y2="85.696808"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient3682" id="linearGradient3257" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.418198,0,0,1.3587377,-1.9890258,-17.725202)" x1="29.033241" y1="36.44521" x2="14.33379" y2="9.4596548"/>
|
||||
<linearGradient inkscape:collect="always" xlink:href="#linearGradient2243" id="linearGradient3259" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.418198,0,0,1.3587377,-1.9890258,-13.648988)" x1="22.125" y1="34.962811" x2="22.125" y2="6.25"/>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.2386321" inkscape:cx="3.0685083" inkscape:cy="15.164037" inkscape:current-layer="layer2" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" showguides="false" inkscape:guide-bbox="true" inkscape:window-width="1600" inkscape:window-height="837" inkscape:window-x="0" inkscape:window-y="27" inkscape:grid-points="true" stroke="#204a87" fill="#2e3436" showborder="true" inkscape:showpageshadow="false" borderlayer="true" inkscape:snap-bbox="true" inkscape:snap-nodes="false" inkscape:snap-global="false" inkscape:window-maximized="1">
|
||||
<sodipodi:guide orientation="vertical" position="14.406922" id="guide2257"/>
|
||||
<sodipodi:guide orientation="horizontal" position="41.565351" id="guide2259"/>
|
||||
<sodipodi:guide orientation="vertical" position="29.03324" id="guide2261"/>
|
||||
<sodipodi:guide orientation="vertical" position="19.964923" id="guide2265"/>
|
||||
<sodipodi:guide orientation="horizontal" position="31.739108" id="guide2267"/>
|
||||
<sodipodi:guide orientation="horizontal" position="28.59445" id="guide2269"/>
|
||||
<sodipodi:guide orientation="vertical" position="24.133423" id="guide2271"/>
|
||||
<sodipodi:guide orientation="horizontal" position="6.0450673" id="guide2266"/>
|
||||
<inkscape:grid id="GridFromPre046Settings" type="xygrid" originx="0px" originy="0px" spacingx="1px" spacingy="1px" color="#0000ff" empcolor="#0000ff" opacity="0.2" empopacity="0.4" empspacing="2" visible="true" enabled="true" snapvisiblegridlinesonly="true" dotted="false"/>
|
||||
</sodipodi:namedview>
|
||||
<metadata id="metadata1311">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title>Format Text - Underlined</dc:title>
|
||||
<dc:date/>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lapo Calamandrei</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>http://tango-project.org</dc:source>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>text</rdf:li>
|
||||
<rdf:li>a</rdf:li>
|
||||
<rdf:li>strikeout</rdf:li>
|
||||
<rdf:li>strike-out</rdf:li>
|
||||
<rdf:li>write</rdf:li>
|
||||
<rdf:li>letter</rdf:li>
|
||||
<rdf:li>strike-though</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>jakub Steiner, [agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetStyleUnderline.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
</cc:Work>
|
||||
<cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:groupmode="layer" id="layer5" inkscape:label="Shadow" style="display:inline" transform="translate(0,16)">
|
||||
<path sodipodi:type="arc" style="opacity:0.15;color:#000000;fill:url(#radialGradient2494);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" id="path2492" sodipodi:cx="24.837126" sodipodi:cy="36.421127" sodipodi:rx="15.644737" sodipodi:ry="8.3968935" d="m 40.481863,36.421127 c 0,4.637477 -7.004387,8.396894 -15.644737,8.396894 -8.64035,0 -15.6447375,-3.759417 -15.6447375,-8.396894 0,-4.637476 7.0043875,-8.396893 15.6447375,-8.396893 8.64035,0 15.644737,3.759417 15.644737,8.396893 z" transform="matrix(1.470144,0,0,0.535474,-12.76416,20.91534)" inkscape:r_cx="true" inkscape:r_cy="true"/>
|
||||
</g>
|
||||
<g inkscape:groupmode="layer" id="layer2" inkscape:label="A" style="display:inline" transform="translate(0,16)">
|
||||
<path style="fill:url(#linearGradient3257);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3259);stroke-width:1.99999988;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 26.374932,-12.96962 -21.2729682,50.273296 8.5091882,0 4.609143,-10.869901 27.654858,0 4.609144,10.869901 8.509188,0 -21.27297,-50.273296 -11.345583,0 z m 5.672792,6.7936889 10.946716,25.8160161 -21.89343,0 10.946714,-25.8160161 z" id="path2211" inkscape:r_cx="true" inkscape:r_cy="true" inkscape:connector-curvature="0"/>
|
||||
<path sodipodi:nodetypes="ccccccccc" id="path2237" d="m 12.331981,35.262472 -4.243887,0 19.636673,-46.21747 8.641311,-0.02464 L 56,35.26247 51.71067,35.214748 47.262649,24.4293 16.80019,24.412713 z" style="font-size:54.8693924px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:0.6;fill:none;stroke:url(#linearGradient3254);stroke-width:1.99999964;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;font-family:Bitstream Vera Sans" inkscape:r_cx="true" inkscape:r_cy="true" inkscape:connector-curvature="0"/>
|
||||
<path style="opacity:0.47802202;fill:none;stroke:url(#linearGradient3251);stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" d="m 17.974659,21.654907 28.082988,-1e-6 -13.99782,-33.0333 z" id="path2239" sodipodi:nodetypes="cccc" inkscape:r_cx="true" inkscape:r_cy="true" inkscape:connector-curvature="0"/>
|
||||
<rect style="color:#000000;fill:url(#linearGradient3246);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3248);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" id="rect2331" width="54" height="4" x="5" y="41" inkscape:r_cx="true" inkscape:r_cy="true"/>
|
||||
<path style="opacity:0.8;fill:none;stroke:url(#linearGradient3243);stroke-width:0.99999994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" d="m 6.4949748,42.5 51.0100512,0" id="path2353" sodipodi:nodetypes="cc" inkscape:r_cx="true" inkscape:r_cy="true" inkscape:connector-curvature="0"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 16 KiB |
122
src/Mod/Spreadsheet/Gui/Resources/icons/SpreadsheetWorkbench.svg
Normal file
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3783">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3785" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3787" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3783"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.77777777,0,7.1111114)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/Spreadsheet.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9"
|
||||
width="56"
|
||||
height="44"
|
||||
x="4"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="54"
|
||||
height="42"
|
||||
x="5"
|
||||
y="11" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,20 H 61"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 22,9 V 55"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,32 H 61"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,44 H 61"
|
||||
id="path3796" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
version="1.1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<linearGradient
|
||||
id="linearGradient3783">
|
||||
<stop
|
||||
style="stop-color:#d3d7cf;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop3785" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop3787" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient3783"
|
||||
id="linearGradient3789"
|
||||
x1="38"
|
||||
y1="58"
|
||||
x2="21"
|
||||
y2="5"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.77777777,0,7.1111114)" />
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>[Eivind Kvedalen]</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:date>2013-09-29</dc:date>
|
||||
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier>FreeCAD/src/Mod/Spreadsheet/Gui/Resources/icons/Spreadsheet.svg</dc:identifier>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title>FreeCAD LGPL2+</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#ffffff;stroke:#2e3436;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9"
|
||||
width="56"
|
||||
height="44"
|
||||
x="4"
|
||||
y="10" />
|
||||
<rect
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient3789);fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="rect3002-9-3"
|
||||
width="54"
|
||||
height="42"
|
||||
x="5"
|
||||
y="11" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,20 H 61"
|
||||
id="path3790" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 22,9 V 55"
|
||||
id="path3792" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,32 H 61"
|
||||
id="path3794" />
|
||||
<path
|
||||
style="fill:none;stroke:#2e3436;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3,44 H 61"
|
||||
id="path3796" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
1177
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts
Normal file
634
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_af.ts
Normal file
@@ -0,0 +1,634 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="af" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateSpreadsheet</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create spreadsheet</source>
|
||||
<translation type="unfinished">Create spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new spreadsheet</source>
|
||||
<translation type="unfinished">Create a new spreadsheet</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignBottom</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align bottom</source>
|
||||
<translation type="unfinished">Align bottom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align contents of selected cells</source>
|
||||
<translation type="unfinished">Bottom-align contents of selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align center</source>
|
||||
<translation type="unfinished">Align center</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center-align contents of selected cells</source>
|
||||
<translation type="unfinished">Center-align contents of selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignLeft</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align left</source>
|
||||
<translation type="unfinished">Align left</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align contents of selected cells</source>
|
||||
<translation type="unfinished">Left-align contents of selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignRight</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align right</source>
|
||||
<translation type="unfinished">Align right</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align contents of selected cells</source>
|
||||
<translation type="unfinished">Right-align contents of selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignTop</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align top</source>
|
||||
<translation type="unfinished">Align top</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align contents of selected cells</source>
|
||||
<translation type="unfinished">Top-align contents of selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignVCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align</source>
|
||||
<translation type="unfinished">Vertically center-align</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align contents of selected cells</source>
|
||||
<translation type="unfinished">Vertically center-align contents of selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetExport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet</source>
|
||||
<translation type="unfinished">Export spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet to CSV file</source>
|
||||
<translation type="unfinished">Export spreadsheet to CSV file</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetImport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import spreadsheet</source>
|
||||
<translation type="unfinished">Import spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import CSV file into spreadsheet</source>
|
||||
<translation type="unfinished">Import CSV file into spreadsheet</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetMergeCells</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation type="unfinished">Merge cells</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge selected cells</source>
|
||||
<translation type="unfinished">Merge selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSetAlias</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias</source>
|
||||
<translation type="unfinished">Set alias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias for selected cell</source>
|
||||
<translation type="unfinished">Set alias for selected cell</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSplitCell</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation type="unfinished">Split cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split previously merged cells</source>
|
||||
<translation type="unfinished">Split previously merged cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleBold</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold text</source>
|
||||
<translation type="unfinished">Bold text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells bold</source>
|
||||
<translation type="unfinished">Set text in selected cells bold</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleItalic</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic text</source>
|
||||
<translation type="unfinished">Italic text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells italic</source>
|
||||
<translation type="unfinished">Set text in selected cells italic</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleUnderline</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text</source>
|
||||
<translation type="unfinished">Underline text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text in selected cells</source>
|
||||
<translation type="unfinished">Underline text in selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ColorPickerPopup</name>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation type="unfinished">Custom Color</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation type="unfinished">Merge cells</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation type="unfinished">Split cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align cell</source>
|
||||
<translation type="unfinished">Left-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center cell</source>
|
||||
<translation type="unfinished">Center cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align cell</source>
|
||||
<translation type="unfinished">Right-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align cell</source>
|
||||
<translation type="unfinished">Top-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align cell</source>
|
||||
<translation type="unfinished">Bottom-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center cells</source>
|
||||
<translation type="unfinished">Vertically center cells</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set bold text</source>
|
||||
<translation type="unfinished">Set bold text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set italic text</source>
|
||||
<translation type="unfinished">Set italic text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set underline text</source>
|
||||
<translation type="unfinished">Set underline text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Spreadsheet</source>
|
||||
<translation type="unfinished">Create Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell properties</source>
|
||||
<translation type="unfinished">Set cell properties</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit cell</source>
|
||||
<translation type="unfinished">Edit cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert rows</source>
|
||||
<translation type="unfinished">Insert rows</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove rows</source>
|
||||
<translation type="unfinished">Remove rows</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert columns</source>
|
||||
<translation type="unfinished">Insert columns</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear cell(s)</source>
|
||||
<translation type="unfinished">Clear cell(s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set foreground color</source>
|
||||
<translation type="unfinished">Set foreground color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set background color</source>
|
||||
<translation type="unfinished">Set background color</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PropertiesDialog</name>
|
||||
<message>
|
||||
<source>Cell properties</source>
|
||||
<translation type="unfinished">Cell properties</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Color</source>
|
||||
<translation type="unfinished">&Color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Text</source>
|
||||
<translation>Teks</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Background</source>
|
||||
<translation type="unfinished">Background</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alignment</source>
|
||||
<translation type="unfinished">&Alignment</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Horizontal</source>
|
||||
<translation>Horisontaal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left</source>
|
||||
<translation>Links</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center</source>
|
||||
<translation type="unfinished">Center</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right</source>
|
||||
<translation>Regs</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertical</source>
|
||||
<translation>Vertikaal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top</source>
|
||||
<translation>Bo-aansig</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom</source>
|
||||
<translation>Bodem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Style</source>
|
||||
<translation type="unfinished">&Style</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold</source>
|
||||
<translation type="unfinished">Bold</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic</source>
|
||||
<translation type="unfinished">Italic</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline</source>
|
||||
<translation type="unfinished">Underline</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Display unit</source>
|
||||
<translation type="unfinished">&Display unit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unit string</source>
|
||||
<translation type="unfinished">Unit string</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A&lias</source>
|
||||
<translation type="unfinished">A&lias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias for this cell</source>
|
||||
<translation type="unfinished">Alias for this cell</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>All (*)</source>
|
||||
<translation type="unfinished">All (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import file</source>
|
||||
<translation>Voer lêer in</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export file</source>
|
||||
<translation>Voer lêer uit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show spreadsheet</source>
|
||||
<translation type="unfinished">Show spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) foreground color</source>
|
||||
<translation type="unfinished">Set cell(s) foreground color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) foreground color</source>
|
||||
<translation type="unfinished">Sets the Spreadsheet cell(s) foreground color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) background color</source>
|
||||
<translation type="unfinished">Set cell(s) background color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) background color</source>
|
||||
<translation type="unfinished">Sets the Spreadsheet cell(s) background color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet does not support range selection when pasting.
|
||||
Please select one cell only.</source>
|
||||
<translation type="unfinished">Spreadsheet does not support range selection when pasting.
|
||||
Please select one cell only.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy & Paste failed</source>
|
||||
<translation type="unfinished">Copy & Paste failed</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias contains invalid characters!</source>
|
||||
<translation type="unfinished">Alias contains invalid characters!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation type="unfinished">Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtColorPicker</name>
|
||||
<message>
|
||||
<source>Black</source>
|
||||
<translation>Swart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>White</source>
|
||||
<translation>Wit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Red</source>
|
||||
<translation type="unfinished">Red</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark red</source>
|
||||
<translation type="unfinished">Dark red</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Green</source>
|
||||
<translation type="unfinished">Green</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark green</source>
|
||||
<translation type="unfinished">Dark green</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blue</source>
|
||||
<translation type="unfinished">Blue</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark blue</source>
|
||||
<translation type="unfinished">Dark blue</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cyan</source>
|
||||
<translation type="unfinished">Cyan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark cyan</source>
|
||||
<translation type="unfinished">Dark cyan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Magenta</source>
|
||||
<translation type="unfinished">Magenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark magenta</source>
|
||||
<translation type="unfinished">Dark magenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yellow</source>
|
||||
<translation type="unfinished">Yellow</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark yellow</source>
|
||||
<translation type="unfinished">Dark yellow</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Gray</source>
|
||||
<translation type="unfinished">Gray</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark gray</source>
|
||||
<translation type="unfinished">Dark gray</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Light gray</source>
|
||||
<translation type="unfinished">Light gray</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation type="unfinished">Custom Color</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sheet</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation>Vorm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Content:</source>
|
||||
<translation type="unfinished">&Content:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alias:</source>
|
||||
<translation type="unfinished">&Alias:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation type="unfinished">Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::Module</name>
|
||||
<message>
|
||||
<source>Unnamed</source>
|
||||
<translation type="unfinished">Unnamed</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::SheetTableView</name>
|
||||
<message>
|
||||
<source>Properties...</source>
|
||||
<translation type="unfinished">Properties...</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) above</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) below</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous rows</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove row(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) left</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) right</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous columns</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove column(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation type="unfinished">Spreadsheet</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
666
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ar.ts
Normal file
@@ -0,0 +1,666 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ar" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateSpreadsheet</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create spreadsheet</source>
|
||||
<translation>إنشاء جدول بيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new spreadsheet</source>
|
||||
<translation>إنشاء جدول بيانات جديد</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignBottom</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align bottom</source>
|
||||
<translation>محاذاة لأسفل</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align contents of selected cells</source>
|
||||
<translation>محاذاة محتويات الخلايا المحددة لأسفل</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align center</source>
|
||||
<translation>محاذاة للوسط</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center-align contents of selected cells</source>
|
||||
<translation>محتويات الخلايا المحددة المحاذاة في الوسط</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignLeft</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align left</source>
|
||||
<translation>محاذاة لليسار</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align contents of selected cells</source>
|
||||
<translation>محاذاة محتويات الخلايا المحددة لليسار</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignRight</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align right</source>
|
||||
<translation>محاذاة لليمين</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align contents of selected cells</source>
|
||||
<translation>محاذاة محتويات الخلايا المحددة لليمين</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignTop</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align top</source>
|
||||
<translation>محاذاة لأعلى</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align contents of selected cells</source>
|
||||
<translation>محتويات الخلايا المحددة المحاذاة لأعلى</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignVCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align</source>
|
||||
<translation>محاذاة للوسط رأسيا</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align contents of selected cells</source>
|
||||
<translation>محتويات الخلايا المحددة المحاذاة للوسط رأسيا</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetExport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet</source>
|
||||
<translation>تصدير جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet to CSV file</source>
|
||||
<translation>تصدير جدول البيانات إلى ملف CSV</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetImport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import spreadsheet</source>
|
||||
<translation>استيراد جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import CSV file into spreadsheet</source>
|
||||
<translation>استيراد ملف CSV إلى جدول البيانات</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetMergeCells</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>دمج الخلايا</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge selected cells</source>
|
||||
<translation>ادمج الخلايا المحددة</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSetAlias</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias</source>
|
||||
<translation>عرف الاسم المستعار</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias for selected cell</source>
|
||||
<translation>عرف الاسم المستعار للخلية المحددة</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSplitCell</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>تقسيم الخلية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split previously merged cells</source>
|
||||
<translation>افصل الخلايا المدمجة سابقا</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleBold</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold text</source>
|
||||
<translation>نص عريض</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells bold</source>
|
||||
<translation>اجعل النص في الخلايا المحددة بالخط العريض</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleItalic</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic text</source>
|
||||
<translation>نص مائل</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells italic</source>
|
||||
<translation>اجعل النص في الخلايا المحددة بالخط المائل</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleUnderline</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text</source>
|
||||
<translation>تسطير النص</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text in selected cells</source>
|
||||
<translation>ضع خطا تحت النص في الخلايا المحددة</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ColorPickerPopup</name>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation>لون معرف</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>دمج الخلايا</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>تقسيم الخلية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align cell</source>
|
||||
<translation>محاذاة الخلية لليسار</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center cell</source>
|
||||
<translation>توسيط الخلية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align cell</source>
|
||||
<translation>محاذاة الخلية لليمين</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align cell</source>
|
||||
<translation>محاذاة الخلية للأعلى</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align cell</source>
|
||||
<translation>محاذاة الخلية للأسفل</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center cells</source>
|
||||
<translation>محاذاة الخلايا للوسط رأسيًا</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set bold text</source>
|
||||
<translation>تعيين نص بالخط العريض</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set italic text</source>
|
||||
<translation>تعيين نص مائل</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set underline text</source>
|
||||
<translation>تسطير النص</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Spreadsheet</source>
|
||||
<translation>إنشاء جدول بيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell properties</source>
|
||||
<translation>تعيين خصائص الخلية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit cell</source>
|
||||
<translation>تعديل الخلية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert rows</source>
|
||||
<translation>إدراج صفوف</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove rows</source>
|
||||
<translation>إزالة صفوف</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert columns</source>
|
||||
<translation>إدراج أعمدة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear cell(s)</source>
|
||||
<translation>مسح الخلية (خلايا)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set foreground color</source>
|
||||
<translation>تعيين اللون الأمامي</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set background color</source>
|
||||
<translation>تعيين لون الخلفية</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PropertiesDialog</name>
|
||||
<message>
|
||||
<source>Cell properties</source>
|
||||
<translation>خصائص الخلية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Color</source>
|
||||
<translation>&لون</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Text</source>
|
||||
<translation>نص</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Background</source>
|
||||
<translation>الخلفية</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alignment</source>
|
||||
<translation>&المحاذاة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Horizontal</source>
|
||||
<translation>أفقيا</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left</source>
|
||||
<translation>يسار</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center</source>
|
||||
<translation>مركز</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right</source>
|
||||
<translation>يمين</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertical</source>
|
||||
<translation>رأسيا</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top</source>
|
||||
<translation>أعلى</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom</source>
|
||||
<translation>أسفل</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Style</source>
|
||||
<translation>نمط</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold</source>
|
||||
<translation>عريض</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic</source>
|
||||
<translation>مائل</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline</source>
|
||||
<translation>تسطير</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Display unit</source>
|
||||
<translation>&عرض الوحدة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unit string</source>
|
||||
<translation>وحدة سلسلة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A&lias</source>
|
||||
<translation>الاسم المستعار</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias for this cell</source>
|
||||
<translation>الاسم المستعار لهذه الخلية</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>All (*)</source>
|
||||
<translation>الكل (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import file</source>
|
||||
<translation>استيراد ملف</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export file</source>
|
||||
<translation>تصدير ملف</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show spreadsheet</source>
|
||||
<translation>إظهار جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) foreground color</source>
|
||||
<translation>تعيين لون المقدمة للخلية(خلايا)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) foreground color</source>
|
||||
<translation>تقوم بتعيين لون المقدمة لخلية(خلايا) جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) background color</source>
|
||||
<translation>تعيين لون الخلفية للخلية(خلايا)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) background color</source>
|
||||
<translation>تقوم بتعيين لون الخلفية لخلية(خلايا) جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet does not support range selection when pasting.
|
||||
Please select one cell only.</source>
|
||||
<translation>جدول البيانات لا يدعم تحديد النطاق عند اللصق.
|
||||
الرجاء تحديد خلية واحدة فقط.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy & Paste failed</source>
|
||||
<translation>فشل النسخ واللصق</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias contains invalid characters!</source>
|
||||
<translation>الاسم المستعار يحتوي على أحرف غير صالحة!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation>الرجوع إلى الخلية بواسطة الاسم المستعار، على سبيل المثال
|
||||
Spreadsheet.my_alias_name بدلاً من Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtColorPicker</name>
|
||||
<message>
|
||||
<source>Black</source>
|
||||
<translation>أسود</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>White</source>
|
||||
<translation>أبيض</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Red</source>
|
||||
<translation>أحمر</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark red</source>
|
||||
<translation>أحمر داكن</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Green</source>
|
||||
<translation>أخضر</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark green</source>
|
||||
<translation>أخضر داكن</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blue</source>
|
||||
<translation>أزرق</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark blue</source>
|
||||
<translation>أزرق داكن</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cyan</source>
|
||||
<translation>سماوي</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark cyan</source>
|
||||
<translation>سماوي داكن</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Magenta</source>
|
||||
<translation>أرجواني</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark magenta</source>
|
||||
<translation>أرجواني داكن</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yellow</source>
|
||||
<translation>أصفر</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark yellow</source>
|
||||
<translation>أصفر داكن</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Gray</source>
|
||||
<translation>رمادي</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark gray</source>
|
||||
<translation>رمادي داكن</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Light gray</source>
|
||||
<translation>رمادي فاتح</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation>لون معرف</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sheet</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation>إستمارة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Content:</source>
|
||||
<translation>والمحتوى:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alias:</source>
|
||||
<translation>والاسم المستعار:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation>الرجوع إلى الخلية بواسطة الاسم المستعار، على سبيل المثال
|
||||
Spreadsheet.my_alias_name بدلاً من Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::Module</name>
|
||||
<message>
|
||||
<source>Unnamed</source>
|
||||
<translation>غير مسمى</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::SheetTableView</name>
|
||||
<message>
|
||||
<source>Properties...</source>
|
||||
<translation>خصائص...</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) above</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) below</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous rows</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove row(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) left</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) right</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous columns</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove column(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>جدول البيانات</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
1233
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts
Normal file
634
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_bg.ts
Normal file
@@ -0,0 +1,634 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bg" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateSpreadsheet</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create spreadsheet</source>
|
||||
<translation>Създаване на електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new spreadsheet</source>
|
||||
<translation>Създаване на нова електронна таблица</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignBottom</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align bottom</source>
|
||||
<translation>Подравни отдолу</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align contents of selected cells</source>
|
||||
<translation>Подравнява съдържанието на избраните клетки отдолу</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align center</source>
|
||||
<translation>Центриране</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center-align contents of selected cells</source>
|
||||
<translation>Центрира съдържанието на избраните клетки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignLeft</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align left</source>
|
||||
<translation>Приравни вляво</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align contents of selected cells</source>
|
||||
<translation>Подравнява съдържанието на избраните клетки в ляво</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignRight</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align right</source>
|
||||
<translation>Приравни вдясно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align contents of selected cells</source>
|
||||
<translation>Подравнява съдържанието на избраните клетки в дясно</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignTop</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align top</source>
|
||||
<translation>Подравни отгоре</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align contents of selected cells</source>
|
||||
<translation>Подравнява съдържанието на избраните клетки отгоре</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignVCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align</source>
|
||||
<translation>Вертикално центриране</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align contents of selected cells</source>
|
||||
<translation>Вертикално центрира съдържанието на избраните клетки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetExport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet</source>
|
||||
<translation>Износ на електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet to CSV file</source>
|
||||
<translation>Износ на електронна таблица в CSV файл</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetImport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import spreadsheet</source>
|
||||
<translation>Внос на електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import CSV file into spreadsheet</source>
|
||||
<translation>Внос на електронна таблица от CSV файл</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetMergeCells</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>Сливане на клетки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge selected cells</source>
|
||||
<translation>Сливане на избраните клетки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSetAlias</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias</source>
|
||||
<translation>Задаване на псевдоним</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias for selected cell</source>
|
||||
<translation>Задаване на псевдоним за избраната клетка</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSplitCell</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>Разделяне на клетки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split previously merged cells</source>
|
||||
<translation>Разделяне на предишно слети клетки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleBold</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold text</source>
|
||||
<translation>Получер текст</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells bold</source>
|
||||
<translation>Задава удебелен текст в избраните клетки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleItalic</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic text</source>
|
||||
<translation>Курсивен текст</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells italic</source>
|
||||
<translation>Задава текстът да бъде курсив в избраните клетки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleUnderline</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text</source>
|
||||
<translation>Подчертан текст</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text in selected cells</source>
|
||||
<translation>Подчертан текст в избраните клетки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ColorPickerPopup</name>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation>Потребителски цвят</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>Сливане на клетки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>Разделяне на клетки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align cell</source>
|
||||
<translation>Ляво подравнена клетка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center cell</source>
|
||||
<translation>Центрирана клетка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align cell</source>
|
||||
<translation>Дясно подравнена клетка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align cell</source>
|
||||
<translation>Отгоре подравнена клетка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align cell</source>
|
||||
<translation>Отдолу подравнена клетка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center cells</source>
|
||||
<translation>Вертикално центрирани клетки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set bold text</source>
|
||||
<translation>Удебели текста</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set italic text</source>
|
||||
<translation>Наклони текста</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set underline text</source>
|
||||
<translation>Подчертай текста</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Spreadsheet</source>
|
||||
<translation>Създаване на електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell properties</source>
|
||||
<translation>Задаване на свойства на клетката</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit cell</source>
|
||||
<translation>Редакция на клетка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert rows</source>
|
||||
<translation>Вмъкване на редове</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove rows</source>
|
||||
<translation>Премахване на редове</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert columns</source>
|
||||
<translation>Вмъкване на колони</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear cell(s)</source>
|
||||
<translation>Изчистване съдържанието на клетка(и)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set foreground color</source>
|
||||
<translation>Задаване на цвят на текст</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set background color</source>
|
||||
<translation>Задаване на цвят на фона</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PropertiesDialog</name>
|
||||
<message>
|
||||
<source>Cell properties</source>
|
||||
<translation>Свойства на клетката</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Color</source>
|
||||
<translation>&Цвят</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Text</source>
|
||||
<translation>Текст</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Background</source>
|
||||
<translation>Фон</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alignment</source>
|
||||
<translation>&Подравняване</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Horizontal</source>
|
||||
<translation>По хоризонталата</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left</source>
|
||||
<translation>Left</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center</source>
|
||||
<translation>Център</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right</source>
|
||||
<translation>Right</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertical</source>
|
||||
<translation>По вертикалата</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top</source>
|
||||
<translation>Top</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom</source>
|
||||
<translation>Bottom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Style</source>
|
||||
<translation>&Стил</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold</source>
|
||||
<translation>Получер</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic</source>
|
||||
<translation>Курсив</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline</source>
|
||||
<translation>Подчертаване</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Display unit</source>
|
||||
<translation>&Показване на мерната единица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unit string</source>
|
||||
<translation>Низ на мерната единица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A&lias</source>
|
||||
<translation>П&севдоним</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias for this cell</source>
|
||||
<translation>Псевдоним за тази клетка</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>All (*)</source>
|
||||
<translation>Всички (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import file</source>
|
||||
<translation>Import file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export file</source>
|
||||
<translation>Export file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show spreadsheet</source>
|
||||
<translation>Показване на е-таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) foreground color</source>
|
||||
<translation>Задаване на цвят на преден план на клетките</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) foreground color</source>
|
||||
<translation>Задава цвят на преден план в клетките на е-таблицата</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) background color</source>
|
||||
<translation>Задаване на цвят на фона на клетките</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) background color</source>
|
||||
<translation>Задава фонов цвят в клетките на е-таблицата</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet does not support range selection when pasting.
|
||||
Please select one cell only.</source>
|
||||
<translation>Електронната таблица не поддържа Поставяне при избрана повече от една клетка.
|
||||
Моля изберете само една клетка.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy & Paste failed</source>
|
||||
<translation>Несполучливо Копиране & Поставяне</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias contains invalid characters!</source>
|
||||
<translation>Псевдонимът съдържа невалидни символи!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation>Достъп до клетката по псевдоним, пример
|
||||
Spreadsheet.Псевдоним вместо Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtColorPicker</name>
|
||||
<message>
|
||||
<source>Black</source>
|
||||
<translation>Черно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>White</source>
|
||||
<translation>Бяло</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Red</source>
|
||||
<translation>Червено</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark red</source>
|
||||
<translation>Тъмно червено</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Green</source>
|
||||
<translation>Зелено</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark green</source>
|
||||
<translation>Тъмно зелено</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blue</source>
|
||||
<translation>Синьо</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark blue</source>
|
||||
<translation>Тъмно синьо</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cyan</source>
|
||||
<translation>Циан</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark cyan</source>
|
||||
<translation>Тъмносин</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Magenta</source>
|
||||
<translation>Пурпурно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark magenta</source>
|
||||
<translation>Тъмно пурпурно</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yellow</source>
|
||||
<translation>Жълто</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark yellow</source>
|
||||
<translation>Тъмно жълто</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Gray</source>
|
||||
<translation>Сиво</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark gray</source>
|
||||
<translation>Тъмно сиво</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Light gray</source>
|
||||
<translation>Светло сиво</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation>Потребителски цвят</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sheet</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished">Form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Content:</source>
|
||||
<translation>&Съдържание:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alias:</source>
|
||||
<translation>&Псевдоним:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation>Достъп до клетката по псевдоним, пример
|
||||
Spreadsheet.Псевдоним вместо Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::Module</name>
|
||||
<message>
|
||||
<source>Unnamed</source>
|
||||
<translation>Безименно</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::SheetTableView</name>
|
||||
<message>
|
||||
<source>Properties...</source>
|
||||
<translation>Свойства...</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) above</source>
|
||||
<translation>
|
||||
<numerusform>Вмъкни %n ред(ове) отгоре</numerusform>
|
||||
<numerusform>Вмъкни %n реда отгоре</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) below</source>
|
||||
<translation>
|
||||
<numerusform>Вмъкни %n ред отдолу</numerusform>
|
||||
<numerusform>Вмъкни %n реда отдолу</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous rows</source>
|
||||
<translation>
|
||||
<numerusform>Вмъкни %n непоследователни реда</numerusform>
|
||||
<numerusform>Вмъкни %n непоследователни реда</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove row(s)</source>
|
||||
<translation>
|
||||
<numerusform>Премахни ред</numerusform>
|
||||
<numerusform>Премахни редове</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) left</source>
|
||||
<translation>
|
||||
<numerusform>Вмъкни %n колона от ляво</numerusform>
|
||||
<numerusform>Вмъкни %n колони от ляво</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) right</source>
|
||||
<translation>
|
||||
<numerusform>Вмъкни %n колона от дясно</numerusform>
|
||||
<numerusform>Вмъкни %n колони от дясно</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous columns</source>
|
||||
<translation>
|
||||
<numerusform>Вмъкни %n непоследователни колони</numerusform>
|
||||
<numerusform>Вмъкни %n непоследователни колони</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove column(s)</source>
|
||||
<translation>
|
||||
<numerusform>Премахни колона</numerusform>
|
||||
<numerusform>Премахни колони</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Електронна таблица</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
1209
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts
Normal file
1233
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_da.ts
Normal file
1214
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts
Normal file
1205
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts
Normal file
1219
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts
Normal file
1145
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fil.ts
Normal file
1215
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts
Normal file
1241
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ga-IE.ts
Normal file
1173
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts
Normal file
1228
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts
Normal file
1215
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts
Normal file
1165
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts
Normal file
1202
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts
Normal file
1210
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts
Normal file
@@ -0,0 +1,634 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="kab" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateSpreadsheet</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create spreadsheet</source>
|
||||
<translation>Créer une feuille de calcul</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new spreadsheet</source>
|
||||
<translation>Créer une nouvelle feuille de calcul</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignBottom</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align bottom</source>
|
||||
<translation>Aligner en bas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align contents of selected cells</source>
|
||||
<translation>Aligne le contenu des cellules sélectionnées en bas</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align center</source>
|
||||
<translation>Alignement au centre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center-align contents of selected cells</source>
|
||||
<translation>Aligne le contenu des cellules sélectionnées au centre</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignLeft</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align left</source>
|
||||
<translation>Alignement à gauche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align contents of selected cells</source>
|
||||
<translation>Aligne le contenu des cellules sélectionnées à gauche</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignRight</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align right</source>
|
||||
<translation>Alignement à droite</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align contents of selected cells</source>
|
||||
<translation>Aligne le contenu des cellules sélectionnées à droite</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignTop</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align top</source>
|
||||
<translation>Alignement en haut</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align contents of selected cells</source>
|
||||
<translation>Aligne le contenu des cellules sélectionnées en haut</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignVCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align</source>
|
||||
<translation>Alignement vertical au centre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align contents of selected cells</source>
|
||||
<translation type="unfinished">Vertically center-align contents of selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetExport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet</source>
|
||||
<translation>Exporter la feuille de calcul</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet to CSV file</source>
|
||||
<translation>Exporter la feuille de calcul vers un fichier CSV</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetImport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import spreadsheet</source>
|
||||
<translation>Importer une feuille de calcul</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import CSV file into spreadsheet</source>
|
||||
<translation>Importer un fichier CSV dans une feuille de calcul</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetMergeCells</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>Fusionner des cellules</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge selected cells</source>
|
||||
<translation type="unfinished">Merge selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSetAlias</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias</source>
|
||||
<translation>Alias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias for selected cell</source>
|
||||
<translation>Alias de la cellule sélectionnée</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSplitCell</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>Diviser la cellule</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split previously merged cells</source>
|
||||
<translation type="unfinished">Split previously merged cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleBold</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold text</source>
|
||||
<translation>Texte en gras</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells bold</source>
|
||||
<translation type="unfinished">Set text in selected cells bold</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleItalic</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic text</source>
|
||||
<translation>Texte en italique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells italic</source>
|
||||
<translation type="unfinished">Set text in selected cells italic</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleUnderline</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text</source>
|
||||
<translation>Texte souligné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text in selected cells</source>
|
||||
<translation type="unfinished">Underline text in selected cells</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ColorPickerPopup</name>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation type="unfinished">Custom Color</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>Fusionner des cellules</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>Diviser la cellule</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align cell</source>
|
||||
<translation type="unfinished">Left-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center cell</source>
|
||||
<translation type="unfinished">Center cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align cell</source>
|
||||
<translation type="unfinished">Right-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align cell</source>
|
||||
<translation type="unfinished">Top-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align cell</source>
|
||||
<translation type="unfinished">Bottom-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center cells</source>
|
||||
<translation type="unfinished">Vertically center cells</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set bold text</source>
|
||||
<translation type="unfinished">Set bold text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set italic text</source>
|
||||
<translation type="unfinished">Set italic text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set underline text</source>
|
||||
<translation type="unfinished">Set underline text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Spreadsheet</source>
|
||||
<translation type="unfinished">Create Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell properties</source>
|
||||
<translation type="unfinished">Set cell properties</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit cell</source>
|
||||
<translation type="unfinished">Edit cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert rows</source>
|
||||
<translation>Insérer des lignes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove rows</source>
|
||||
<translation>Supprimer des lignes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert columns</source>
|
||||
<translation>Insérer des colonnes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear cell(s)</source>
|
||||
<translation type="unfinished">Clear cell(s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set foreground color</source>
|
||||
<translation type="unfinished">Set foreground color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set background color</source>
|
||||
<translation type="unfinished">Set background color</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PropertiesDialog</name>
|
||||
<message>
|
||||
<source>Cell properties</source>
|
||||
<translation>Propriétés de la cellule</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Color</source>
|
||||
<translation>&Couleur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Text</source>
|
||||
<translation>Aḍris</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Background</source>
|
||||
<translation>Arrière-plan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alignment</source>
|
||||
<translation>&Alignement</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Horizontal</source>
|
||||
<translation type="unfinished">Horizontal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left</source>
|
||||
<translation>Gauche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center</source>
|
||||
<translation>Centre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right</source>
|
||||
<translation>Droit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertical</source>
|
||||
<translation type="unfinished">Vertical</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top</source>
|
||||
<translation>Dessus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom</source>
|
||||
<translation>Dessous</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Style</source>
|
||||
<translation>a&ɣanib</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold</source>
|
||||
<translation>Gras</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic</source>
|
||||
<translation>Italique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline</source>
|
||||
<translation>Souligné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Display unit</source>
|
||||
<translation>&Affichage unités</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unit string</source>
|
||||
<translation>Texte unité</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A&lias</source>
|
||||
<translation type="unfinished">A&lias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias for this cell</source>
|
||||
<translation>Alias pour cette cellule</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>All (*)</source>
|
||||
<translation>Tous (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import file</source>
|
||||
<translation>Importer un fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export file</source>
|
||||
<translation>Exporter un fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show spreadsheet</source>
|
||||
<translation>Voir la feuille de calcul</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) foreground color</source>
|
||||
<translation type="unfinished">Set cell(s) foreground color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) foreground color</source>
|
||||
<translation type="unfinished">Sets the Spreadsheet cell(s) foreground color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) background color</source>
|
||||
<translation type="unfinished">Set cell(s) background color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) background color</source>
|
||||
<translation type="unfinished">Sets the Spreadsheet cell(s) background color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet does not support range selection when pasting.
|
||||
Please select one cell only.</source>
|
||||
<translation type="unfinished">Spreadsheet does not support range selection when pasting.
|
||||
Please select one cell only.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy & Paste failed</source>
|
||||
<translation type="unfinished">Copy & Paste failed</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias contains invalid characters!</source>
|
||||
<translation type="unfinished">Alias contains invalid characters!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation type="unfinished">Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtColorPicker</name>
|
||||
<message>
|
||||
<source>Black</source>
|
||||
<translation>Noir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>White</source>
|
||||
<translation>Blanc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Red</source>
|
||||
<translation>Rouge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark red</source>
|
||||
<translation>Rouge foncé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Green</source>
|
||||
<translation>Vert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark green</source>
|
||||
<translation>Vert foncé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blue</source>
|
||||
<translation>Bleu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark blue</source>
|
||||
<translation>Bleu foncé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cyan</source>
|
||||
<translation type="unfinished">Cyan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark cyan</source>
|
||||
<translation>Cyan foncé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Magenta</source>
|
||||
<translation type="unfinished">Magenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark magenta</source>
|
||||
<translation>Magenta foncé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yellow</source>
|
||||
<translation>Jaune</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark yellow</source>
|
||||
<translation>Jaune foncé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Gray</source>
|
||||
<translation>Gris</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark gray</source>
|
||||
<translation>Gris foncé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Light gray</source>
|
||||
<translation>Gris clair</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation type="unfinished">Custom Color</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sheet</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation>Forme</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Content:</source>
|
||||
<translation type="unfinished">&Content:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alias:</source>
|
||||
<translation type="unfinished">&Alias:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation type="unfinished">Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::Module</name>
|
||||
<message>
|
||||
<source>Unnamed</source>
|
||||
<translation>Sans nom</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::SheetTableView</name>
|
||||
<message>
|
||||
<source>Properties...</source>
|
||||
<translation>Propriétés...</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) above</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) below</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous rows</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove row(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) left</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) right</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous columns</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove column(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Tableur</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
1194
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts
Normal file
1233
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_lt.ts
Normal file
1209
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ms.ts
Normal file
1206
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts
Normal file
631
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_no.ts
Normal file
@@ -0,0 +1,631 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="no" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateSpreadsheet</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create spreadsheet</source>
|
||||
<translation>Opprett regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new spreadsheet</source>
|
||||
<translation>Opprett et nytt regneark</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignBottom</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align bottom</source>
|
||||
<translation>Juster til bunn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align contents of selected cells</source>
|
||||
<translation>Juster celleinnhold nederst i merkede celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align center</source>
|
||||
<translation>Juster til midten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center-align contents of selected cells</source>
|
||||
<translation>Sentrer celleinnhold i merkede celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignLeft</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align left</source>
|
||||
<translation>Venstrejuster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align contents of selected cells</source>
|
||||
<translation>Venstrejuster innholdet i merkede celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignRight</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align right</source>
|
||||
<translation>Høyrejuster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align contents of selected cells</source>
|
||||
<translation>Høyrejuster innholdet i merkede celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignTop</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align top</source>
|
||||
<translation>Toppjuster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align contents of selected cells</source>
|
||||
<translation>Toppjuster innholdet i merkede celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetAlignVCenter</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align</source>
|
||||
<translation>Senterjuster vertikalt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center-align contents of selected cells</source>
|
||||
<translation>Senterjuster innholdet i de valgte cellene vertikalt</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetExport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet</source>
|
||||
<translation>Eksportere regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export spreadsheet to CSV file</source>
|
||||
<translation>Eksporter regnearket til en komma-separert fil</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetImport</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import spreadsheet</source>
|
||||
<translation>Importer regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import CSV file into spreadsheet</source>
|
||||
<translation>Importer kommaseparert fil</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetMergeCells</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>Slå sammen celler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Merge selected cells</source>
|
||||
<translation>Slå sammen valgte celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSetAlias</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias</source>
|
||||
<translation>Angi alias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set alias for selected cell</source>
|
||||
<translation>Angi alias for valgte celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetSplitCell</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>Splitt celler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split previously merged cells</source>
|
||||
<translation>Del tidligere sammenslåtte celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleBold</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold text</source>
|
||||
<translation>Fet tekst</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells bold</source>
|
||||
<translation>Gjør teksten i valgte celler fet</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleItalic</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic text</source>
|
||||
<translation>Kursiv tekst</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set text in selected cells italic</source>
|
||||
<translation>Gjør teksten i valgte celler kursiv</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdSpreadsheetStyleUnderline</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text</source>
|
||||
<translation>Understreke tekst</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline text in selected cells</source>
|
||||
<translation>Understrek teksten i valgte celler</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ColorPickerPopup</name>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation>Egendefinert farge</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<source>Merge cells</source>
|
||||
<translation>Slå sammen celler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split cell</source>
|
||||
<translation>Splitt celler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left-align cell</source>
|
||||
<translation type="unfinished">Left-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center cell</source>
|
||||
<translation type="unfinished">Center cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right-align cell</source>
|
||||
<translation type="unfinished">Right-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top-align cell</source>
|
||||
<translation type="unfinished">Top-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom-align cell</source>
|
||||
<translation type="unfinished">Bottom-align cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertically center cells</source>
|
||||
<translation type="unfinished">Vertically center cells</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set bold text</source>
|
||||
<translation type="unfinished">Set bold text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set italic text</source>
|
||||
<translation type="unfinished">Set italic text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set underline text</source>
|
||||
<translation type="unfinished">Set underline text</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Spreadsheet</source>
|
||||
<translation type="unfinished">Create Spreadsheet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell properties</source>
|
||||
<translation type="unfinished">Set cell properties</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Edit cell</source>
|
||||
<translation type="unfinished">Edit cell</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert rows</source>
|
||||
<translation>Sett inn rader</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove rows</source>
|
||||
<translation>Fjern rader</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert columns</source>
|
||||
<translation>Sett inn kolonner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear cell(s)</source>
|
||||
<translation type="unfinished">Clear cell(s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set foreground color</source>
|
||||
<translation type="unfinished">Set foreground color</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set background color</source>
|
||||
<translation type="unfinished">Set background color</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PropertiesDialog</name>
|
||||
<message>
|
||||
<source>Cell properties</source>
|
||||
<translation>Egenskaper for celle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Color</source>
|
||||
<translation>&Farge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Text</source>
|
||||
<translation>Tekst</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Background</source>
|
||||
<translation>Bakgrunn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alignment</source>
|
||||
<translation>&Justering</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Horizontal</source>
|
||||
<translation>Horisontal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Left</source>
|
||||
<translation>Venstre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Center</source>
|
||||
<translation>Midtstill</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Right</source>
|
||||
<translation>Høyre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertical</source>
|
||||
<translation>Vertikal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Top</source>
|
||||
<translation>Topp</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bottom</source>
|
||||
<translation>Bunn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Style</source>
|
||||
<translation>&Stil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold</source>
|
||||
<translation>Fet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic</source>
|
||||
<translation>Kursiv</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline</source>
|
||||
<translation>Understreking</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Display unit</source>
|
||||
<translation>&Visningsenhet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unit string</source>
|
||||
<translation>Enhetsstreng</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>A&lias</source>
|
||||
<translation>A&lias</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias for this cell</source>
|
||||
<translation>Alias for denne cellen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>All (*)</source>
|
||||
<translation>Alle (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import file</source>
|
||||
<translation>Importer fil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Export file</source>
|
||||
<translation>Eksporter fil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show spreadsheet</source>
|
||||
<translation>Vis regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) foreground color</source>
|
||||
<translation>Angi forgrunnsfarge for cellen(e)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) foreground color</source>
|
||||
<translation>Angi forgrunnsfarge for cellen(e) i regnearket</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set cell(s) background color</source>
|
||||
<translation>Angi bakgrunnsfarge for cellen(e)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sets the Spreadsheet cell(s) background color</source>
|
||||
<translation>Angi bakgrunnsfarge for cellen(e) i regnearket</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Spreadsheet does not support range selection when pasting.
|
||||
Please select one cell only.</source>
|
||||
<translation>Regnearket støtter ikke valg av område ved innliming. Velg kun en celle.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy & Paste failed</source>
|
||||
<translation>Kopier og lim feilet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alias contains invalid characters!</source>
|
||||
<translation>Aliaset inneholder ugyldige tegn!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation>Referer til celler med alias, for eksempel Spreadsheet.mitt_alias i stedet for Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtColorPicker</name>
|
||||
<message>
|
||||
<source>Black</source>
|
||||
<translation>Svart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>White</source>
|
||||
<translation>Hvit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Red</source>
|
||||
<translation>Rød</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark red</source>
|
||||
<translation>Mørk rød</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Green</source>
|
||||
<translation>Grønn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark green</source>
|
||||
<translation>Mørk grønn</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blue</source>
|
||||
<translation>Blå</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark blue</source>
|
||||
<translation>Mørk blå</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cyan</source>
|
||||
<translation>Cyan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark cyan</source>
|
||||
<translation>Mørk cyan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Magenta</source>
|
||||
<translation>Magenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark magenta</source>
|
||||
<translation>Mørk magenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Yellow</source>
|
||||
<translation>Gul</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark yellow</source>
|
||||
<translation>Mørk gul</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Gray</source>
|
||||
<translation>Grå</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dark gray</source>
|
||||
<translation>Mørk grå</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Light gray</source>
|
||||
<translation>Lys grå</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Custom Color</source>
|
||||
<translation>Egendefinert farge</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Sheet</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation>Skjema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Content:</source>
|
||||
<translation>&Innhold:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Alias:</source>
|
||||
<translation>&Alias:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</source>
|
||||
<translation>Referer til celler med alias, for eksempel Spreadsheet.mitt_alias i stedet for Spreadsheet.B1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::Module</name>
|
||||
<message>
|
||||
<source>Unnamed</source>
|
||||
<translation>Uten navn</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SpreadsheetGui::SheetTableView</name>
|
||||
<message>
|
||||
<source>Properties...</source>
|
||||
<translation>Egenskaper...</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) above</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
<numerusform>Insert %n row(s) above</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n row(s) below</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
<numerusform>Insert %n row(s) below</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous rows</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
<numerusform>Insert %n non-contiguous rows</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove row(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
<numerusform>Remove row(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) left</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
<numerusform>Insert %n column(s) left</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n column(s) right</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
<numerusform>Insert %n column(s) right</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Insert %n non-contiguous columns</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
<numerusform>Insert %n non-contiguous columns</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<source>Remove column(s)</source>
|
||||
<translation type="unfinished">
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
<numerusform>Remove column(s)</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<source>Spreadsheet</source>
|
||||
<translation>Regneark</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
1232
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts
Normal file
1209
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts
Normal file
1223
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts
Normal file
1230
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts
Normal file
1161
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sk.ts
Normal file
1231
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts
Normal file
1224
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts
Normal file
1224
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts
Normal file
1217
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ta.ts
Normal file
1215
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts
Normal file
1232
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts
Normal file
1174
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts
Normal file
1262
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_vi.ts
Normal file
1203
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts
Normal file
1203
src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts
Normal file
230
src/Mod/Spreadsheet/Gui/Sheet.ui
Normal file
@@ -0,0 +1,230 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Sheet</class>
|
||||
<widget class="QWidget" name="Sheet">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>727</width>
|
||||
<height>596</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,3,0,1">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>&Content</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cellContent</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::ExpressionLineEdit" name="cellContent">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="alias_label">
|
||||
<property name="text">
|
||||
<string>&Alias</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cellAlias</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="Gui::ExpressionLineEdit" name="cellAlias">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Refer to cell by alias, for example
|
||||
Spreadsheet.my_alias_name instead of Spreadsheet.B1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="SpreadsheetGui::SheetTableView" name="cells"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollBar" name="realSB_v">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QScrollBar" name="realSB_h">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="zoomTB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Zoom</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="zoomMinus">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="zoomSlider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>160</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="zoomPlus">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>+</string>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextOnly</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SpreadsheetGui::SheetTableView</class>
|
||||
<extends>QTableView</extends>
|
||||
<header>SheetTableView.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::ExpressionLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header location="global">Gui/ExpressionCompleter.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>cells</tabstop>
|
||||
<tabstop>cellContent</tabstop>
|
||||
<tabstop>cellAlias</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
715
src/Mod/Spreadsheet/Gui/SheetModel.cpp
Normal file
@@ -0,0 +1,715 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QFont>
|
||||
#include <QLocale>
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/UnitsApi.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
#include "SheetModel.h"
|
||||
#include "App/Range.h"
|
||||
|
||||
|
||||
using namespace SpreadsheetGui;
|
||||
using namespace Spreadsheet;
|
||||
using namespace App;
|
||||
namespace sp = std::placeholders;
|
||||
|
||||
SheetModel::SheetModel(Sheet* _sheet, QObject* parent)
|
||||
: QAbstractTableModel(parent)
|
||||
, sheet(_sheet)
|
||||
, rows(1000)
|
||||
, cols(26)
|
||||
{
|
||||
containSheetDataInView();
|
||||
|
||||
// NOLINTBEGIN
|
||||
connections.emplace_back(
|
||||
sheet->cellUpdated.connect(std::bind(&SheetModel::cellUpdated, this, sp::_1))
|
||||
);
|
||||
connections.emplace_back(
|
||||
sheet->rangeUpdated.connect(std::bind(&SheetModel::rangeUpdated, this, sp::_1))
|
||||
);
|
||||
// NOLINTEND
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Mod/Spreadsheet"
|
||||
);
|
||||
aliasBgColor = QColor(
|
||||
QString::fromStdString(hGrp->GetASCII("AliasedCellBackgroundColor", "#feff9e"))
|
||||
);
|
||||
textFgColor = QColor(QString::fromStdString(hGrp->GetASCII("TextColor", "#000000")));
|
||||
positiveFgColor = QColor(QString::fromStdString(hGrp->GetASCII("PositiveNumberColor", "#000000")));
|
||||
negativeFgColor = QColor(QString::fromStdString(hGrp->GetASCII("NegativeNumberColor", "#000000")));
|
||||
}
|
||||
|
||||
SheetModel::~SheetModel()
|
||||
{}
|
||||
|
||||
int SheetModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return rows;
|
||||
}
|
||||
|
||||
int SheetModel::columnCount(const QModelIndex& parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
return cols;
|
||||
}
|
||||
|
||||
bool SheetModel::insertRows(int row, int count, const QModelIndex& parent)
|
||||
{
|
||||
if (rows + count > CellAddress::MAX_ROWS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
beginInsertRows(parent, rows, rows + count - 1);
|
||||
rows += count;
|
||||
endInsertRows();
|
||||
|
||||
// Called after endInsertRows to avoid potential nesting. It will call
|
||||
// `SheetModel::(cell|range)Updated` on modified cells anyways, sending necessary view signals.
|
||||
sheet->insertRows(row, count);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SheetModel::insertColumns(int column, int count, const QModelIndex& parent)
|
||||
{
|
||||
if (cols + count > CellAddress::MAX_COLUMNS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
beginInsertColumns(parent, column, column + count - 1);
|
||||
cols += count;
|
||||
endInsertColumns();
|
||||
|
||||
// Called after endInsertColumns to avoid potential nesting. It will call
|
||||
// `SheetModel::(cell|range)Updated` on modified cells anyways, sending necessary view signals.
|
||||
sheet->insertColumns(column, count);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SheetModel::removeRows(int row, int count, const QModelIndex& parent)
|
||||
{
|
||||
if (count >= rows) {
|
||||
// Prevent the header from disappearing
|
||||
return false;
|
||||
}
|
||||
beginRemoveRows(parent, row, row + count - 1);
|
||||
rows -= count;
|
||||
endRemoveRows();
|
||||
sheet->removeRows(row, count);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SheetModel::removeColumns(int column, int count, const QModelIndex& parent)
|
||||
{
|
||||
if (count >= cols) {
|
||||
// Prevent the header from disappearing
|
||||
return false;
|
||||
}
|
||||
beginRemoveColumns(parent, column, column + count - 1);
|
||||
cols -= count;
|
||||
endRemoveColumns();
|
||||
sheet->removeColumns(column, count);
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
QString encodeColumn(int column)
|
||||
{
|
||||
int toSkipTotal = 0;
|
||||
int toSkipNext = 26;
|
||||
int length = 1;
|
||||
|
||||
while (toSkipTotal + toSkipNext <= column) {
|
||||
toSkipTotal += toSkipNext;
|
||||
toSkipNext *= 26;
|
||||
length += 1;
|
||||
}
|
||||
|
||||
column -= toSkipTotal;
|
||||
|
||||
QString res;
|
||||
for (int i = 0; i < length; i++) {
|
||||
res = QString(static_cast<char>('A' + (column % 26))) + res;
|
||||
column /= 26;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
QVariant formatCellDisplay(QString value, const Cell* cell)
|
||||
{
|
||||
std::string alias;
|
||||
static auto hGrpSpreadsheet = App::GetApplication().GetUserParameter().GetGroup(
|
||||
"BaseApp/Preferences/Mod/Spreadsheet"
|
||||
);
|
||||
if (cell->getAlias(alias) && hGrpSpreadsheet->GetBool("showAliasName", false)) {
|
||||
QString formatStr = QString::fromStdString(
|
||||
hGrpSpreadsheet->GetASCII("DisplayAliasFormatString", "%V = %A")
|
||||
);
|
||||
if (formatStr.contains(QLatin1String("%V")) || formatStr.contains(QLatin1String("%A"))) {
|
||||
formatStr.replace(QLatin1String("%A"), QString::fromStdString(alias));
|
||||
formatStr.replace(QLatin1String("%V"), value);
|
||||
return QVariant(formatStr);
|
||||
}
|
||||
}
|
||||
return QVariant(value);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
QVariant SheetModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
static const Cell* emptyCell = new Cell(CellAddress(0, 0), nullptr);
|
||||
int row = index.row();
|
||||
int col = index.column();
|
||||
const Cell* cell = sheet->getCell(CellAddress(row, col));
|
||||
|
||||
if (!cell) {
|
||||
cell = emptyCell;
|
||||
}
|
||||
|
||||
// #define DEBUG_DEPS
|
||||
#ifdef DEBUG_DEPS
|
||||
if (role == Qt::ToolTipRole) {
|
||||
QString v;
|
||||
|
||||
std::set<std::string> deps = sheet->dependsOn(CellAddress(row, col));
|
||||
std::set<std::string> provides;
|
||||
|
||||
sheet->providesTo(CellAddress(row, col), provides);
|
||||
|
||||
if (deps.size() > 0) {
|
||||
v += QStringLiteral("Depends on:");
|
||||
for (std::set<std::string>::const_iterator i = deps.begin(); i != deps.end(); ++i) {
|
||||
v += QStringLiteral("\n\t") + Tools::fromStdString(*i);
|
||||
}
|
||||
v += QStringLiteral("\n");
|
||||
}
|
||||
if (provides.size() > 0) {
|
||||
v += QStringLiteral("Used by:");
|
||||
for (std::set<std::string>::const_iterator i = provides.begin(); i != provides.end();
|
||||
++i) {
|
||||
v += QStringLiteral("\n\t") + Tools::fromStdString(*i);
|
||||
}
|
||||
v += QStringLiteral("\n");
|
||||
}
|
||||
return QVariant(v);
|
||||
}
|
||||
#else
|
||||
if (!cell->hasException() && role == Qt::ToolTipRole) {
|
||||
std::string alias;
|
||||
if (cell->getAlias(alias)) {
|
||||
return QVariant(QString::fromStdString(alias));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cell->hasException()) {
|
||||
switch (role) {
|
||||
case Qt::ToolTipRole: {
|
||||
QString txt(QString::fromStdString(cell->getException()).toHtmlEscaped());
|
||||
return QVariant(QStringLiteral("<pre>%1</pre>").arg(txt));
|
||||
}
|
||||
case Qt::DisplayRole: {
|
||||
#ifdef DEBUG_DEPS
|
||||
return QVariant::fromValue(
|
||||
QStringLiteral("#ERR: %1").arg(Tools::fromStdString(cell->getException()))
|
||||
);
|
||||
#else
|
||||
std::string str;
|
||||
if (cell->getStringContent(str)) {
|
||||
return QVariant::fromValue(QString::fromUtf8(str.c_str()));
|
||||
}
|
||||
return QVariant::fromValue(QStringLiteral("#ERR"));
|
||||
#endif
|
||||
}
|
||||
case Qt::ForegroundRole:
|
||||
return QVariant::fromValue(QColor(255.0, 0, 0));
|
||||
case Qt::TextAlignmentRole:
|
||||
return QVariant(Qt::AlignVCenter | Qt::AlignLeft);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Get edit value by querying the sheet
|
||||
if (role == Qt::EditRole || role == Qt::StatusTipRole) {
|
||||
std::string str;
|
||||
|
||||
if (cell->getStringContent(str)) {
|
||||
return QVariant(QString::fromUtf8(str.c_str()));
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
// Get display value as computed property
|
||||
std::string address = CellAddress(row, col).toString();
|
||||
Property* prop = sheet->getPropertyByName(address.c_str());
|
||||
|
||||
if (role == Qt::BackgroundRole) {
|
||||
Base::Color color;
|
||||
|
||||
if (cell->getBackground(color)) {
|
||||
return QVariant::fromValue(
|
||||
QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)
|
||||
);
|
||||
}
|
||||
else {
|
||||
std::string alias;
|
||||
if (cell->getAlias(alias)) {
|
||||
return QVariant::fromValue(aliasBgColor);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
int qtAlignment = 0;
|
||||
|
||||
int alignment;
|
||||
cell->getAlignment(alignment);
|
||||
|
||||
if (alignment & Cell::ALIGNMENT_LEFT) {
|
||||
qtAlignment |= Qt::AlignLeft;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_HCENTER) {
|
||||
qtAlignment |= Qt::AlignHCenter;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_RIGHT) {
|
||||
qtAlignment |= Qt::AlignRight;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_TOP) {
|
||||
qtAlignment |= Qt::AlignTop;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_VCENTER) {
|
||||
qtAlignment |= Qt::AlignVCenter;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_BOTTOM) {
|
||||
qtAlignment |= Qt::AlignBottom;
|
||||
}
|
||||
|
||||
std::set<std::string> style;
|
||||
if (role == Qt::FontRole && cell->getStyle(style)) {
|
||||
QFont f;
|
||||
|
||||
for (const auto& i : style) {
|
||||
if (i == "bold") {
|
||||
f.setBold(true);
|
||||
}
|
||||
else if (i == "italic") {
|
||||
f.setItalic(true);
|
||||
}
|
||||
else if (i == "underline") {
|
||||
f.setUnderline(true);
|
||||
}
|
||||
}
|
||||
|
||||
return QVariant::fromValue(f);
|
||||
}
|
||||
|
||||
auto dirtyCells = sheet->getCells()->getDirty();
|
||||
auto dirty = (dirtyCells.find(CellAddress(row, col)) != dirtyCells.end());
|
||||
|
||||
if (!prop || dirty) {
|
||||
switch (role) {
|
||||
case Qt::ForegroundRole: {
|
||||
return QColor(
|
||||
0,
|
||||
0,
|
||||
255.0
|
||||
); // TODO: Remove this hardcoded color, replace with preference
|
||||
}
|
||||
case Qt::TextAlignmentRole: {
|
||||
qtAlignment = Qt::AlignHCenter | Qt::AlignVCenter;
|
||||
return QVariant::fromValue(qtAlignment);
|
||||
}
|
||||
case Qt::DisplayRole:
|
||||
if (cell->getExpression()) {
|
||||
std::string str;
|
||||
if (cell->getStringContent(str)) {
|
||||
if (!str.empty() && str[0] == '=') {
|
||||
// If this is a real computed value, indicate that a recompute is
|
||||
// needed before we can display it
|
||||
return QVariant(QLatin1String("#PENDING"));
|
||||
}
|
||||
else {
|
||||
// If it's just a simple value, display the new value, but still
|
||||
// format it as a pending value to indicate to the user that
|
||||
// a recompute is needed
|
||||
return QVariant(QString::fromUtf8(str.c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
else if (prop->isDerivedFrom<App::PropertyString>()) {
|
||||
/* String */
|
||||
const App::PropertyString* stringProp = static_cast<const App::PropertyString*>(prop);
|
||||
|
||||
switch (role) {
|
||||
case Qt::ForegroundRole: {
|
||||
Base::Color color;
|
||||
|
||||
if (cell->getForeground(color)) {
|
||||
return QVariant::fromValue(
|
||||
QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)
|
||||
);
|
||||
}
|
||||
else {
|
||||
return QVariant(QColor(textFgColor));
|
||||
}
|
||||
}
|
||||
case Qt::DisplayRole: {
|
||||
QString v = QString::fromUtf8(stringProp->getValue());
|
||||
return formatCellDisplay(v, cell);
|
||||
}
|
||||
case Qt::TextAlignmentRole: {
|
||||
if (alignment & Cell::ALIGNMENT_HIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignLeft | Qt::AlignHCenter | Qt::AlignRight);
|
||||
qtAlignment |= Qt::AlignLeft;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_VIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignTop | Qt::AlignVCenter | Qt::AlignBottom);
|
||||
qtAlignment |= Qt::AlignVCenter;
|
||||
}
|
||||
return QVariant::fromValue(qtAlignment);
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
else if (prop->isDerivedFrom<App::PropertyQuantity>()) {
|
||||
/* Number */
|
||||
const App::PropertyQuantity* floatProp = static_cast<const App::PropertyQuantity*>(prop);
|
||||
|
||||
switch (role) {
|
||||
case Qt::ForegroundRole: {
|
||||
Base::Color color;
|
||||
|
||||
if (cell->getForeground(color)) {
|
||||
return QVariant::fromValue(
|
||||
QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)
|
||||
);
|
||||
}
|
||||
else {
|
||||
if (floatProp->getValue() < 0) {
|
||||
return QVariant::fromValue(QColor(negativeFgColor));
|
||||
}
|
||||
else {
|
||||
return QVariant::fromValue(QColor(positiveFgColor));
|
||||
}
|
||||
}
|
||||
}
|
||||
case Qt::TextAlignmentRole: {
|
||||
if (alignment & Cell::ALIGNMENT_HIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignLeft | Qt::AlignHCenter | Qt::AlignRight);
|
||||
qtAlignment |= Qt::AlignRight;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_VIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignTop | Qt::AlignVCenter | Qt::AlignBottom);
|
||||
qtAlignment |= Qt::AlignVCenter;
|
||||
}
|
||||
return QVariant::fromValue(qtAlignment);
|
||||
}
|
||||
case Qt::DisplayRole: {
|
||||
QString v;
|
||||
const Base::Unit& computedUnit = floatProp->getUnit();
|
||||
DisplayUnit displayUnit;
|
||||
|
||||
// Display locale specific decimal separator (#0003875,#0003876)
|
||||
if (cell->getDisplayUnit(displayUnit)) {
|
||||
if (computedUnit == Base::Unit::One || computedUnit == displayUnit.unit) {
|
||||
QString number = QLocale().toString(
|
||||
floatProp->getValue() / displayUnit.scaler,
|
||||
'f',
|
||||
Base::UnitsApi::getDecimals()
|
||||
);
|
||||
// QString number = QString::number(floatProp->getValue() /
|
||||
// displayUnit.scaler);
|
||||
v = number + QString::fromStdString(" " + displayUnit.stringRep);
|
||||
}
|
||||
else {
|
||||
v = QStringLiteral("#ERR: unit");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
// When displaying a quantity then use the globally set scheme
|
||||
// See: https://forum.freecad.org/viewtopic.php?f=3&t=50078
|
||||
Base::Quantity value = floatProp->getQuantityValue();
|
||||
v = QString::fromStdString(value.getUserString());
|
||||
}
|
||||
return formatCellDisplay(v, cell);
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
else if (prop->isDerivedFrom<App::PropertyFloat>()
|
||||
|| prop->isDerivedFrom<App::PropertyInteger>()) {
|
||||
/* Number */
|
||||
double d {};
|
||||
long l {};
|
||||
bool isInteger = false;
|
||||
if (prop->isDerivedFrom<App::PropertyFloat>()) {
|
||||
d = static_cast<const App::PropertyFloat*>(prop)->getValue();
|
||||
}
|
||||
else {
|
||||
isInteger = true;
|
||||
l = static_cast<const App::PropertyInteger*>(prop)->getValue();
|
||||
d = l;
|
||||
}
|
||||
|
||||
switch (role) {
|
||||
case Qt::ForegroundRole: {
|
||||
Base::Color color;
|
||||
|
||||
if (cell->getForeground(color)) {
|
||||
return QVariant::fromValue(
|
||||
QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)
|
||||
);
|
||||
}
|
||||
else {
|
||||
if (d < 0) {
|
||||
return QVariant::fromValue(QColor(negativeFgColor));
|
||||
}
|
||||
else {
|
||||
return QVariant::fromValue(QColor(positiveFgColor));
|
||||
}
|
||||
}
|
||||
}
|
||||
case Qt::TextAlignmentRole: {
|
||||
if (alignment & Cell::ALIGNMENT_HIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignLeft | Qt::AlignHCenter | Qt::AlignRight);
|
||||
qtAlignment |= Qt::AlignRight;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_VIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignTop | Qt::AlignVCenter | Qt::AlignBottom);
|
||||
qtAlignment |= Qt::AlignVCenter;
|
||||
}
|
||||
return QVariant::fromValue(qtAlignment);
|
||||
}
|
||||
case Qt::DisplayRole: {
|
||||
QString v;
|
||||
DisplayUnit displayUnit;
|
||||
|
||||
// Display locale specific decimal separator (#0003875,#0003876)
|
||||
if (cell->getDisplayUnit(displayUnit)) {
|
||||
QString number = QLocale().toString(
|
||||
d / displayUnit.scaler,
|
||||
'f',
|
||||
Base::UnitsApi::getDecimals()
|
||||
);
|
||||
// QString number = QString::number(d / displayUnit.scaler);
|
||||
v = number + QString::fromStdString(" " + displayUnit.stringRep);
|
||||
}
|
||||
else if (!isInteger) {
|
||||
v = QLocale::system().toString(d, 'f', Base::UnitsApi::getDecimals());
|
||||
// v = QString::number(d);
|
||||
}
|
||||
else {
|
||||
v = QString::number(l);
|
||||
}
|
||||
return formatCellDisplay(v, cell);
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
else if (prop->isDerivedFrom<App::PropertyPythonObject>()) {
|
||||
auto pyProp = static_cast<const App::PropertyPythonObject*>(prop);
|
||||
|
||||
switch (role) {
|
||||
case Qt::ForegroundRole: {
|
||||
Base::Color color;
|
||||
|
||||
if (cell->getForeground(color)) {
|
||||
return QVariant::fromValue(
|
||||
QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)
|
||||
);
|
||||
}
|
||||
else {
|
||||
return QVariant(QColor(textFgColor));
|
||||
}
|
||||
}
|
||||
case Qt::TextAlignmentRole: {
|
||||
if (alignment & Cell::ALIGNMENT_HIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignLeft | Qt::AlignHCenter | Qt::AlignRight);
|
||||
qtAlignment |= Qt::AlignHCenter;
|
||||
}
|
||||
if (alignment & Cell::ALIGNMENT_VIMPLIED) {
|
||||
qtAlignment &= ~(Qt::AlignTop | Qt::AlignVCenter | Qt::AlignBottom);
|
||||
qtAlignment |= Qt::AlignVCenter;
|
||||
}
|
||||
return QVariant::fromValue(qtAlignment);
|
||||
}
|
||||
case Qt::DisplayRole: {
|
||||
Base::PyGILStateLocker lock;
|
||||
std::string value;
|
||||
try {
|
||||
value = pyProp->getValue().as_string();
|
||||
}
|
||||
catch (Py::Exception&) {
|
||||
Base::PyException e;
|
||||
value = "#ERR: ";
|
||||
value += e.what();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
value = "#ERR: ";
|
||||
value += e.what();
|
||||
}
|
||||
catch (...) {
|
||||
value = "#ERR: unknown exception";
|
||||
}
|
||||
QString v = QString::fromUtf8(value.c_str());
|
||||
return formatCellDisplay(v, cell);
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
QVariant SheetModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role == Qt::SizeHintRole) {
|
||||
return orientation == Qt::Horizontal
|
||||
? QSize(sheet->getColumnWidth(section), PropertyRowHeights::defaultHeight)
|
||||
: QSize(PropertyColumnWidths::defaultHeaderWidth, sheet->getRowHeight(section));
|
||||
}
|
||||
if (role == Qt::DisplayRole) {
|
||||
return orientation == Qt::Horizontal ? encodeColumn(section) : QString::number(section + 1);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void SheetModel::setCellData(QModelIndex index, QString str)
|
||||
{
|
||||
try {
|
||||
CellAddress address(index.row(), index.column());
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Edit cell"));
|
||||
// Because of possible complication of recursively escaped
|
||||
// characters, let's take a shortcut and bypass the command
|
||||
// interface for now.
|
||||
|
||||
sheet->setContent(address, str.toUtf8().constData());
|
||||
sheet->getDocument()->commitTransaction();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
e.reportException();
|
||||
sheet->getDocument()->abortTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
bool SheetModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
if (role == Qt::DisplayRole) {
|
||||
// Nothing to do, it will get updated by the sheet in the application logic
|
||||
}
|
||||
else if (role == Qt::EditRole) {
|
||||
CellAddress address(index.row(), index.column());
|
||||
|
||||
QString str = value.toString();
|
||||
|
||||
// Check to see if this is already the value in the cell, and skip the update if so
|
||||
auto cell = sheet->getCell(address);
|
||||
if (cell) {
|
||||
std::string oldContent;
|
||||
cell->getStringContent(oldContent);
|
||||
if (str == QString::fromStdString(oldContent)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
QMetaObject::invokeMethod(
|
||||
this,
|
||||
"setCellData",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(QModelIndex, index),
|
||||
Q_ARG(QString, str)
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Qt::ItemFlags SheetModel::flags(const QModelIndex& /*index*/) const
|
||||
{
|
||||
return Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled;
|
||||
}
|
||||
|
||||
void SheetModel::containSheetDataInView()
|
||||
{
|
||||
CellAddress address = std::get<1>(sheet->getUsedRange());
|
||||
if (address.row() >= rows) {
|
||||
beginInsertRows(QModelIndex(), rows, address.row());
|
||||
rows = address.row() + 1;
|
||||
endInsertRows();
|
||||
}
|
||||
if (address.col() >= cols) {
|
||||
beginInsertColumns(QModelIndex(), cols, address.col());
|
||||
cols = address.col() + 1;
|
||||
endInsertColumns();
|
||||
}
|
||||
}
|
||||
|
||||
void SheetModel::cellUpdated(CellAddress address)
|
||||
{
|
||||
containSheetDataInView();
|
||||
if (address.row() < rows && address.col() < cols) {
|
||||
QModelIndex i = index(address.row(), address.col());
|
||||
Q_EMIT dataChanged(i, i);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetModel::rangeUpdated(const Range& range)
|
||||
{
|
||||
containSheetDataInView();
|
||||
if (range.from().row() < rows && range.from().col() < cols) {
|
||||
QModelIndex i = index(range.from().row(), range.from().col());
|
||||
QModelIndex j
|
||||
= index(std::min(range.to().row(), rows - 1), std::min(range.to().col(), cols - 1));
|
||||
Q_EMIT dataChanged(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_SheetModel.cpp"
|
||||
77
src/Mod/Spreadsheet/Gui/SheetModel.h
Normal file
@@ -0,0 +1,77 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fastsignals/connection.h"
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
#include <App/Range.h>
|
||||
|
||||
|
||||
namespace Spreadsheet
|
||||
{
|
||||
class Sheet;
|
||||
}
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class SheetModel: public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SheetModel(Spreadsheet::Sheet* _sheet, QObject* parent = nullptr);
|
||||
~SheetModel() override;
|
||||
|
||||
explicit SheetModel(QObject* parent);
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()) override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
bool setData(const QModelIndex& index, const QVariant& value, int role) override;
|
||||
Qt::ItemFlags flags(const QModelIndex&) const override;
|
||||
|
||||
private Q_SLOTS:
|
||||
void setCellData(QModelIndex index, QString str);
|
||||
|
||||
private:
|
||||
void containSheetDataInView();
|
||||
void cellUpdated(App::CellAddress address);
|
||||
void rangeUpdated(const App::Range& range);
|
||||
|
||||
std::vector<fastsignals::scoped_connection> connections;
|
||||
Spreadsheet::Sheet* sheet;
|
||||
int rows, cols;
|
||||
QColor aliasBgColor;
|
||||
QColor textFgColor;
|
||||
QColor positiveFgColor;
|
||||
QColor negativeFgColor;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
1171
src/Mod/Spreadsheet/Gui/SheetTableView.cpp
Normal file
130
src/Mod/Spreadsheet/Gui/SheetTableView.h
Normal file
@@ -0,0 +1,130 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QTableView>
|
||||
#include <QTimer>
|
||||
#include <QMenu>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class SheetViewHeader: public QHeaderView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SheetViewHeader(QTableView* owner, Qt::Orientation o)
|
||||
: QHeaderView(o)
|
||||
, owner(owner)
|
||||
{
|
||||
setSectionsClickable(true);
|
||||
}
|
||||
Q_SIGNALS:
|
||||
void resizeFinished();
|
||||
void cursorChanged(QCursor);
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QMouseEvent* e) override;
|
||||
void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
bool viewportEvent(QEvent* e) override;
|
||||
|
||||
private:
|
||||
QTableView* owner;
|
||||
};
|
||||
|
||||
class SheetTableView: public QTableView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SheetTableView(QWidget* parent = nullptr);
|
||||
~SheetTableView() override;
|
||||
|
||||
void edit(const QModelIndex& index);
|
||||
void setSheet(Spreadsheet::Sheet* _sheet);
|
||||
std::vector<App::Range> selectedRanges() const;
|
||||
QModelIndexList selectedIndexesRaw() const;
|
||||
QString toHtml() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void mergeCells();
|
||||
void splitCell();
|
||||
void deleteSelection();
|
||||
void copySelection();
|
||||
void cutSelection();
|
||||
void pasteClipboard();
|
||||
void finishEditWithMove(int keyPressed, Qt::KeyboardModifiers modifiers, bool handleTabMotion = false);
|
||||
void ModifyBlockSelection(int targetRow, int targetColumn);
|
||||
|
||||
protected Q_SLOTS:
|
||||
void commitData(QWidget* editor) override;
|
||||
void updateCellSpan();
|
||||
void cellProperties();
|
||||
void onRecompute();
|
||||
void onBind();
|
||||
void onConfSetup();
|
||||
|
||||
protected:
|
||||
void insertRows(bool after);
|
||||
void insertColumns(bool after);
|
||||
void removeRows();
|
||||
void removeColumns();
|
||||
|
||||
bool edit(const QModelIndex& index, EditTrigger trigger, QEvent* event) override;
|
||||
bool event(QEvent* event) override;
|
||||
void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override;
|
||||
void mousePressEvent(QMouseEvent* event) override;
|
||||
void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override;
|
||||
|
||||
void contextMenuEvent(QContextMenuEvent* e) override;
|
||||
|
||||
void _copySelection(const std::vector<App::Range>& ranges, bool copy);
|
||||
|
||||
QModelIndex currentEditIndex;
|
||||
Spreadsheet::Sheet* sheet;
|
||||
int tabCounter;
|
||||
|
||||
QMenu contextMenu;
|
||||
|
||||
QAction* actionProperties;
|
||||
QAction* actionRecompute;
|
||||
QAction* actionConf;
|
||||
QAction* actionMerge;
|
||||
QAction* actionSplit;
|
||||
QAction* actionCopy;
|
||||
QAction* actionPaste;
|
||||
QAction* actionCut;
|
||||
QAction* actionDel;
|
||||
QAction* actionBind;
|
||||
|
||||
QTimer timer;
|
||||
|
||||
fastsignals::scoped_connection cellSpanChangedConnection;
|
||||
std::set<App::CellAddress> spanChanges;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
@@ -0,0 +1,90 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Adrian Popescu *
|
||||
* <adrian-constantin.popescu@outlook.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QMimeData>
|
||||
|
||||
|
||||
#include "SheetTableViewAccessibleInterface.h"
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
SheetTableViewAccessibleInterface::SheetTableViewAccessibleInterface(
|
||||
SpreadsheetGui::SheetTableView* view
|
||||
)
|
||||
: QAccessibleWidget(view)
|
||||
{}
|
||||
|
||||
QString SheetTableViewAccessibleInterface::text(QAccessible::Text txt) const
|
||||
{
|
||||
if (txt == QAccessible::Help) {
|
||||
return QStringLiteral("Implement me");
|
||||
}
|
||||
return QAccessibleWidget::text(txt);
|
||||
}
|
||||
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::childAt(int x, int y) const
|
||||
{
|
||||
Q_UNUSED(x)
|
||||
Q_UNUSED(y)
|
||||
return (QAccessibleInterface*)this;
|
||||
}
|
||||
|
||||
int SheetTableViewAccessibleInterface::indexOfChild(const QAccessibleInterface*) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SheetTableViewAccessibleInterface::childCount() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::focusChild() const
|
||||
{
|
||||
return (QAccessibleInterface*)this;
|
||||
}
|
||||
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::child(int index) const
|
||||
{
|
||||
Q_UNUSED(index)
|
||||
return (QAccessibleInterface*)this;
|
||||
}
|
||||
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::ifactory(const QString& key, QObject* obj)
|
||||
{
|
||||
if (key == QStringLiteral("SpreadsheetGui::SheetTableView")) {
|
||||
return new SheetTableViewAccessibleInterface(static_cast<SpreadsheetGui::SheetTableView*>(obj));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace SpreadsheetGui
|
||||
58
src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.h
Normal file
@@ -0,0 +1,58 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Adrian Popescu *
|
||||
* <adrian-constantin.popescu@outlook.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Mod/Spreadsheet/Gui/SheetTableView.h>
|
||||
#include <QtWidgets/qaccessiblewidget.h>
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
// Currently SheetTableViewAccessibleInterface below deactivates the
|
||||
// built-in QAccessibleTable interface, and all the accessibility
|
||||
// features.
|
||||
//
|
||||
// For a proper implementation, start by extending that
|
||||
// and ensure you're not queue-ing empty cells, or counting empty cells
|
||||
//
|
||||
// Otherwise it will hang - https://github.com/FreeCAD/FreeCAD/issues/8265
|
||||
|
||||
class SheetTableViewAccessibleInterface: public QAccessibleWidget
|
||||
{
|
||||
public:
|
||||
explicit SheetTableViewAccessibleInterface(SpreadsheetGui::SheetTableView* view);
|
||||
|
||||
QString text(QAccessible::Text txt) const override;
|
||||
|
||||
QAccessibleInterface* childAt(int x, int y) const override;
|
||||
int indexOfChild(const QAccessibleInterface*) const override;
|
||||
int childCount() const override;
|
||||
QAccessibleInterface* focusChild() const override;
|
||||
QAccessibleInterface* child(int index) const override;
|
||||
|
||||
static QAccessibleInterface* ifactory(const QString& key, QObject* obj);
|
||||
};
|
||||
} // namespace SpreadsheetGui
|
||||
152
src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp
Normal file
@@ -0,0 +1,152 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen (eivind@kvedalen.name) *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This file is based on the Qt spreadsheet example code. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
#include "LineEdit.h"
|
||||
#include "SpreadsheetDelegate.h"
|
||||
|
||||
|
||||
FC_LOG_LEVEL_INIT("Spreadsheet", true, true)
|
||||
|
||||
using namespace Spreadsheet;
|
||||
using namespace SpreadsheetGui;
|
||||
|
||||
SpreadsheetDelegate::SpreadsheetDelegate(Spreadsheet::Sheet* _sheet, QWidget* parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
, sheet(_sheet)
|
||||
{}
|
||||
|
||||
QWidget* SpreadsheetDelegate::createEditor(
|
||||
QWidget* parent,
|
||||
const QStyleOptionViewItem&,
|
||||
const QModelIndex& index
|
||||
) const
|
||||
{
|
||||
App::CellAddress addr(index.row(), index.column());
|
||||
App::Range range(addr, addr);
|
||||
if (sheet && sheet->getCellBinding(range)) {
|
||||
FC_ERR("Bound cell " << addr.toString() << " cannot be edited");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SpreadsheetGui::LineEdit* editor = new SpreadsheetGui::LineEdit(parent);
|
||||
editor->setDocumentObject(sheet);
|
||||
connect(
|
||||
editor,
|
||||
&SpreadsheetGui::LineEdit::finishedWithKey,
|
||||
this,
|
||||
&SpreadsheetDelegate::onEditorFinishedWithKey
|
||||
);
|
||||
return editor;
|
||||
}
|
||||
|
||||
void SpreadsheetDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const
|
||||
{
|
||||
QLineEdit* edit = qobject_cast<QLineEdit*>(editor);
|
||||
if (edit) {
|
||||
edit->setText(index.model()->data(index, Qt::EditRole).toString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void SpreadsheetDelegate::setModelData(
|
||||
QWidget* editor,
|
||||
QAbstractItemModel* model,
|
||||
const QModelIndex& index
|
||||
) const
|
||||
{
|
||||
QLineEdit* edit = qobject_cast<QLineEdit*>(editor);
|
||||
if (edit) {
|
||||
model->setData(index, edit->text());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void SpreadsheetDelegate::onEditorFinishedWithKey(int key, Qt::KeyboardModifiers modifiers)
|
||||
{
|
||||
Q_EMIT finishedWithKey(key, modifiers);
|
||||
}
|
||||
|
||||
static inline void drawBorder(
|
||||
QPainter* painter,
|
||||
const QStyleOptionViewItem& option,
|
||||
unsigned flags,
|
||||
QColor color,
|
||||
Qt::PenStyle style
|
||||
)
|
||||
{
|
||||
if (!flags) {
|
||||
return;
|
||||
}
|
||||
QPen pen(color);
|
||||
pen.setWidth(2);
|
||||
pen.setStyle(style);
|
||||
painter->setPen(pen);
|
||||
|
||||
QRect rect = option.rect.adjusted(1, 1, 0, 0);
|
||||
if (flags == Sheet::BorderAll) {
|
||||
painter->drawRect(rect.adjusted(0, 0, -1, -1));
|
||||
return;
|
||||
}
|
||||
if (flags & Sheet::BorderLeft) {
|
||||
painter->drawLine(rect.topLeft(), rect.bottomLeft());
|
||||
}
|
||||
if (flags & Sheet::BorderTop) {
|
||||
painter->drawLine(rect.topLeft(), rect.topRight());
|
||||
}
|
||||
if (flags & Sheet::BorderRight) {
|
||||
painter->drawLine(rect.topRight(), rect.bottomRight());
|
||||
}
|
||||
if (flags & Sheet::BorderBottom) {
|
||||
painter->drawLine(rect.bottomLeft(), rect.bottomRight());
|
||||
}
|
||||
}
|
||||
|
||||
void SpreadsheetDelegate::paint(
|
||||
QPainter* painter,
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index
|
||||
) const
|
||||
{
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
if (!sheet) {
|
||||
return;
|
||||
}
|
||||
App::CellAddress addr(index.row(), index.column());
|
||||
drawBorder(painter, option, sheet->getCellBindingBorder(addr), Qt::blue, Qt::SolidLine);
|
||||
drawBorder(painter, option, sheet->getCopyOrCutBorder(addr, true), Qt::green, Qt::DashLine);
|
||||
drawBorder(painter, option, sheet->getCopyOrCutBorder(addr, false), Qt::red, Qt::DashLine);
|
||||
}
|
||||
|
||||
#include "moc_SpreadsheetDelegate.cpp"
|
||||
67
src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.h
Normal file
@@ -0,0 +1,67 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2015 Eivind Kvedalen (eivind@kvedalen.name) *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This file is based on the Qt spreadsheet example code. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
namespace Spreadsheet
|
||||
{
|
||||
class Sheet;
|
||||
}
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class SpreadsheetDelegate: public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SpreadsheetDelegate(Spreadsheet::Sheet* sheet, QWidget* parent = nullptr);
|
||||
QWidget* createEditor(
|
||||
QWidget* parent,
|
||||
const QStyleOptionViewItem&,
|
||||
const QModelIndex& index
|
||||
) const override;
|
||||
void setEditorData(QWidget* editor, const QModelIndex& index) const override;
|
||||
void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
|
||||
void paint(
|
||||
QPainter* painter,
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index
|
||||
) const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void finishedWithKey(int key, Qt::KeyboardModifiers modifiers);
|
||||
|
||||
private:
|
||||
void onEditorFinishedWithKey(int key, Qt::KeyboardModifiers modifiers);
|
||||
|
||||
private:
|
||||
Spreadsheet::Sheet* sheet;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
810
src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp
Normal file
@@ -0,0 +1,810 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) Eivind Kvedalen (eivind@kvedalen.name) 2015-2016 *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QPalette>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrintPreviewDialog>
|
||||
#include <QPrinter>
|
||||
#include <QTextDocument>
|
||||
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/Range.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/FileDialog.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/PreferencePages/DlgSettingsPDF.h>
|
||||
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
#include <Mod/Spreadsheet/App/SheetPy.h>
|
||||
|
||||
#include "LineEdit.h"
|
||||
#include "SpreadsheetDelegate.h"
|
||||
#include "SpreadsheetView.h"
|
||||
#include "ZoomableView.h"
|
||||
#include "qtcolorpicker.h"
|
||||
#include "ui_Sheet.h"
|
||||
|
||||
|
||||
using namespace SpreadsheetGui;
|
||||
using namespace Spreadsheet;
|
||||
using namespace Gui;
|
||||
using namespace App;
|
||||
namespace sp = std::placeholders;
|
||||
|
||||
/* TRANSLATOR SpreadsheetGui::SheetView */
|
||||
|
||||
TYPESYSTEM_SOURCE_ABSTRACT(SpreadsheetGui::SheetView, Gui::MDIView)
|
||||
|
||||
SheetView::SheetView(Gui::Document* pcDocument, App::DocumentObject* docObj, QWidget* parent)
|
||||
: MDIView(pcDocument, parent)
|
||||
, sheet(static_cast<Sheet*>(docObj))
|
||||
{
|
||||
// Set up ui
|
||||
|
||||
model = new SheetModel(static_cast<Sheet*>(docObj));
|
||||
|
||||
ui = new Ui::Sheet();
|
||||
QWidget* w = new QWidget(this);
|
||||
ui->setupUi(w);
|
||||
setCentralWidget(w);
|
||||
|
||||
new ZoomableView(ui);
|
||||
|
||||
delegate = new SpreadsheetDelegate(sheet);
|
||||
ui->cells->setModel(model);
|
||||
ui->cells->setItemDelegate(delegate);
|
||||
ui->cells->setSheet(sheet);
|
||||
|
||||
// Connect signals
|
||||
connect(
|
||||
ui->cells->selectionModel(),
|
||||
&QItemSelectionModel::currentChanged,
|
||||
this,
|
||||
&SheetView::currentChanged
|
||||
);
|
||||
|
||||
connect(
|
||||
qobject_cast<SheetViewHeader*>(ui->cells->horizontalHeader()),
|
||||
&SheetViewHeader::resizeFinished,
|
||||
this,
|
||||
&SheetView::columnResizeFinished
|
||||
);
|
||||
connect(ui->cells->horizontalHeader(), &QHeaderView::sectionResized, this, &SheetView::columnResized);
|
||||
|
||||
connect(
|
||||
qobject_cast<SheetViewHeader*>(ui->cells->verticalHeader()),
|
||||
&SheetViewHeader::resizeFinished,
|
||||
this,
|
||||
&SheetView::rowResizeFinished
|
||||
);
|
||||
connect(ui->cells->verticalHeader(), &QHeaderView::sectionResized, this, &SheetView::rowResized);
|
||||
|
||||
connect(delegate, &SpreadsheetDelegate::finishedWithKey, this, &SheetView::editingFinishedWithKey);
|
||||
connect(ui->cellContent, &ExpressionLineEdit::returnPressed, this, [this]() {
|
||||
confirmContentChanged(ui->cellContent->text());
|
||||
});
|
||||
connect(ui->cellAlias, &ExpressionLineEdit::editingFinished, this, [this]() {
|
||||
confirmAliasChanged(ui->cellAlias->text());
|
||||
});
|
||||
connect(ui->cellAlias, &LineEdit::textEdited, this, &SheetView::aliasChanged);
|
||||
|
||||
// NOLINTBEGIN
|
||||
columnWidthChangedConnection = sheet->columnWidthChanged.connect(
|
||||
std::bind(&SheetView::resizeColumn, this, sp::_1, sp::_2)
|
||||
);
|
||||
rowHeightChangedConnection = sheet->rowHeightChanged.connect(
|
||||
std::bind(&SheetView::resizeRow, this, sp::_1, sp::_2)
|
||||
);
|
||||
// NOLINTEND
|
||||
|
||||
connect(model, &QAbstractItemModel::dataChanged, this, &SheetView::modelUpdated);
|
||||
|
||||
QPalette palette = ui->cells->palette();
|
||||
palette.setColor(QPalette::Base, QColor(255, 255, 255));
|
||||
palette.setColor(QPalette::Text, QColor(0, 0, 0));
|
||||
ui->cells->setPalette(palette);
|
||||
|
||||
QList<QtColorPicker*> bgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(
|
||||
QStringLiteral("Spreadsheet_BackgroundColor")
|
||||
);
|
||||
if (!bgList.empty()) {
|
||||
bgList[0]->setCurrentColor(palette.color(QPalette::Base));
|
||||
}
|
||||
|
||||
QList<QtColorPicker*> fgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(
|
||||
QStringLiteral("Spreadsheet_ForegroundColor")
|
||||
);
|
||||
if (!fgList.empty()) {
|
||||
fgList[0]->setCurrentColor(palette.color(QPalette::Text));
|
||||
}
|
||||
|
||||
// Set document object to create auto completer
|
||||
ui->cellContent->setDocumentObject(sheet);
|
||||
ui->cellAlias->setDocumentObject(sheet);
|
||||
|
||||
ui->cellContent->setPrefix('=');
|
||||
}
|
||||
|
||||
SheetView::~SheetView()
|
||||
{
|
||||
Gui::Application::Instance->detachView(this);
|
||||
delete ui;
|
||||
delete model;
|
||||
delete delegate;
|
||||
}
|
||||
|
||||
bool SheetView::onMsg(const char* pMsg)
|
||||
{
|
||||
if (strcmp("Undo", pMsg) == 0) {
|
||||
getGuiDocument()->undo(1);
|
||||
App::Document* doc = getAppDocument();
|
||||
if (doc) {
|
||||
doc->recompute();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("Redo", pMsg) == 0) {
|
||||
getGuiDocument()->redo(1);
|
||||
App::Document* doc = getAppDocument();
|
||||
if (doc) {
|
||||
doc->recompute();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("Save", pMsg) == 0) {
|
||||
getGuiDocument()->save();
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("SaveAs", pMsg) == 0) {
|
||||
getGuiDocument()->saveAs();
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("Std_Delete", pMsg) == 0) {
|
||||
std::vector<Range> ranges = selectedRanges();
|
||||
if (sheet->hasCell(ranges)) {
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Clear Cells"));
|
||||
std::vector<Range>::const_iterator i = ranges.begin();
|
||||
for (; i != ranges.end(); ++i) {
|
||||
FCMD_OBJ_CMD(sheet, "clear('" << i->rangeString() << "')");
|
||||
}
|
||||
sheet->getDocument()->commitTransaction();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("Cut", pMsg) == 0) {
|
||||
ui->cells->cutSelection();
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("Copy", pMsg) == 0) {
|
||||
ui->cells->copySelection();
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("Paste", pMsg) == 0) {
|
||||
ui->cells->pasteClipboard();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool SheetView::onHasMsg(const char* pMsg) const
|
||||
{
|
||||
if (strcmp("Undo", pMsg) == 0) {
|
||||
App::Document* doc = getAppDocument();
|
||||
return doc && doc->getAvailableUndos() > 0;
|
||||
}
|
||||
if (strcmp("Redo", pMsg) == 0) {
|
||||
App::Document* doc = getAppDocument();
|
||||
return doc && doc->getAvailableRedos() > 0;
|
||||
}
|
||||
if (strcmp("Save", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("SaveAs", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("Cut", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("Copy", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("Paste", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp(pMsg, "Print") == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp(pMsg, "PrintPreview") == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp(pMsg, "PrintPdf") == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the printer dialog.
|
||||
*/
|
||||
void SheetView::print()
|
||||
{
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
printer.setPageOrientation(QPageLayout::Landscape);
|
||||
printer.setFullPage(true);
|
||||
QPrintDialog dlg(&printer, this);
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
print(&printer);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::printPreview()
|
||||
{
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
printer.setPageOrientation(QPageLayout::Landscape);
|
||||
QPrintPreviewDialog dlg(&printer, this);
|
||||
connect(&dlg, &QPrintPreviewDialog::paintRequested, this, qOverload<QPrinter*>(&SheetView::print));
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void SheetView::print(QPrinter* printer)
|
||||
{
|
||||
#if 0
|
||||
ui->cells->render(printer);
|
||||
#endif
|
||||
std::unique_ptr<QTextDocument> document = std::make_unique<QTextDocument>();
|
||||
document->setHtml(ui->cells->toHtml());
|
||||
document->print(printer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the document into a Pdf file.
|
||||
*/
|
||||
void SheetView::printPdf()
|
||||
{
|
||||
QString filename = FileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Export PDF"),
|
||||
QString(),
|
||||
QStringLiteral("%1 (*.pdf)").arg(tr("PDF file"))
|
||||
);
|
||||
if (!filename.isEmpty()) {
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
// setPdfVersion sets the printed PDF Version to what is chosen in
|
||||
// Preferences/Import-Export/PDF more details under:
|
||||
// https://www.kdab.com/creating-pdfa-documents-qt/
|
||||
printer.setPdfVersion(Gui::Dialog::DlgSettingsPDF::evaluatePDFVersion());
|
||||
printer.setPageOrientation(QPageLayout::Landscape);
|
||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||
printer.setOutputFileName(filename);
|
||||
printer.setCreator(QString::fromStdString(App::Application::getNameWithVersion()));
|
||||
print(&printer);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::setCurrentCell(QString str)
|
||||
{
|
||||
Q_UNUSED(str);
|
||||
updateContentLine();
|
||||
updateAliasLine();
|
||||
}
|
||||
|
||||
void SheetView::updateContentLine()
|
||||
{
|
||||
QModelIndex i = ui->cells->currentIndex();
|
||||
|
||||
if (i.isValid()) {
|
||||
std::string str;
|
||||
if (const auto* cell = sheet->getCell(CellAddress(i.row(), i.column()))) {
|
||||
(void)cell->getStringContent(str);
|
||||
}
|
||||
ui->cellContent->setText(QString::fromUtf8(str.c_str()));
|
||||
ui->cellContent->setEnabled(true);
|
||||
|
||||
// Update completer model; for the time being, we do this by setting the document object of
|
||||
// the input line.
|
||||
ui->cellContent->setDocumentObject(sheet);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::updateAliasLine()
|
||||
{
|
||||
QModelIndex i = ui->cells->currentIndex();
|
||||
|
||||
if (i.isValid()) {
|
||||
std::string str;
|
||||
if (const auto* cell = sheet->getCell(CellAddress(i.row(), i.column()))) {
|
||||
(void)cell->getAlias(str);
|
||||
}
|
||||
ui->cellAlias->setText(QString::fromUtf8(str.c_str()));
|
||||
ui->cellAlias->setEnabled(true);
|
||||
|
||||
// Update completer model; for the time being, we do this by setting the document object of
|
||||
// the input line.
|
||||
ui->cellAlias->setDocumentObject(sheet);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::columnResizeFinished()
|
||||
{
|
||||
if (newColumnSizes.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
blockSignals(true);
|
||||
for (auto& v : newColumnSizes) {
|
||||
sheet->setColumnWidth(v.first, v.second);
|
||||
}
|
||||
blockSignals(false);
|
||||
newColumnSizes.clear();
|
||||
}
|
||||
|
||||
void SheetView::rowResizeFinished()
|
||||
{
|
||||
if (newRowSizes.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
blockSignals(true);
|
||||
for (auto& v : newRowSizes) {
|
||||
sheet->setRowHeight(v.first, v.second);
|
||||
}
|
||||
blockSignals(false);
|
||||
newRowSizes.clear();
|
||||
}
|
||||
|
||||
void SheetView::modelUpdated(const QModelIndex& topLeft, const QModelIndex& bottomRight)
|
||||
{
|
||||
const QModelIndex& current = ui->cells->currentIndex();
|
||||
|
||||
if (current < topLeft || bottomRight < current) {
|
||||
return;
|
||||
}
|
||||
|
||||
updateContentLine();
|
||||
updateAliasLine();
|
||||
}
|
||||
|
||||
void SheetView::columnResized(int col, int oldSize, int newSize)
|
||||
{
|
||||
Q_UNUSED(oldSize);
|
||||
newColumnSizes[col] = newSize;
|
||||
}
|
||||
|
||||
void SheetView::rowResized(int row, int oldSize, int newSize)
|
||||
{
|
||||
Q_UNUSED(oldSize);
|
||||
newRowSizes[row] = newSize;
|
||||
}
|
||||
|
||||
void SheetView::resizeColumn(int col, int newSize)
|
||||
{
|
||||
if (ui->cells->horizontalHeader()->sectionSize(col) != newSize) {
|
||||
ui->cells->setColumnWidth(col, newSize);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::resizeRow(int col, int newSize)
|
||||
{
|
||||
if (ui->cells->verticalHeader()->sectionSize(col) != newSize) {
|
||||
ui->cells->setRowHeight(col, newSize);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::editingFinishedWithKey(int key, Qt::KeyboardModifiers modifiers)
|
||||
{
|
||||
QModelIndex i = ui->cells->currentIndex();
|
||||
|
||||
if (i.isValid()) {
|
||||
ui->cells->finishEditWithMove(key, modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::confirmAliasChanged(const QString& text)
|
||||
{
|
||||
bool aliasOkay = true;
|
||||
|
||||
ui->cellAlias->setDocumentObject(sheet);
|
||||
if (text.length() != 0 && !sheet->isValidAlias(text.toStdString())) {
|
||||
aliasOkay = false;
|
||||
}
|
||||
|
||||
QModelIndex i = ui->cells->currentIndex();
|
||||
if (const auto* cell = sheet->getNewCell(CellAddress(i.row(), i.column()))) {
|
||||
if (!aliasOkay) {
|
||||
// do not show error message if failure to set new alias is because it is already the
|
||||
// same string
|
||||
std::string current_alias;
|
||||
(void)cell->getAlias(current_alias);
|
||||
if (text != QString::fromUtf8(current_alias.c_str())) {
|
||||
Base::Console().error("Unable to set alias: %s\n", text.toStdString().c_str());
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::string address = CellAddress(i.row(), i.column()).toString();
|
||||
Gui::cmdAppObjectArgs(sheet, "setAlias('%s', '%s')", address, text.toStdString());
|
||||
Gui::cmdAppDocument(sheet->getDocument(), "recompute()");
|
||||
ui->cells->setFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SheetView::confirmContentChanged(const QString& text)
|
||||
{
|
||||
QModelIndex i = ui->cells->currentIndex();
|
||||
ui->cells->model()->setData(i, QVariant(text), Qt::EditRole);
|
||||
ui->cells->setFocus();
|
||||
}
|
||||
|
||||
void SheetView::aliasChanged(const QString& text)
|
||||
{
|
||||
// check live the input and highlight if the user input invalid characters
|
||||
|
||||
bool aliasOk = true;
|
||||
static auto originalStylesheet = ui->cellAlias->styleSheet();
|
||||
QString warningColor;
|
||||
if (qApp->styleSheet().contains(QLatin1String("dark"), Qt::CaseInsensitive)) {
|
||||
warningColor = QLatin1String("rgb(255,90,90)"); // Light red for dark mode
|
||||
}
|
||||
else {
|
||||
warningColor = QLatin1String("rgb(200,0,0)"); // Dark red for light mode
|
||||
}
|
||||
|
||||
if (!text.isEmpty() && !sheet->isValidAlias(text.toStdString())) {
|
||||
aliasOk = false;
|
||||
}
|
||||
|
||||
if (!aliasOk) {
|
||||
// change tooltip and make text color red
|
||||
ui->cellAlias->setToolTip(QObject::tr("Alias contains invalid characters!"));
|
||||
ui->cellAlias->setStyleSheet(QLatin1String("color:") + warningColor);
|
||||
}
|
||||
else {
|
||||
// go back to normal
|
||||
ui->cellAlias->setToolTip(
|
||||
QObject::tr(
|
||||
"Refer to cell by alias, for example\nSpreadsheet.my_alias_name instead of "
|
||||
"Spreadsheet.B1"
|
||||
)
|
||||
);
|
||||
ui->cellAlias->setStyleSheet(originalStylesheet);
|
||||
}
|
||||
}
|
||||
|
||||
void SheetView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
|
||||
{
|
||||
Q_UNUSED(current);
|
||||
Q_UNUSED(previous);
|
||||
updateContentLine();
|
||||
updateAliasLine();
|
||||
}
|
||||
|
||||
void SheetView::updateCell(const App::Property* prop)
|
||||
{
|
||||
try {
|
||||
if (prop == &sheet->Label) {
|
||||
QString cap = QString::fromUtf8(sheet->Label.getValue());
|
||||
setWindowTitle(cap);
|
||||
}
|
||||
CellAddress address;
|
||||
|
||||
if (!sheet->getCellAddress(prop, address)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentIndex().row() == address.row() && currentIndex().column() == address.col()) {
|
||||
updateContentLine();
|
||||
updateAliasLine();
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
// Property is not a cell
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Range> SheetView::selectedRanges() const
|
||||
{
|
||||
return ui->cells->selectedRanges();
|
||||
}
|
||||
|
||||
QModelIndexList SheetView::selectedIndexes() const
|
||||
{
|
||||
return ui->cells->selectionModel()->selectedIndexes();
|
||||
}
|
||||
|
||||
QModelIndexList SheetView::selectedIndexesRaw() const
|
||||
{
|
||||
return ui->cells->selectedIndexesRaw();
|
||||
}
|
||||
|
||||
void SpreadsheetGui::SheetView::select(App::CellAddress cell, QItemSelectionModel::SelectionFlags flags)
|
||||
{
|
||||
ui->cells->selectionModel()->select(model->index(cell.row(), cell.col()), flags);
|
||||
}
|
||||
|
||||
void SpreadsheetGui::SheetView::select(
|
||||
App::CellAddress topLeft,
|
||||
App::CellAddress bottomRight,
|
||||
QItemSelectionModel::SelectionFlags flags
|
||||
)
|
||||
{
|
||||
ui->cells->selectionModel()->select(
|
||||
QItemSelection(
|
||||
model->index(topLeft.row(), topLeft.col()),
|
||||
model->index(bottomRight.row(), bottomRight.col())
|
||||
),
|
||||
flags
|
||||
);
|
||||
}
|
||||
|
||||
void SheetView::deleteSelection()
|
||||
{
|
||||
ui->cells->deleteSelection();
|
||||
}
|
||||
|
||||
QModelIndex SheetView::currentIndex() const
|
||||
{
|
||||
return ui->cells->currentIndex();
|
||||
}
|
||||
|
||||
void SpreadsheetGui::SheetView::setCurrentIndex(App::CellAddress cell) const
|
||||
{
|
||||
ui->cells->setCurrentIndex(model->index(cell.row(), cell.col()));
|
||||
}
|
||||
|
||||
PyObject* SheetView::getPyObject()
|
||||
{
|
||||
if (!pythonObject) {
|
||||
pythonObject = new SheetViewPy(this);
|
||||
}
|
||||
|
||||
Py_INCREF(pythonObject);
|
||||
return pythonObject;
|
||||
}
|
||||
|
||||
void SheetView::deleteSelf()
|
||||
{
|
||||
Gui::MDIView::deleteSelf();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------
|
||||
|
||||
void SheetViewPy::init_type()
|
||||
{
|
||||
behaviors().name("SheetViewPy");
|
||||
behaviors().doc("Python binding class for the Sheet view class");
|
||||
// you must have overwritten the virtual functions
|
||||
behaviors().supportRepr();
|
||||
behaviors().supportGetattr();
|
||||
behaviors().supportSetattr();
|
||||
|
||||
add_varargs_method(
|
||||
"selectedRanges",
|
||||
&SheetViewPy::selectedRanges,
|
||||
"selectedRanges(): Get a list of all selected ranges"
|
||||
);
|
||||
add_varargs_method(
|
||||
"selectedCells",
|
||||
&SheetViewPy::selectedCells,
|
||||
"selectedCells(): Get a list of all selected cells"
|
||||
);
|
||||
add_varargs_method(
|
||||
"select",
|
||||
&SheetViewPy::select,
|
||||
"select(cell,flags): Select (or deselect) the given cell, applying "
|
||||
"QItemSelectionModel.SelectionFlags\nselect(topLeft,bottomRight,flags): Select (or "
|
||||
"deselect) the given range, applying QItemSelectionModel.SelectionFlags"
|
||||
);
|
||||
add_varargs_method(
|
||||
"currentIndex",
|
||||
&SheetViewPy::currentIndex,
|
||||
"currentIndex(): Get the current index"
|
||||
);
|
||||
add_varargs_method(
|
||||
"setCurrentIndex",
|
||||
&SheetViewPy::setCurrentIndex,
|
||||
"setCurrentIndex(cell): Set the current index to the named cell (e.g. 'A1')"
|
||||
);
|
||||
|
||||
add_varargs_method("getSheet", &SheetViewPy::getSheet, "getSheet()");
|
||||
add_varargs_method("cast_to_base", &SheetViewPy::cast_to_base, "cast_to_base() cast to MDIView class");
|
||||
behaviors().readyType();
|
||||
}
|
||||
|
||||
SheetViewPy::SheetViewPy(SheetView* mdi)
|
||||
: base(mdi)
|
||||
{}
|
||||
|
||||
SheetViewPy::~SheetViewPy() = default;
|
||||
|
||||
Py::Object SheetViewPy::repr()
|
||||
{
|
||||
if (!getSheetViewPtr()) {
|
||||
throw Py::RuntimeError("Cannot print representation of deleted object");
|
||||
}
|
||||
|
||||
return Py::String("SheetView");
|
||||
}
|
||||
|
||||
// Since with PyCXX it's not possible to make a sub-class of MDIViewPy
|
||||
// a trick is to use MDIViewPy as class member and override getattr() to
|
||||
// join the attributes of both classes. This way all methods of MDIViewPy
|
||||
// appear for SheetViewPy, too.
|
||||
Py::Object SheetViewPy::getattr(const char* attr)
|
||||
{
|
||||
if (!getSheetViewPtr()) {
|
||||
std::ostringstream s_out;
|
||||
s_out << "Cannot access attribute '" << attr << "' of deleted object";
|
||||
throw Py::RuntimeError(s_out.str());
|
||||
}
|
||||
std::string name(attr);
|
||||
if (name == "__dict__" || name == "__class__") {
|
||||
Py::Dict dict_self(BaseType::getattr("__dict__"));
|
||||
Py::Dict dict_base(base.getattr("__dict__"));
|
||||
for (const auto& it : dict_base) {
|
||||
dict_self.setItem(it.first, it.second);
|
||||
}
|
||||
return dict_self;
|
||||
}
|
||||
|
||||
try {
|
||||
return BaseType::getattr(attr);
|
||||
}
|
||||
catch (Py::AttributeError& e) {
|
||||
e.clear();
|
||||
return base.getattr(attr);
|
||||
}
|
||||
}
|
||||
|
||||
SheetView* SheetViewPy::getSheetViewPtr()
|
||||
{
|
||||
return qobject_cast<SheetView*>(base.getMDIViewPtr());
|
||||
}
|
||||
|
||||
Py::Object SheetViewPy::getSheet(const Py::Tuple& args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args.ptr(), "")) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
return Py::asObject(new Spreadsheet::SheetPy(getSheetViewPtr()->getSheet()));
|
||||
}
|
||||
|
||||
Py::Object SheetViewPy::cast_to_base(const Py::Tuple&)
|
||||
{
|
||||
return Gui::MDIViewPy::create(base.getMDIViewPtr());
|
||||
}
|
||||
|
||||
Py::Object SheetViewPy::selectedRanges(const Py::Tuple& args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args.ptr(), "")) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
SheetView* sheetView = getSheetViewPtr();
|
||||
std::vector<App::Range> ranges = sheetView->selectedRanges();
|
||||
Py::List list;
|
||||
for (const auto& range : ranges) {
|
||||
list.append(Py::String(range.rangeString()));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
Py::Object SheetViewPy::selectedCells(const Py::Tuple& args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args.ptr(), "")) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
SheetView* sheetView = getSheetViewPtr();
|
||||
QModelIndexList cells = sheetView->selectedIndexes();
|
||||
Py::List list;
|
||||
for (const auto& cell : cells) {
|
||||
list.append(Py::String(App::CellAddress(cell.row(), cell.column()).toString()));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
Py::Object SheetViewPy::select(const Py::Tuple& _args)
|
||||
{
|
||||
SheetView* sheetView = getSheetViewPtr();
|
||||
|
||||
Py::Sequence args(_args.ptr());
|
||||
|
||||
const char* cell;
|
||||
const char* topLeft;
|
||||
const char* bottomRight;
|
||||
int flags = 0;
|
||||
if (args.size() == 2 && PyArg_ParseTuple(_args.ptr(), "si", &cell, &flags)) {
|
||||
sheetView->select(
|
||||
App::CellAddress(cell),
|
||||
static_cast<QItemSelectionModel::SelectionFlags>(flags)
|
||||
);
|
||||
}
|
||||
else if (args.size() == 3
|
||||
&& PyArg_ParseTuple(_args.ptr(), "ssi", &topLeft, &bottomRight, &flags)) {
|
||||
sheetView->select(
|
||||
App::CellAddress(topLeft),
|
||||
App::CellAddress(bottomRight),
|
||||
static_cast<QItemSelectionModel::SelectionFlags>(flags)
|
||||
);
|
||||
}
|
||||
else {
|
||||
if (args.size() == 2) {
|
||||
throw Base::TypeError(
|
||||
"Expects the arguments to be a cell name (e.g. 'A1') and "
|
||||
"QItemSelectionModel.SelectionFlags"
|
||||
);
|
||||
}
|
||||
else if (args.size() == 3) {
|
||||
throw Base::TypeError(
|
||||
"Expects the arguments to be a cell name (e.g. 'A1'), a second "
|
||||
"cell name (e.g. 'B5'), and QItemSelectionModel.SelectionFlags"
|
||||
);
|
||||
}
|
||||
else {
|
||||
throw Base::TypeError(
|
||||
"Wrong arguments to select: specify either a cell, or two cells "
|
||||
"(for a range), and QItemSelectionModel.SelectionFlags"
|
||||
);
|
||||
}
|
||||
}
|
||||
return Py::None();
|
||||
}
|
||||
|
||||
Py::Object SheetViewPy::currentIndex(const Py::Tuple& args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args.ptr(), "")) {
|
||||
throw Py::Exception();
|
||||
}
|
||||
SheetView* sheetView = getSheetViewPtr();
|
||||
auto index = sheetView->currentIndex();
|
||||
Py::String str(App::CellAddress(index.row(), index.column()).toString());
|
||||
return str;
|
||||
}
|
||||
|
||||
Py::Object SheetViewPy::setCurrentIndex(const Py::Tuple& args)
|
||||
{
|
||||
SheetView* sheetView = getSheetViewPtr();
|
||||
|
||||
const char* cell;
|
||||
if (PyArg_ParseTuple(args.ptr(), "s", &cell)) {
|
||||
sheetView->setCurrentIndex(App::CellAddress(cell));
|
||||
}
|
||||
return Py::None();
|
||||
}
|
||||
|
||||
|
||||
#include "moc_SpreadsheetView.cpp"
|
||||
175
src/Mod/Spreadsheet/Gui/SpreadsheetView.h
Normal file
@@ -0,0 +1,175 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) Eivind Kvedalen (eivind@kvedalen.name) 2015 *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QHeaderView>
|
||||
|
||||
#include <Gui/MDIView.h>
|
||||
#include <Gui/MDIViewPy.h>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
#include <Mod/Spreadsheet/SpreadsheetGlobal.h>
|
||||
|
||||
#include "SheetModel.h"
|
||||
|
||||
|
||||
class QSlider;
|
||||
class QAction;
|
||||
class QActionGroup;
|
||||
class QPopupMenu;
|
||||
class QToolBar;
|
||||
|
||||
namespace App
|
||||
{
|
||||
class DocumentObject;
|
||||
class Property;
|
||||
} // namespace App
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class Sheet;
|
||||
}
|
||||
|
||||
class QTableWidgetItem;
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class SpreadsheetDelegate;
|
||||
|
||||
class SpreadsheetGuiExport SheetView: public Gui::MDIView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
SheetView(Gui::Document* pcDocument, App::DocumentObject* docObj, QWidget* parent);
|
||||
~SheetView() override;
|
||||
|
||||
const char* getName() const override
|
||||
{
|
||||
return "SheetView";
|
||||
}
|
||||
|
||||
bool onMsg(const char* pMsg) override;
|
||||
bool onHasMsg(const char* pMsg) const override;
|
||||
|
||||
/** @name Printing */
|
||||
//@{
|
||||
void print() override;
|
||||
void printPdf() override;
|
||||
void printPreview() override;
|
||||
void print(QPrinter*) override;
|
||||
//@}
|
||||
|
||||
void updateCell(const App::Property* prop);
|
||||
|
||||
Spreadsheet::Sheet* getSheet()
|
||||
{
|
||||
return sheet;
|
||||
}
|
||||
|
||||
std::vector<App::Range> selectedRanges() const;
|
||||
|
||||
QModelIndexList selectedIndexes() const;
|
||||
QModelIndexList selectedIndexesRaw() const;
|
||||
|
||||
void select(App::CellAddress cell, QItemSelectionModel::SelectionFlags flags);
|
||||
|
||||
void select(
|
||||
App::CellAddress topLeft,
|
||||
App::CellAddress bottomRight,
|
||||
QItemSelectionModel::SelectionFlags flags
|
||||
);
|
||||
|
||||
QModelIndex currentIndex() const;
|
||||
|
||||
void setCurrentIndex(App::CellAddress cell) const;
|
||||
|
||||
void deleteSelection();
|
||||
|
||||
PyObject* getPyObject() override;
|
||||
|
||||
void deleteSelf() override;
|
||||
|
||||
protected Q_SLOTS:
|
||||
void editingFinishedWithKey(int key, Qt::KeyboardModifiers modifiers);
|
||||
void confirmAliasChanged(const QString& text);
|
||||
void aliasChanged(const QString& text);
|
||||
void confirmContentChanged(const QString& text);
|
||||
void currentChanged(const QModelIndex& current, const QModelIndex& previous);
|
||||
void columnResized(int col, int oldSize, int newSize);
|
||||
void rowResized(int row, int oldSize, int newSize);
|
||||
void columnResizeFinished();
|
||||
void rowResizeFinished();
|
||||
void modelUpdated(const QModelIndex& topLeft, const QModelIndex& bottomRight);
|
||||
|
||||
protected:
|
||||
void updateContentLine();
|
||||
void updateAliasLine();
|
||||
void setCurrentCell(QString str);
|
||||
void resizeColumn(int col, int newSize);
|
||||
void resizeRow(int col, int newSize);
|
||||
|
||||
Ui::Sheet* ui;
|
||||
Spreadsheet::Sheet* sheet;
|
||||
SpreadsheetDelegate* delegate;
|
||||
SheetModel* model;
|
||||
fastsignals::scoped_connection columnWidthChangedConnection;
|
||||
fastsignals::scoped_connection rowHeightChangedConnection;
|
||||
fastsignals::scoped_connection positionChangedConnection;
|
||||
|
||||
std::map<int, int> newColumnSizes;
|
||||
std::map<int, int> newRowSizes;
|
||||
};
|
||||
|
||||
class SheetViewPy: public Py::PythonExtension<SheetViewPy>
|
||||
{
|
||||
public:
|
||||
using BaseType = Py::PythonExtension<SheetViewPy>;
|
||||
static void init_type();
|
||||
|
||||
explicit SheetViewPy(SheetView* mdi);
|
||||
~SheetViewPy() override;
|
||||
|
||||
Py::Object repr() override;
|
||||
Py::Object getattr(const char*) override;
|
||||
Py::Object getSheet(const Py::Tuple&);
|
||||
Py::Object cast_to_base(const Py::Tuple&);
|
||||
|
||||
Py::Object selectedRanges(const Py::Tuple&);
|
||||
Py::Object selectedCells(const Py::Tuple&);
|
||||
Py::Object select(const Py::Tuple&);
|
||||
Py::Object currentIndex(const Py::Tuple&);
|
||||
Py::Object setCurrentIndex(const Py::Tuple&);
|
||||
|
||||
SheetView* getSheetViewPtr();
|
||||
|
||||
protected:
|
||||
Gui::MDIViewPy base;
|
||||
};
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
202
src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp
Normal file
@@ -0,0 +1,202 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2011 Juergen Riegel <juergen.riegel@web.de> *
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QMenu>
|
||||
#include <QString>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/FileDialog.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Mod/Spreadsheet/App/Sheet.h>
|
||||
|
||||
#include "ViewProviderSpreadsheet.h"
|
||||
#include "ViewProviderSpreadsheetPy.h"
|
||||
|
||||
|
||||
using namespace Base;
|
||||
using namespace Gui;
|
||||
using namespace App;
|
||||
using namespace SpreadsheetGui;
|
||||
using namespace Spreadsheet;
|
||||
|
||||
PROPERTY_SOURCE(SpreadsheetGui::ViewProviderSheet, Gui::ViewProviderDocumentObject)
|
||||
|
||||
ViewProviderSheet::ViewProviderSheet()
|
||||
{
|
||||
setToggleVisibility(ToggleVisibilityMode::NoToggleVisibility);
|
||||
}
|
||||
|
||||
ViewProviderSheet::~ViewProviderSheet()
|
||||
{
|
||||
if (!view.isNull()) {
|
||||
Gui::getMainWindow()->removeWindow(view);
|
||||
}
|
||||
}
|
||||
|
||||
QIcon ViewProviderSheet::getIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(":icons/Spreadsheet.svg"));
|
||||
}
|
||||
|
||||
bool ViewProviderSheet::setEdit(int ModNum)
|
||||
{
|
||||
if (ModNum == ViewProvider::Default) {
|
||||
showSheetMdi();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ViewProviderSheet::doubleClicked()
|
||||
{
|
||||
// assure the SpreadSheet workbench
|
||||
if (App::GetApplication()
|
||||
.GetUserParameter()
|
||||
.GetGroup("BaseApp")
|
||||
->GetGroup("Preferences")
|
||||
->GetGroup("Mod/Spreadsheet")
|
||||
->GetBool("SwitchToWB", true)) {
|
||||
Gui::Command::assureWorkbench("SpreadsheetWorkbench");
|
||||
}
|
||||
|
||||
showSheetMdi();
|
||||
return true;
|
||||
}
|
||||
|
||||
void ViewProviderSheet::showSheetMdi()
|
||||
{
|
||||
if (!this->view) {
|
||||
showSpreadsheetView();
|
||||
view->viewAll();
|
||||
}
|
||||
Gui::getMainWindow()->setActiveWindow(this->view);
|
||||
}
|
||||
|
||||
void ViewProviderSheet::exportAsFile()
|
||||
{
|
||||
auto* sheet = getObject<Spreadsheet::Sheet>();
|
||||
QString selectedFilter;
|
||||
QString formatList = QObject::tr("CSV (*.csv *.CSV);;All (*)");
|
||||
QString fileName = Gui::FileDialog::getSaveFileName(
|
||||
Gui::getMainWindow(),
|
||||
QObject::tr("Export File"),
|
||||
QString(),
|
||||
formatList,
|
||||
&selectedFilter
|
||||
);
|
||||
if (!fileName.isEmpty()) {
|
||||
if (sheet) {
|
||||
char delim = '\0';
|
||||
char quote = '\0';
|
||||
char escape = '\0';
|
||||
std::string errMsg = "Export";
|
||||
bool isValid = sheet->getCharsFromPrefs(delim, quote, escape, errMsg);
|
||||
|
||||
if (isValid) {
|
||||
sheet->exportToFile(fileName.toStdString(), delim, quote, escape);
|
||||
}
|
||||
else {
|
||||
Base::Console().error(errMsg.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ViewProviderSheet::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
|
||||
{
|
||||
QAction* act;
|
||||
act = menu->addAction(QObject::tr("Show Spreadsheet"), receiver, member);
|
||||
act->setData(QVariant((int)ViewProvider::Default));
|
||||
}
|
||||
|
||||
Sheet* ViewProviderSheet::getSpreadsheetObject() const
|
||||
{
|
||||
return freecad_cast<Sheet*>(pcObject);
|
||||
}
|
||||
|
||||
void ViewProviderSheet::beforeDelete()
|
||||
{
|
||||
ViewProviderDocumentObject::beforeDelete();
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
if (view == Gui::getMainWindow()->activeWindow()) {
|
||||
getDocument()->setActiveView(nullptr, Gui::View3DInventor::getClassTypeId());
|
||||
}
|
||||
Gui::getMainWindow()->removeWindow(view);
|
||||
}
|
||||
|
||||
SheetView* ViewProviderSheet::showSpreadsheetView()
|
||||
{
|
||||
if (!view) {
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(this->pcObject->getDocument());
|
||||
view = new SheetView(doc, this->pcObject, Gui::getMainWindow());
|
||||
view->setWindowIcon(Gui::BitmapFactory().pixmap(":icons/Spreadsheet.svg"));
|
||||
view->setWindowTitle(QString::fromUtf8(pcObject->Label.getValue()) + QStringLiteral("[*]"));
|
||||
Gui::getMainWindow()->addWindow(view);
|
||||
startEditing();
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
Gui::MDIView* ViewProviderSheet::getMDIView() const
|
||||
{
|
||||
return const_cast<ViewProviderSheet*>(this)->showSpreadsheetView();
|
||||
}
|
||||
|
||||
void ViewProviderSheet::updateData(const App::Property* prop)
|
||||
{
|
||||
if (view) {
|
||||
view->updateCell(prop);
|
||||
}
|
||||
}
|
||||
|
||||
PyObject* ViewProviderSheet::getPyObject()
|
||||
{
|
||||
if (!pyViewObject) {
|
||||
pyViewObject = new ViewProviderSpreadsheetPy(this);
|
||||
}
|
||||
pyViewObject->IncRef();
|
||||
return pyViewObject;
|
||||
}
|
||||
|
||||
// Python feature -----------------------------------------------------------------------
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
/// @cond DOXERR
|
||||
PROPERTY_SOURCE_TEMPLATE(SpreadsheetGui::ViewProviderSheetPython, SpreadsheetGui::ViewProviderSheet)
|
||||
/// @endcond
|
||||
|
||||
// explicit template instantiation
|
||||
template class SpreadsheetGuiExport ViewProviderFeaturePythonT<ViewProviderSheet>;
|
||||
} // namespace Gui
|
||||
94
src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.h
Normal file
@@ -0,0 +1,94 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2011 Juergen Riegel <juergen.riegel@web.de> *
|
||||
* Copyright (c) 2015 Eivind Kvedalen <eivind@kvedalen.name> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
#include <Gui/ViewProviderDocumentObject.h>
|
||||
#include <Gui/ViewProviderFeaturePython.h>
|
||||
#include <Mod/Spreadsheet/SpreadsheetGlobal.h>
|
||||
#include <Mod/Spreadsheet/Gui/SpreadsheetView.h>
|
||||
|
||||
|
||||
namespace SpreadsheetGui
|
||||
{
|
||||
|
||||
class SpreadsheetGuiExport ViewProviderSheet: public Gui::ViewProviderDocumentObject
|
||||
{
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(SpreadsheetGui::ViewProviderSheet);
|
||||
|
||||
public:
|
||||
/// constructor.
|
||||
ViewProviderSheet();
|
||||
|
||||
/// destructor.
|
||||
~ViewProviderSheet() override;
|
||||
|
||||
bool useNewSelectionModel() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool doubleClicked() override;
|
||||
void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override;
|
||||
|
||||
Spreadsheet::Sheet* getSpreadsheetObject() const;
|
||||
|
||||
void beforeDelete() override;
|
||||
|
||||
QIcon getIcon() const override;
|
||||
|
||||
bool setEdit(int ModNum) override;
|
||||
|
||||
bool isShow() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Gui::MDIView* getMDIView() const override;
|
||||
|
||||
inline SheetView* getView() const
|
||||
{
|
||||
return view;
|
||||
}
|
||||
|
||||
PyObject* getPyObject() override;
|
||||
|
||||
void showSheetMdi();
|
||||
|
||||
void exportAsFile();
|
||||
|
||||
protected:
|
||||
SheetView* showSpreadsheetView();
|
||||
void updateData(const App::Property* prop) override;
|
||||
|
||||
private:
|
||||
QPointer<SheetView> view;
|
||||
};
|
||||
|
||||
using ViewProviderSheetPython = Gui::ViewProviderFeaturePythonT<ViewProviderSheet>;
|
||||
|
||||
} // namespace SpreadsheetGui
|
||||
35
src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.pyi
Normal file
@@ -0,0 +1,35 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
from Gui.ViewProviderDocumentObject import ViewProviderDocumentObject
|
||||
|
||||
@export(
|
||||
Twin="ViewProviderSheet",
|
||||
TwinPointer="ViewProviderSheet",
|
||||
Include="Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.h",
|
||||
Namespace="SpreadsheetGui",
|
||||
)
|
||||
class ViewProviderSpreadsheet(ViewProviderDocumentObject):
|
||||
"""
|
||||
ViewProviderSheet class
|
||||
|
||||
Author: Jose Luis Cercos Pita (jlcercos@gmail.com)
|
||||
License: LGPL-2.1-or-later
|
||||
"""
|
||||
|
||||
def getView(self) -> Any:
|
||||
"""Get access to the sheet view"""
|
||||
...
|
||||
|
||||
def showSheetMdi(self) -> None:
|
||||
"""Create (if necessary) and switch to the Spreadsheet MDI."""
|
||||
...
|
||||
|
||||
def exportAsFile(self) -> None:
|
||||
"""Export the sheet as a file."""
|
||||
...
|
||||
80
src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheetPyImp.cpp
Normal file
@@ -0,0 +1,80 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2021 Jose Luis Cercos-Pita *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
// clang-format off
|
||||
#include "ViewProviderSpreadsheetPy.h"
|
||||
#include "ViewProviderSpreadsheetPy.cpp"
|
||||
// clang-format on
|
||||
|
||||
|
||||
using namespace SpreadsheetGui;
|
||||
|
||||
// returns a string which represents the object e.g. when printed in python
|
||||
std::string ViewProviderSpreadsheetPy::representation() const
|
||||
{
|
||||
return {"<ViewProviderSpreadsheet object>"};
|
||||
}
|
||||
|
||||
PyObject* ViewProviderSpreadsheetPy::getView(PyObject* args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ViewProviderSheet* vp = this->getViewProviderSheetPtr();
|
||||
SheetView* sheetView = vp->getView();
|
||||
if (sheetView) {
|
||||
return sheetView->getPyObject();
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject* ViewProviderSpreadsheetPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int ViewProviderSpreadsheetPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyObject* ViewProviderSpreadsheetPy::showSheetMdi(PyObject* args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) {
|
||||
return nullptr;
|
||||
}
|
||||
this->getViewProviderSheetPtr()->showSheetMdi();
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
PyObject* ViewProviderSpreadsheetPy::exportAsFile(PyObject* args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) {
|
||||
return nullptr;
|
||||
}
|
||||
this->getViewProviderSheetPtr()->exportAsFile();
|
||||
Py_Return;
|
||||
}
|
||||
280
src/Mod/Spreadsheet/Gui/Workbench.cpp
Normal file
@@ -0,0 +1,280 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2005 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* Copyright (c) 2015 Eivind Kvedalen (eivind@kvedalen.name) *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QToolBar>
|
||||
#include <qobject.h>
|
||||
|
||||
|
||||
#include "Mod/Spreadsheet/App/Sheet.h"
|
||||
#include "Mod/Spreadsheet/Gui/SpreadsheetView.h"
|
||||
#include <App/Document.h>
|
||||
#include <App/Range.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/MenuManager.h>
|
||||
#include <Gui/ToolBarManager.h>
|
||||
|
||||
#include "Workbench.h"
|
||||
#include "qtcolorpicker.h"
|
||||
|
||||
|
||||
using namespace Base;
|
||||
using namespace App;
|
||||
using namespace SpreadsheetGui;
|
||||
using namespace Spreadsheet;
|
||||
|
||||
#if 0 // needed for Qt's lupdate utility
|
||||
qApp->translate("Workbench", "Spreadsheet");
|
||||
qApp->translate("Workbench", "&Spreadsheet");
|
||||
qApp->translate("Workbench", "&Alignment");
|
||||
qApp->translate("Workbench", "&Styles");
|
||||
#endif
|
||||
|
||||
/// @namespace ImageGui @class Workbench
|
||||
TYPESYSTEM_SOURCE(SpreadsheetGui::Workbench, Gui::StdWorkbench)
|
||||
|
||||
Workbench::Workbench()
|
||||
: Gui::StdWorkbench()
|
||||
, initialized(false)
|
||||
, workbenchHelper(new WorkbenchHelper)
|
||||
{}
|
||||
|
||||
Workbench::~Workbench() = default;
|
||||
|
||||
void Workbench::activated()
|
||||
{
|
||||
if (!initialized) {
|
||||
QList<QToolBar*> bars = Gui::getMainWindow()->findChildren<QToolBar*>(
|
||||
QStringLiteral("Spreadsheet")
|
||||
);
|
||||
|
||||
if (bars.size() == 1) {
|
||||
QToolBar* bar = bars[0];
|
||||
QtColorPicker* foregroundColor;
|
||||
QtColorPicker* backgroundColor;
|
||||
QPalette palette = Gui::getMainWindow()->palette();
|
||||
|
||||
QList<QtColorPicker*> fgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(
|
||||
QStringLiteral("Spreadsheet_ForegroundColor")
|
||||
);
|
||||
if (!fgList.empty()) {
|
||||
foregroundColor = fgList[0];
|
||||
}
|
||||
else {
|
||||
foregroundColor = new QtColorPicker(bar);
|
||||
foregroundColor->setObjectName(QStringLiteral("Spreadsheet_ForegroundColor"));
|
||||
foregroundColor->setStandardColors();
|
||||
foregroundColor->setCurrentColor(palette.color(QPalette::WindowText));
|
||||
QObject::connect(
|
||||
foregroundColor,
|
||||
&QtColorPicker::colorSet,
|
||||
workbenchHelper.get(),
|
||||
&WorkbenchHelper::setForegroundColor
|
||||
);
|
||||
}
|
||||
foregroundColor->setToolTip(QObject::tr("Sets the text color of cells"));
|
||||
foregroundColor->setWhatsThis(QObject::tr("Sets the text color of spreadsheet cells"));
|
||||
foregroundColor->setStatusTip(QObject::tr("Sets the text color of spreadsheet cells"));
|
||||
bar->addWidget(foregroundColor);
|
||||
|
||||
QList<QtColorPicker*> bgList = Gui::getMainWindow()->findChildren<QtColorPicker*>(
|
||||
QStringLiteral("Spreadsheet_BackgroundColor")
|
||||
);
|
||||
if (!bgList.empty()) {
|
||||
backgroundColor = bgList[0];
|
||||
}
|
||||
else {
|
||||
backgroundColor = new QtColorPicker(bar);
|
||||
backgroundColor->setObjectName(QStringLiteral("Spreadsheet_BackgroundColor"));
|
||||
backgroundColor->setStandardColors();
|
||||
backgroundColor->setCurrentColor(palette.color(QPalette::Base));
|
||||
QObject::connect(
|
||||
backgroundColor,
|
||||
&QtColorPicker::colorSet,
|
||||
workbenchHelper.get(),
|
||||
&WorkbenchHelper::setBackgroundColor
|
||||
);
|
||||
}
|
||||
backgroundColor->setToolTip(QObject::tr("Sets the background color of cells"));
|
||||
backgroundColor->setWhatsThis(QObject::tr("Sets the spreadsheet cells background color"));
|
||||
backgroundColor->setStatusTip(QObject::tr("Sets the background color of cells"));
|
||||
bar->addWidget(backgroundColor);
|
||||
|
||||
initialized = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WorkbenchHelper::setForegroundColor(const QColor& color)
|
||||
{
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
|
||||
if (doc) {
|
||||
Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow();
|
||||
SpreadsheetGui::SheetView* sheetView = freecad_cast<SpreadsheetGui::SheetView*>(activeWindow);
|
||||
|
||||
if (sheetView) {
|
||||
Sheet* sheet = sheetView->getSheet();
|
||||
std::vector<Range> ranges = sheetView->selectedRanges();
|
||||
|
||||
// Execute mergeCells commands
|
||||
if (!ranges.empty()) {
|
||||
std::vector<Range>::const_iterator i = ranges.begin();
|
||||
|
||||
sheet->getDocument()->openTransaction(QT_TRANSLATE_NOOP("Command", "Set text color"));
|
||||
for (; i != ranges.end(); ++i) {
|
||||
Gui::Command::doCommand(
|
||||
Gui::Command::Doc,
|
||||
"App.ActiveDocument.%s.setForeground('%s', (%f,%f,%f))",
|
||||
sheet->getNameInDocument(),
|
||||
i->rangeString().c_str(),
|
||||
color.redF(),
|
||||
color.greenF(),
|
||||
color.blueF()
|
||||
);
|
||||
}
|
||||
sheet->getDocument()->commitTransaction();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WorkbenchHelper::setBackgroundColor(const QColor& color)
|
||||
{
|
||||
Gui::Document* doc = Gui::Application::Instance->activeDocument();
|
||||
|
||||
if (doc) {
|
||||
Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow();
|
||||
SpreadsheetGui::SheetView* sheetView = freecad_cast<SpreadsheetGui::SheetView*>(activeWindow);
|
||||
|
||||
if (sheetView) {
|
||||
Sheet* sheet = sheetView->getSheet();
|
||||
std::vector<Range> ranges = sheetView->selectedRanges();
|
||||
|
||||
// Execute mergeCells commands
|
||||
if (!ranges.empty()) {
|
||||
std::vector<Range>::const_iterator i = ranges.begin();
|
||||
|
||||
sheet->getDocument()->openTransaction(
|
||||
QT_TRANSLATE_NOOP("Command", "Set background color")
|
||||
);
|
||||
for (; i != ranges.end(); ++i) {
|
||||
Gui::Command::doCommand(
|
||||
Gui::Command::Doc,
|
||||
"App.ActiveDocument.%s.setBackground('%s', (%f,%f,%f))",
|
||||
sheet->getNameInDocument(),
|
||||
i->rangeString().c_str(),
|
||||
color.redF(),
|
||||
color.greenF(),
|
||||
color.blueF()
|
||||
);
|
||||
}
|
||||
sheet->getDocument()->commitTransaction();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
{
|
||||
Gui::MenuItem* root = StdWorkbench::setupMenuBar();
|
||||
Gui::MenuItem* item = root->findItem("&Windows");
|
||||
|
||||
Gui::MenuItem* spreadsheet = new Gui::MenuItem;
|
||||
root->insertItem(item, spreadsheet);
|
||||
|
||||
// utilities
|
||||
Gui::MenuItem* alignments = new Gui::MenuItem;
|
||||
alignments->setCommand("&Alignment");
|
||||
*alignments << "Spreadsheet_AlignLeft"
|
||||
<< "Spreadsheet_AlignCenter"
|
||||
<< "Spreadsheet_AlignRight"
|
||||
<< "Spreadsheet_AlignTop"
|
||||
<< "Spreadsheet_AlignVCenter"
|
||||
<< "Spreadsheet_AlignBottom";
|
||||
|
||||
Gui::MenuItem* styles = new Gui::MenuItem;
|
||||
styles->setCommand("&Styles");
|
||||
*styles << "Spreadsheet_StyleBold"
|
||||
<< "Spreadsheet_StyleItalic"
|
||||
<< "Spreadsheet_StyleUnderline";
|
||||
|
||||
spreadsheet->setCommand("&Spreadsheet");
|
||||
*spreadsheet << "Spreadsheet_CreateSheet"
|
||||
<< "Separator"
|
||||
<< "Spreadsheet_Import"
|
||||
<< "Spreadsheet_Export"
|
||||
<< "Separator"
|
||||
<< "Spreadsheet_MergeCells"
|
||||
<< "Spreadsheet_SplitCell"
|
||||
<< "Separator" << alignments << styles;
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
{
|
||||
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
|
||||
Gui::ToolBarItem* part = new Gui::ToolBarItem(root);
|
||||
part->setCommand("Spreadsheet");
|
||||
*part << "Spreadsheet_CreateSheet"
|
||||
<< "Separator"
|
||||
<< "Spreadsheet_Import"
|
||||
<< "Spreadsheet_Export"
|
||||
<< "Separator"
|
||||
<< "Spreadsheet_MergeCells"
|
||||
<< "Spreadsheet_SplitCell"
|
||||
<< "Separator"
|
||||
<< "Spreadsheet_AlignLeft"
|
||||
<< "Spreadsheet_AlignCenter"
|
||||
<< "Spreadsheet_AlignRight"
|
||||
<< "Spreadsheet_AlignTop"
|
||||
<< "Spreadsheet_AlignVCenter"
|
||||
<< "Spreadsheet_AlignBottom"
|
||||
<< "Separator"
|
||||
<< "Spreadsheet_StyleBold"
|
||||
<< "Spreadsheet_StyleItalic"
|
||||
<< "Spreadsheet_StyleUnderline"
|
||||
<< "Separator"
|
||||
<< "Spreadsheet_SetAlias"
|
||||
<< "Separator";
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
Gui::ToolBarItem* Workbench::setupCommandBars() const
|
||||
{
|
||||
Gui::ToolBarItem* root = new Gui::ToolBarItem;
|
||||
Gui::ToolBarItem* ss = new Gui::ToolBarItem(root);
|
||||
ss->setCommand("Spreadsheet");
|
||||
*ss << "Spreadsheet_Open";
|
||||
return root;
|
||||
}
|
||||
|
||||
#include "moc_Workbench.cpp"
|
||||