Add a 'Copy Create statement' popup action to Database Browser tab · Processoriented/sqlitebrowser@75483d0 · GitHub
Skip to content

Commit 75483d0

Browse files
committed
Add a 'Copy Create statement' popup action to Database Browser tab
See issue sqlitebrowser#140.
1 parent 5578056 commit 75483d0

5 files changed

Lines changed: 48 additions & 3 deletions

File tree

‎src/MainWindow.cpp‎

Lines changed: 14 additions & 0 deletions

‎src/MainWindow.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ private slots:
176176
void editEncryption();
177177
void switchToBrowseDataTab();
178178
void on_buttonClearFilters_clicked();
179+
void copyCurrentCreateStatement();
179180
};
180181

181182
#endif

‎src/MainWindow.ui‎

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@
324324
<rect>
325325
<x>0</x>
326326
<y>0</y>
327-
<width>311</width>
328-
<height>531</height>
327+
<width>294</width>
328+
<height>444</height>
329329
</rect>
330330
</property>
331331
<layout class="QFormLayout" name="formLayout">
@@ -810,7 +810,7 @@
810810
<x>0</x>
811811
<y>0</y>
812812
<width>1000</width>
813-
<height>25</height>
813+
<height>19</height>
814814
</rect>
815815
</property>
816816
<widget class="QMenu" name="fileMenu">
@@ -1621,6 +1621,18 @@
16211621
<string>&amp;Browse Table</string>
16221622
</property>
16231623
</action>
1624+
<action name="actionEditCopyCreateStatement">
1625+
<property name="icon">
1626+
<iconset resource="icons/icons.qrc">
1627+
<normaloff>:/icons/copy</normaloff>:/icons/copy</iconset>
1628+
</property>
1629+
<property name="text">
1630+
<string>Copy Create statement</string>
1631+
</property>
1632+
<property name="toolTip">
1633+
<string>Copy the CREATE statement of the item to the clipboard</string>
1634+
</property>
1635+
</action>
16241636
</widget>
16251637
<customwidgets>
16261638
<customwidget>
@@ -2508,6 +2520,22 @@
25082520
</hint>
25092521
</hints>
25102522
</connection>
2523+
<connection>
2524+
<sender>actionEditCopyCreateStatement</sender>
2525+
<signal>triggered()</signal>
2526+
<receiver>MainWindow</receiver>
2527+
<slot>copyCurrentCreateStatement()</slot>
2528+
<hints>
2529+
<hint type="sourcelabel">
2530+
<x>-1</x>
2531+
<y>-1</y>
2532+
</hint>
2533+
<hint type="destinationlabel">
2534+
<x>499</x>
2535+
<y>314</y>
2536+
</hint>
2537+
</hints>
2538+
</connection>
25112539
</connections>
25122540
<slots>
25132541
<slot>fileOpen()</slot>
@@ -2562,5 +2590,6 @@
25622590
<slot>editEncryption()</slot>
25632591
<slot>saveSqlFileAs()</slot>
25642592
<slot>switchToBrowseDataTab()</slot>
2593+
<slot>copyCurrentCreateStatement()</slot>
25652594
</slots>
25662595
</ui>

‎src/icons/icons.qrc‎

Lines changed: 1 addition & 0 deletions

‎src/icons/page_copy.png‎

663 Bytes
Loading

0 commit comments

Comments
 (0)