Commit a78f3954 authored by Halla Rempt's avatar Halla Rempt

Remove KoResourceManagerWidget class

parent 698f9f2f
......@@ -4,7 +4,6 @@ set(kritaresourcemanager_PART_SRCS
resourcemanager.cpp
KoXmlResourceBundleManifest.cpp
KoResourceBundle.cpp
KoResourceManagerWidget.cpp
KoResourceManagerControl.cpp
KoResourceTableModel.cpp
KoDlgCreateBundle.cpp
......@@ -12,7 +11,6 @@ set(kritaresourcemanager_PART_SRCS
)
kde4_add_ui_files(kritaresourcemanager_PART_SRCS
KoResourceManagerWidget.ui
wdg_dlgcreatebundle.ui
wdgdlgbundlemanager.ui
)
......
/*
* Copyright (c) 2014 Victor Lafon metabolic.ewilan@hotmail.fr
*
* 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 KORESOURCEMANAGERWIDGET_H
#define KORESOURCEMANAGERWIDGET_H
#include <QModelIndex>
#include <QLabel>
#include <kdialog.h>
namespace Ui
{
class KoResourceManagerWidget;
}
class ClickLabel : public QLabel
{
Q_OBJECT
public:
ClickLabel(QWidget * parent = 0)
: QLabel(parent) {
}
signals:
void clicked();
private:
void mousePressEvent(QMouseEvent * event) {
Q_UNUSED(event);
emit clicked();
}
};
class KoResourceManagerControl;
class KoResourceTaggingManager;
class QTableView;
class KoResourceManagerWidget : public KDialog
{
Q_OBJECT
public:
explicit KoResourceManagerWidget(QWidget *parent = 0);
~KoResourceManagerWidget();
void initializeConnect();
void initializeFilterMenu();
void initializeModels(bool first = false);
void initializeTitle();
QTableView* tableAvailable(int index);
private slots:
void createPack();
void deletePack();
void installPack();
void uninstallPack();
void setMeta();
void thumbnail();
void exportBundle();
void importBundle();
void startRenaming();
void endRenaming();
void rename(QString newName);
void filterFieldSelected(bool);
void filterResourceTypes(int index);
void toBundleView(int installTab);
void showHide();
void refreshDetails(QModelIndex newIndex);
void saveMeta();
void refreshTaggingManager(int index = 0);
void tableAvailableChanged(int index);
void refresh();
void removeTag();
void status(QString text = QString(), int timeout = 2000);
private:
QWidget *m_page;
Ui::KoResourceManagerWidget *m_ui;
KoResourceManagerControl *m_control;
KoResourceTaggingManager *m_tagManager;
ClickLabel *m_resourceNameLabel;
bool m_firstRefresh;
QAction *m_actionAll;
QAction *m_actionName;
QAction *m_actionFile;
};
#endif // KORESOURCEMANAGERWIDGET_H
......@@ -44,7 +44,6 @@
#include <kis_paintop_preset.h>
#include <kis_brush_server.h>
#include "KoResourceManagerWidget.h"
#include "dlg_bundle_manager.h"
#include "KoDlgCreateBundle.h"
......@@ -116,11 +115,7 @@ ResourceManager::ResourceManager(QObject *parent, const QVariantList &)
{
Q_UNUSED(ResourceBundleServerProvider::instance()); // load the bundles
KisAction *action = new KisAction(i18n("Resource Manager..."), this);
addAction("resourcemanager", action);
connect(action, SIGNAL(triggered()), this, SLOT(slotResourceManager()));
action = new KisAction(i18n("Import Resources or Bundles..."), this);
KisAction *action = new KisAction(i18n("Import Resources or Bundles..."), this);
addAction("import", action);
connect(action, SIGNAL(triggered()), this, SLOT(slotImport()));
......@@ -137,15 +132,6 @@ ResourceManager::~ResourceManager()
{
}
void ResourceManager::slotResourceManager()
{
KoResourceManagerWidget * resourceManager = new KoResourceManagerWidget();
Q_CHECK_PTR(resourceManager);
resourceManager->setObjectName("ResourceManager");
resourceManager->exec();
delete resourceManager;
}
void ResourceManager::slotImport()
{
KoFileDialog dlg(m_view, KoFileDialog::OpenFiles, "krita_resources");
......
......@@ -50,7 +50,6 @@ public:
virtual ~ResourceManager();
private slots:
void slotResourceManager();
void slotImport();
void slotCreateBundle();
void slotManageBundles();
......
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui library="kritaresourcemanager" version="7">
<kpartgui library="kritaresourcemanager" version="8">
<MenuBar>
<Menu name="Edit"><text>&amp;Edit</text>
<Menu name="Resources"><text>&amp;Resources</text>
<Action name="import"/>
<Action name="createbundle"/>
<Action name="managebundles"/>
<Action name="resourcemanager"/>
</Menu>
</Menu>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment