diff --git a/libs/ui/forms/wdggeneralsettings.ui b/libs/ui/forms/wdggeneralsettings.ui index faec803b99..5b2b157a08 100644 --- a/libs/ui/forms/wdggeneralsettings.ui +++ b/libs/ui/forms/wdggeneralsettings.ui @@ -1,846 +1,848 @@ WdgGeneralSettings 0 0 759 468 0 0 552 295 0 Cursor 10 10 10 10 10 10 0 0 Cursor Shape: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 0 0 Outline Shape: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter While painting... 3 9 3 3 0 0 200 0 Show outline Use effective outline size Cursor Color: 48 25 Qt::Vertical 20 40 Window 0 0 Multiple Document Mode: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 0 0 1 Subwindows Tabs Background Image (overrides color): 200 0 QFrame::StyledPanel QFrame::Sunken ... 0 0 Clear Window Background: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 0 0 Qt::Vertical 0 18 General: 0 0 Don't show contents when moving sub-windows Show on-canvas popup messages Enable Hi-DPI support Allow only one instance of Krita Qt::Vertical 20 40 Tools 10 10 10 10 10 Tool Options Location (needs restart) In Doc&ker I&n Toolbar true Switch Control/Alt Selection Modifiers Enable Touch Painting Activate transform tool after pasting Kinetic Scrolling (needs restart) true true Sensitivity: Hide Scrollbars false Qt::Vertical 20 40 Qt::Horizontal 40 20 &Resources Cache location: Resource Folder: Miscellaneous 0 0 When Krita starts Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter Save session when Krita closes Autosave: 0 0 Enabled true 0 0 75 0 min Every 1 1440 5 15 Compress .kra files more (slows loading/saving) Create backup file On importing images as layers, convert to the image colorspace 0 0 Undo stack size: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 0 0 75 0 0 1000 5 30 0 0 Number of Palette Presets Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter Show root layer Warning: if you enable this setting and the file dialogs do weird stuff, do not report a bug. Enable native file dialogs (warning: may not work correctly on some systems) Maximum brush size: 0 0 The maximum diameter of a brush in pixels. px 100 10000 1000 (Needs restart) Qt::Vertical 504 13 0 0 75 0 10 30 KisIntParseSpinBox QSpinBox
kis_int_parse_spin_box.h
KisColorButton QPushButton
kis_color_button.h
KisFileNameRequester QWidget -
kis_file_name_requester.h
+
kis_file_name_requester.h
+
+ KisSliderSpinBox QWidget
kis_slider_spin_box.h
1
m_autosaveCheckBox toggled(bool) m_autosaveSpinBox setEnabled(bool) 20 20 20 20
diff --git a/libs/widgets/KisPaletteListWidget_p.h b/libs/widgets/KisPaletteListWidget_p.h index fcf6af4cf2..ba1445a821 100644 --- a/libs/widgets/KisPaletteListWidget_p.h +++ b/libs/widgets/KisPaletteListWidget_p.h @@ -1,67 +1,85 @@ +/* + * Copyright (c) 2013 Sven Langkamp + * Copyright (c) 2018 Michael Zhou + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ #ifndef KISPALETTELISTWIDGET_P_H #define KISPALETTELISTWIDGET_P_H #include #include #include #include #include #include #include "KisPaletteListWidget.h" -#include "KoResourceModel.h" +#include "KoLegacyResourceModel.h" #include "KoResourceItemView.h" #include "KoResourceItemChooser.h" #include "KoResourceServer.h" #include "KoResourceServerAdapter.h" #include "KoResourceServerProvider.h" #include "KoColorSet.h" struct KisPaletteListWidgetPrivate { class View; class Delegate; class Model; KisPaletteListWidgetPrivate(KisPaletteListWidget *); virtual ~KisPaletteListWidgetPrivate(); bool allowModification; QPointer c; QSharedPointer > rAdapter; QSharedPointer itemChooser; QScopedPointer model; QScopedPointer delegate; QScopedPointer actAdd; QScopedPointer actImport; QScopedPointer actExport; QScopedPointer actModify; QScopedPointer actRemove; }; class KisPaletteListWidgetPrivate::Delegate : public QAbstractItemDelegate { public: Delegate(QObject *); virtual ~Delegate(); void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const override; QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex &) const override; }; -class KisPaletteListWidgetPrivate::Model : public KoResourceModel +class KisPaletteListWidgetPrivate::Model : public KoLegacyResourceModel { public: Model(const QSharedPointer > &rAdapter, QObject *parent = Q_NULLPTR) - : KoResourceModel(rAdapter, parent) + : KoLegacyResourceModel(rAdapter, parent) { } ~Model() override { } Qt::ItemFlags flags(const QModelIndex &index) const override - { return KoResourceModel::flags(index) | Qt::ItemIsUserCheckable; } + { return KoLegacyResourceModel::flags(index) | Qt::ItemIsUserCheckable; } }; #endif // KISPALETTELISTWIDGET_P_H diff --git a/libs/widgets/KoLegacyResourceModel.h b/libs/widgets/KoLegacyResourceModel.h index 95050da5e6..4f9b6e5244 100644 --- a/libs/widgets/KoLegacyResourceModel.h +++ b/libs/widgets/KoLegacyResourceModel.h @@ -1,112 +1,112 @@ /* This file is part of the KDE project * Copyright (C) 2008 Jan Hambrecht * Copyright (c) 2013 Sascha Suelzer * * 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., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KOLEGACYRESOURCEMODEL_H #define KOLEGACYRESOURCEMODEL_H #include #include "QAbstractTableModel" #include "kritawidgets_export.h" class KoAbstractResourceServerAdapter; class KoResource; /// The resource model managing the resource data class KRITAWIDGETS_EXPORT KoLegacyResourceModel : public QAbstractTableModel { Q_OBJECT public: explicit KoLegacyResourceModel(QSharedPointer resourceAdapter, QObject * parent = 0); ~KoLegacyResourceModel() override; /// reimplemented int rowCount(const QModelIndex &parent = QModelIndex()) const override; /// reimplemented int columnCount ( const QModelIndex & parent = QModelIndex() ) const override; /// reimplemented QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; /// reimplemented QModelIndex index ( int row, int column = 0, const QModelIndex & parent = QModelIndex() ) const override; /// Sets the number of columns to display void setColumnCount( int columnCount ); /// Extensions to Qt::ItemDataRole. enum ItemDataRole { /// A larger thumbnail for displaying in a tooltip. 200x200 or so. LargeThumbnailRole = Qt::UserRole + 1, TagsRole }; QModelIndex indexFromResource(KoResource* resource) const; /// facade for KoAbstractResourceServerAdapter QString extensions() const; void importResourceFile(const QString &filename); void importResourceFile(const QString &filename, bool fileCreation); bool removeResource(KoResource* resource); void removeResourceFile(const QString & filename); QStringList assignedTagsList(KoResource *resource) const; void addTag(KoResource* resource, const QString& tag); void deleteTag( KoResource* resource, const QString& tag); QStringList tagNamesList() const; QStringList searchTag(const QString& lineEditText); void enableResourceFiltering(bool enable); void setCurrentTag(const QString& currentTag); void searchTextChanged(const QString& searchString); void updateServer(); int resourcesCount() const; QList currentlyVisibleResources() const; QList serverResources() const; void tagCategoryMembersChanged(); void tagCategoryAdded(const QString& tag); void tagCategoryRemoved(const QString& tag); QString serverType() const; Q_SIGNALS: /// XXX: not sure if this is the best place for these void tagBoxEntryModified(); void tagBoxEntryAdded(const QString& tag); void tagBoxEntryRemoved(const QString& tag); void beforeResourcesLayoutReset(KoResource *activateAfterReformat); void afterResourcesLayoutReset(); private: void doSafeLayoutReset(KoResource *activateAfterReformat); private Q_SLOTS: void resourceAdded(KoResource *resource); void resourceRemoved(KoResource *resource); void resourceChanged(KoResource *resource); void tagBoxEntryWasModified(); void tagBoxEntryWasAdded(const QString& tag); void tagBoxEntryWasRemoved(const QString& tag); private: QSharedPointer m_resourceAdapter; int m_columnCount; QString m_currentTag; }; -#endif // KORESOURCEMODEL_H +#endif // KoLegacyResourceModel_H