Files
sqlitebrowser/src/RemoteDock.ui
Martin Kleusberg dd323faf2a dbhub: Add context menu action to delete local databases
Add a context menu action to the list of locally cloned databases which
allows you to delete the cloned databases.
2020-07-15 15:35:11 +02:00

434 lines
15 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RemoteDock</class>
<widget class="QDialog" name="RemoteDock">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>534</width>
<height>357</height>
</rect>
</property>
<property name="windowTitle">
<string>Remote</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QStackedWidget" name="stack">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="pageMain">
<layout class="QVBoxLayout" name="verticalLayout">
<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="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Identity</string>
</property>
<property name="buddy">
<cstring>comboUser</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboUser">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</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="buttonPushDatabase">
<property name="toolTip">
<string>Push currently opened database to server</string>
</property>
<property name="text">
<string>Upload</string>
</property>
<property name="icon">
<iconset resource="icons/icons.qrc">
<normaloff>:/icons/push_database</normaloff>:/icons/push_database</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabs">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabRemote">
<attribute name="title">
<string>DBHub.io</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTreeView" name="treeRemote">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;In this pane, remote databases from dbhub.io website can be added to DB Browser for SQLite. First you need an identity:&lt;/p&gt;&lt;ol style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Login to the dbhub.io website (use your GitHub credentials or whatever you want)&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Click the button to &amp;quot;Generate client certificate&amp;quot; (that's your identity). That'll give you a certificate file (save it to your local disk).&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Go to the Remote tab in DB Browser for SQLite Preferences. Click the button to add a new certificate to DB Browser for SQLite and choose the just downloaded certificate file.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Now the Remote panel shows your identity and you can add remote databases.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabLocal">
<attribute name="title">
<string>Local</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QTreeView" name="treeLocal">
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabDatabase">
<attribute name="title">
<string>Current Database</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Clone</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>User</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelDatabaseUser">
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Database</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelDatabaseFile">
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Branch</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="labelDatabaseBranch">
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Commits</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Commits for</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboDatabaseBranch"/>
</item>
</layout>
</item>
<item>
<widget class="QTreeView" name="treeDatabaseCommits"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageNoCerts">
<layout class="QVBoxLayout" name="verticalLayout_3">
<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>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>85</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_2">
<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>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="labelNoCert">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;You are currently using a built-in, read-only identity. For uploading your database, you need to configure and use your DBHub.io account.&lt;/p&gt;&lt;p&gt;No DBHub.io account yet? &lt;a href=&quot;https://dbhub.io/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;Create one now&lt;/span&gt;&lt;/a&gt; and import your certificate &lt;a href=&quot;#preferences&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;here&lt;/span&gt;&lt;/a&gt; to share your databases.&lt;/p&gt;&lt;p&gt;For online help visit &lt;a href=&quot;https://dbhub.io/about&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCommandLinkButton" name="buttonNoCertBack">
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_3">
<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>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>85</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
<action name="actionDeleteDatabase">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="icons/icons.qrc">
<normaloff>:/icons/close</normaloff>:/icons/close</iconset>
</property>
<property name="text">
<string>Delete Database</string>
</property>
<property name="toolTip">
<string>Delete the local clone of this database</string>
</property>
</action>
</widget>
<resources>
<include location="icons/icons.qrc"/>
</resources>
<connections>
<connection>
<sender>comboUser</sender>
<signal>currentTextChanged(QString)</signal>
<receiver>RemoteDock</receiver>
<slot>setNewIdentity(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>134</x>
<y>25</y>
</hint>
<hint type="destinationlabel">
<x>419</x>
<y>24</y>
</hint>
</hints>
</connection>
<connection>
<sender>treeRemote</sender>
<signal>doubleClicked(QModelIndex)</signal>
<receiver>RemoteDock</receiver>
<slot>fetchDatabase(QModelIndex)</slot>
<hints>
<hint type="sourcelabel">
<x>211</x>
<y>75</y>
</hint>
<hint type="destinationlabel">
<x>204</x>
<y>37</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonPushDatabase</sender>
<signal>clicked()</signal>
<receiver>RemoteDock</receiver>
<slot>pushDatabase()</slot>
<hints>
<hint type="sourcelabel">
<x>530</x>
<y>25</y>
</hint>
<hint type="destinationlabel">
<x>287</x>
<y>154</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonNoCertBack</sender>
<signal>clicked()</signal>
<receiver>RemoteDock</receiver>
<slot>switchToMainView()</slot>
<hints>
<hint type="sourcelabel">
<x>93</x>
<y>23</y>
</hint>
<hint type="destinationlabel">
<x>266</x>
<y>148</y>
</hint>
</hints>
</connection>
<connection>
<sender>treeLocal</sender>
<signal>doubleClicked(QModelIndex)</signal>
<receiver>RemoteDock</receiver>
<slot>openLocalFile(QModelIndex)</slot>
<hints>
<hint type="sourcelabel">
<x>266</x>
<y>179</y>
</hint>
<hint type="destinationlabel">
<x>266</x>
<y>148</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>setNewIdentity(QString)</slot>
<slot>fetchDatabase(QModelIndex)</slot>
<slot>pushDatabase()</slot>
<slot>switchToMainView()</slot>
<slot>openLocalFile(QModelIndex)</slot>
</slots>
</ui>