File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ void MainWindow::init()
184184 // Add keyboard shortcut for "Edit Cell" dock
185185 ui->viewMenu ->actions ().at (3 )->setShortcut (QKeySequence (tr (" Ctrl+E" )));
186186
187- // If we're not compiling in SQLCipher, hide it's FAQ link in the help menu
187+ // If we're not compiling in SQLCipher, hide its FAQ link in the help menu
188188#ifndef ENABLE_SQLCIPHER
189189 ui->actionSqlCipherFaq ->setVisible (false );
190190#endif
@@ -1674,6 +1674,10 @@ void MainWindow::reloadSettings()
16741674 // Refresh view
16751675 populateStructure ();
16761676 populateTable ();
1677+
1678+ // Hide or show the File → Remote menu as needed
1679+ QAction *remoteMenuAction = ui->menuRemote ->menuAction ();
1680+ remoteMenuAction->setVisible (Settings::getSettingsValue (" MainWindow" , " remotemenu" ).toBool ());
16771681}
16781682
16791683void MainWindow::httpresponse (QNetworkReply *reply)
@@ -2052,6 +2056,16 @@ void MainWindow::on_butSavePlot_clicked()
20522056 }
20532057}
20542058
2059+ void MainWindow::on_actionOpen_Remote_triggered ()
2060+ {
2061+ QDesktopServices::openUrl (QUrl (" https://dbhub.io" ));
2062+ }
2063+
2064+ void MainWindow::on_actionSave_Remote_triggered ()
2065+ {
2066+ QDesktopServices::openUrl (QUrl (" https://dbhub.io" ));
2067+ }
2068+
20552069void MainWindow::on_actionWiki_triggered ()
20562070{
20572071 QDesktopServices::openUrl (QUrl (" https://github.com/sqlitebrowser/sqlitebrowser/wiki" ));
Original file line number Diff line number Diff line change @@ -199,6 +199,8 @@ private slots:
199199 void exportTableToJson ();
200200 void fileSave ();
201201 void fileRevert ();
202+ void on_actionOpen_Remote_triggered ();
203+ void on_actionSave_Remote_triggered ();
202204 void exportDatabaseToSQL ();
203205 void importDatabaseFromSQL ();
204206 void openPreferences ();
Original file line number Diff line number Diff line change 845845 <addaction name =" fileExportCSVAction" />
846846 <addaction name =" fileExportJsonAction" />
847847 </widget >
848+ <widget class =" QMenu" name =" menuRemote" >
849+ <property name =" title" >
850+ <string >Remote</string >
851+ </property >
852+ <addaction name =" actionOpen_Remote" />
853+ <addaction name =" actionSave_Remote" />
854+ </widget >
848855 <addaction name =" fileNewAction" />
849856 <addaction name =" fileOpenAction" />
850857 <addaction name =" fileAttachAction" />
851858 <addaction name =" fileCloseAction" />
852859 <addaction name =" separator" />
860+ <addaction name =" menuRemote" />
861+ <addaction name =" separator" />
853862 <addaction name =" fileSaveAction" />
854863 <addaction name =" fileRevertAction" />
855864 <addaction name =" fileCompactAction" />
19581967 <enum >QAction::NoRole</enum >
19591968 </property >
19601969 </action >
1970+ <action name =" actionOpen_Remote" >
1971+ <property name =" text" >
1972+ <string >Open from Remote</string >
1973+ </property >
1974+ </action >
1975+ <action name =" actionSave_Remote" >
1976+ <property name =" text" >
1977+ <string >Save to Remote</string >
1978+ </property >
1979+ </action >
19611980 </widget >
19621981 <customwidgets >
19631982 <customwidget >
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ void PreferencesDialog::loadSettings()
5959 ui->comboDefaultLocation ->setCurrentIndex (Settings::getSettingsValue (" db" , " savedefaultlocation" ).toInt ());
6060 ui->locationEdit ->setText (Settings::getSettingsValue (" db" , " defaultlocation" ).toString ());
6161 ui->checkUpdates ->setChecked (Settings::getSettingsValue (" checkversion" , " enabled" ).toBool ());
62+ ui->checkUseRemotes ->setChecked (Settings::getSettingsValue (" MainWindow" , " remotemenu" ).toBool ());
6263 ui->checkHideSchemaLinebreaks ->setChecked (Settings::getSettingsValue (" db" , " hideschemalinebreaks" ).toBool ());
6364 ui->foreignKeysCheckBox ->setChecked (Settings::getSettingsValue (" db" , " foreignkeys" ).toBool ());
6465 ui->spinPrefetchSize ->setValue (Settings::getSettingsValue (" db" , " prefetchsize" ).toInt ());
@@ -137,6 +138,7 @@ void PreferencesDialog::saveSettings()
137138
138139 Settings::setSettingsValue (" db" , " defaultfieldtype" , ui->defaultFieldTypeComboBox ->currentIndex ());
139140
141+ Settings::setSettingsValue (" MainWindow" , " remotemenu" , ui->checkUseRemotes ->isChecked ());
140142 Settings::setSettingsValue (" checkversion" , " enabled" , ui->checkUpdates ->isChecked ());
141143
142144 Settings::setSettingsValue (" databrowser" , " font" , ui->comboDataBrowserFont ->currentText ());
You can’t perform that action at this time.
0 commit comments