Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krita
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tusooa Zhu
Krita
Commits
674495e7
Commit
674495e7
authored
Jul 13, 2018
by
Boudewijn Rempt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add skeleton db explorer
parent
76eca70e
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
386 additions
and
0 deletions
+386
-0
libs/resources/CMakeLists.txt
libs/resources/CMakeLists.txt
+1
-0
libs/resources/dbexplorer/CMakeLists.txt
libs/resources/dbexplorer/CMakeLists.txt
+19
-0
libs/resources/dbexplorer/DbExplorer.cpp
libs/resources/dbexplorer/DbExplorer.cpp
+51
-0
libs/resources/dbexplorer/DbExplorer.h
libs/resources/dbexplorer/DbExplorer.h
+40
-0
libs/resources/dbexplorer/DlgDbExplorer.cpp
libs/resources/dbexplorer/DlgDbExplorer.cpp
+47
-0
libs/resources/dbexplorer/DlgDbExplorer.h
libs/resources/dbexplorer/DlgDbExplorer.h
+47
-0
libs/resources/dbexplorer/WdgDbExplorer.ui
libs/resources/dbexplorer/WdgDbExplorer.ui
+146
-0
libs/resources/dbexplorer/dbexplorer.action
libs/resources/dbexplorer/dbexplorer.action
+18
-0
libs/resources/dbexplorer/dbexplorer.xmlgui
libs/resources/dbexplorer/dbexplorer.xmlgui
+8
-0
libs/resources/dbexplorer/kritadbexplorer.json
libs/resources/dbexplorer/kritadbexplorer.json
+9
-0
No files found.
libs/resources/CMakeLists.txt
View file @
674495e7
add_subdirectory
(
tests
)
add_subdirectory
(
dbexplorer
)
set
(
kritaresources_LIB_SRCS
KisResourceCacheDb.cpp
...
...
libs/resources/dbexplorer/CMakeLists.txt
0 → 100644
View file @
674495e7
set
(
kritadbexplorer_SOURCES
DbExplorer.cpp
DlgDbExplorer.cpp
)
ki18n_wrap_ui
(
kritadbexplorer_SOURCES WdgDbExplorer.ui
)
add_library
(
kritadbexplorer MODULE
${
kritadbexplorer_SOURCES
}
)
target_link_libraries
(
kritadbexplorer
PRIVATE
kritaui
Qt5::Core
Qt5::Widgets
Qt5::Sql
)
install
(
TARGETS kritadbexplorer DESTINATION
${
KRITA_PLUGIN_INSTALL_DIR
}
)
install
(
FILES dbexplorer.xmlgui DESTINATION
${
DATA_INSTALL_DIR
}
/kritaplugins
)
install
(
FILES dbexplorer.action DESTINATION
${
DATA_INSTALL_DIR
}
/krita/actions
)
libs/resources/dbexplorer/DbExplorer.cpp
0 → 100644
View file @
674495e7
/*
* Copyright (c) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* 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.
*/
#include "DbExplorer.h"
#include <cmath>
#include <klocalizedstring.h>
#include <kis_debug.h>
#include <kpluginfactory.h>
#include <kis_icon.h>
#include <KisViewManager.h>
#include <kis_action.h>
#include "DlgDbExplorer.h"
K_PLUGIN_FACTORY_WITH_JSON
(
DbExplorerFactory
,
"kritadbexplorer.json"
,
registerPlugin
<
DbExplorer
>
();)
DbExplorer
::
DbExplorer
(
QObject
*
parent
,
const
QVariantList
&
)
:
KisActionPlugin
(
parent
)
{
KisAction
*
action
=
createAction
(
"dbexplorer"
);
connect
(
action
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotDbExplorer
()));
}
DbExplorer
::~
DbExplorer
()
{
}
void
DbExplorer
::
slotDbExplorer
()
{
DlgDbExplorer
dlgDbExplorer
(
viewManager
()
->
mainWindow
());
dlgDbExplorer
.
exec
();
}
#include "DbExplorer.moc"
libs/resources/dbexplorer/DbExplorer.h
0 → 100644
View file @
674495e7
/*
* Copyright (c) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* 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 DBEXPLORER_H
#define DBEXPLORER_H
#include <QVariant>
#include <KisActionPlugin.h>
class
KUndo2MagicString
;
class
DbExplorer
:
public
KisActionPlugin
{
Q_OBJECT
public:
DbExplorer
(
QObject
*
parent
,
const
QVariantList
&
);
~
DbExplorer
()
override
;
public
Q_SLOTS
:
void
slotDbExplorer
();
};
#endif // DBEXPLORER_H
libs/resources/dbexplorer/DlgDbExplorer.cpp
0 → 100644
View file @
674495e7
/*
* Copyright (c) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* 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.
*/
#include "DlgDbExplorer.h"
#include <klocalizedstring.h>
#include <kis_debug.h>
#include <QTableView>
#include <QtSql/QSqlTableModel>
DlgDbExplorer
::
DlgDbExplorer
(
QWidget
*
parent
)
:
KoDialog
(
parent
)
{
setCaption
(
i18n
(
"Please paste this information in your bug report"
));
setButtons
(
Ok
);
m_page
=
new
WdgDbExplorer
(
this
);
Q_CHECK_PTR
(
m_page
);
setMainWidget
(
m_page
);
QSqlTableModel
*
storagesModel
=
new
QSqlTableModel
(
this
);
QSqlTableModel
*
tagsModel
=
new
QSqlTableModel
(
this
);
QSqlTableModel
*
resourcesModel
=
new
QSqlTableModel
(
this
);
QSqlTableModel
*
versionModel
=
new
QSqlTableModel
(
this
);
}
DlgDbExplorer
::~
DlgDbExplorer
()
{
}
libs/resources/dbexplorer/DlgDbExplorer.h
0 → 100644
View file @
674495e7
/*
* Copyright (c) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* 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 DLG_DBEXPLORER
#define DLG_DBEXPLORER
#include <KoDialog.h>
#include "ui_WdgDbExplorer.h"
class
WdgDbExplorer
:
public
QWidget
,
public
Ui
::
WdgDbExplorer
{
Q_OBJECT
public:
WdgDbExplorer
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
setupUi
(
this
);
}
};
class
DlgDbExplorer
:
public
KoDialog
{
Q_OBJECT
public:
DlgDbExplorer
(
QWidget
*
parent
=
0
);
~
DlgDbExplorer
()
override
;
private:
WdgDbExplorer
*
m_page
;
};
#endif // DLG_DBEXPLORER
libs/resources/dbexplorer/WdgDbExplorer.ui
0 → 100644
View file @
674495e7
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
WdgDbExplorer
</class>
<widget
class=
"QWidget"
name=
"WdgDbExplorer"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
640
</width>
<height>
439
</height>
</rect>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QTabWidget"
name=
"tabWidget"
>
<property
name=
"currentIndex"
>
<number>
0
</number>
</property>
<widget
class=
"QWidget"
name=
"tabStorages"
>
<attribute
name=
"title"
>
<string>
Storages
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QTableView"
name=
"tableStorages"
/>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tabResources"
>
<attribute
name=
"title"
>
<string>
Resources
</string>
</attribute>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QComboBox"
name=
"cmbResourceTypes"
/>
</item>
</layout>
</item>
<item>
<widget
class=
"QTableView"
name=
"tableResources"
/>
</item>
</layout>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QLabel"
name=
"label_3"
>
<property
name=
"text"
>
<string>
lblThumbnail
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Versions
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QTableView"
name=
"tableVersions"
/>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tabTags"
>
<attribute
name=
"title"
>
<string>
Tags
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_4"
>
<item>
<widget
class=
"QTableView"
name=
"tableTags"
/>
</item>
<item>
<widget
class=
"QTableView"
name=
"tableTaggedResources"
/>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"tabSchema"
>
<attribute
name=
"title"
>
<string>
Schema Information
</string>
</attribute>
<layout
class=
"QFormLayout"
name=
"formLayout"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"text"
>
<string>
Database Version
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLabel"
name=
"txtDatabaseVersion"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_5"
>
<property
name=
"text"
>
<string>
Krita Version
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"txtKritaVersion"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_6"
>
<property
name=
"text"
>
<string>
Creation Date
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLabel"
name=
"txtCreationDate"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
libs/resources/dbexplorer/dbexplorer.action
0 → 100644
View file @
674495e7
<?xml version="1.0" encoding="UTF-8"?>
<ActionCollection
version=
"2"
name=
"DbExplorer"
>
<Actions
category=
"DbExplorer"
>
<text>
Database Explorer
</text>
<Action
name=
"dbexplorer"
>
<icon></icon>
<text>
&
Explore Resources Cache Database...
</text>
<whatsThis>
Resources Cache Database
</whatsThis>
<toolTip>
Resources Cache Database
</toolTip>
<iconText>
Resources Cache Database
</iconText>
<activationFlags>
0
</activationFlags>
<activationConditions>
0
</activationConditions>
<shortcut></shortcut>
<isCheckable>
false
</isCheckable>
<statusTip></statusTip>
</Action>
</Actions>
</ActionCollection>
libs/resources/dbexplorer/dbexplorer.xmlgui
0 → 100644
View file @
674495e7
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui
library=
"kritadbexplorer"
version=
"8"
translationDomain=
"krita"
>
<MenuBar>
<Menu
name=
"Tools"
>
<Action
name=
"dbexplorer"
/>
</Menu>
</MenuBar>
</kpartgui>
libs/resources/dbexplorer/kritadbexplorer.json
0 → 100644
View file @
674495e7
{
"Id"
:
"Cache Db Explorer Plugin"
,
"Type"
:
"Service"
,
"X-KDE-Library"
:
"kritadbexplorer"
,
"X-KDE-ServiceTypes"
:
[
"Krita/ViewPlugin"
],
"X-Krita-Version"
:
"28"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment