Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some dead code #179

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions qgepqwat2ili/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
from .gui_export import GuiExport
from .gui_import import GuiImport

# 19.4.2023 / 25.4.2023 ohne Bindestrich / neu aus gui_import - Gui
from .gui_importc import GuiImportc


def _show_results(title, message, log_path, level):
widget = iface.messageBar().createMessage(title, message)
Expand All @@ -71,46 +68,9 @@ def show_success(title, message, log_path):

import_dialog = None


flagskipvalidation_import = False

# 19.4.2023 / 26.7.2023 wieder gesetzt
importc_dialog = None


def action_importc(plugin):

# neu 26.7.2023 analog action_import
global importc_dialog # avoid garbage collection

# print("set flagskipvalidation_import")

iface.messageBar().pushMessage("Info", "action import", level=Qgis.Info)

importc_dialog = GuiImportc(plugin.iface.mainWindow())

# # 19.4.2023 add option for additional import configuration
def action_do_importc():
# print("Open import dialog config")
if importc_dialog.skipvalidation_import:
importc_dialog.skipvalidation_import

progress_dialog = QProgressDialog("", "", 0, 100, plugin.iface.mainWindow())
progress_dialog.setCancelButton(None)
progress_dialog.setModal(True)
progress_dialog.show()
progress_dialog.setLabelText("waiting...")
# delays the execution for 5.5 secs.
# time.sleep(5.5)
progress_dialog.close
# end action_do_importc

importc_dialog.accepted.connect(action_do_importc)
importc_dialog.adjustSize()
importc_dialog.show()


# def action_import(plugin):
def action_import(plugin):
"""
Is executed when the user clicks the importAction tool
Expand Down
20 changes: 8 additions & 12 deletions qgepqwat2ili/gui/gui_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,17 @@ class GuiImport(QDialog):
def __init__(self, parent):
super().__init__(parent)

a = True
if a:
loadUi(os.path.join(os.path.dirname(__file__), "gui_import.ui"), self)
loadUi(os.path.join(os.path.dirname(__file__), "gui_import.ui"), self)

self.accepted.connect(self.commit_session)
self.rejected.connect(self.rollback_session)
self.accepted.connect(self.commit_session)
self.rejected.connect(self.rollback_session)

header = self.treeWidget.header()
header.setSectionResizeMode(QHeaderView.ResizeToContents)
header.setSectionResizeMode(0, QHeaderView.Stretch)
header = self.treeWidget.header()
header.setSectionResizeMode(QHeaderView.ResizeToContents)
header.setSectionResizeMode(0, QHeaderView.Stretch)

# Not required here, but this way we load before opening the dialog
get_qgep_model()
else:
loadUi(os.path.join(os.path.dirname(__file__), "gui_importc.ui"), self)
# Not required here, but this way we load before opening the dialog
get_qgep_model()

def init_with_session(self, session: Session):
"""
Expand Down
115 changes: 0 additions & 115 deletions qgepqwat2ili/gui/gui_importc.py

This file was deleted.

96 changes: 0 additions & 96 deletions qgepqwat2ili/gui/gui_importc.ui

This file was deleted.

68 changes: 0 additions & 68 deletions qgepqwat2ili/gui/untitled.ui

This file was deleted.