Exemplo n.º 1
0
 def on_click_menu_button_open(self):
     """Open database file"""
     w = QFileDialog(self,
                     directory=str(Path.home().absolute()),
                     caption="Selectionnez la base de donné",
                     filter="Base de donnée SQLite (*.sqlite)")
     w.open()
Exemplo n.º 2
0
 def show(self):
     super().show()
     if settings.workspace_dir is None:
         input = QMessageBox(self).question(self, "FreeNote Workspace",
                                            "No FreeNote Workspace was found. Would you like to create one now?",
                                            QMessageBox.Yes, QMessageBox.No)
         if input == QMessageBox.No:
             raise ValueError("no valid FreeNote workspace found")
         else:
             form = QFileDialog(self, "Select a FreeNote Workspace directory")
             form.setFileMode(form.DirectoryOnly)
             form.setDirectory(".")
             form.fileSelected.connect(self._set_workspace_from_dialog)
             form.open()
     else:
         if "FREENOTE_WORKSPACE_DIR" in environ:
             self._content.show(environ["FREENOTE_WORKSPACE_DIR"])
         else:
             self._content.show()
Exemplo n.º 3
0
 def _on_send_files_button(self):
     dialog = QFileDialog(self, "Send")
     dialog.setFileMode(QFileDialog.ExistingFiles)
     dialog.filesSelected.connect(self._on_send_files_selected)
     dialog.open()