Skip to content

Commit

Permalink
Merge pull request #34 from MIERUNE/somefixes
Browse files Browse the repository at this point in the history
ちょっとした手直し
  • Loading branch information
KeiTa4446 authored Jun 17, 2024
2 parents b66d57c + eee123a commit 63d6747
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
15 changes: 9 additions & 6 deletions dem_to_csmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ def __init__(self):
os.path.join(os.path.dirname(__file__), "dem_to_csmap.ui"), self
)

# ウィンドウタイトル
self.setWindowTitle("CSMap Plugin")

# ウィンドウを常に全面に表示する
self.setWindowFlags(Qt.WindowStaysOnTopHint)

Expand All @@ -38,7 +35,7 @@ def convert_dem_to_csmap(self):
# パラメータの設定
params = process.CsmapParams(
gf_size=self.ui.spinBoxGfSize.value(),
gf_sigma=self.ui.SpinBoxGfSigma.value(),
gf_sigma=self.ui.spinBoxGfSigma.value(),
curvature_size=self.ui.spinBoxCurvatureSize.value(),
height_scale=(
self.ui.spinBoxHeightScaleMin.value(),
Expand Down Expand Up @@ -68,8 +65,8 @@ def convert_dem_to_csmap(self):
)
except Exception as e:
iface.messageBar().pushMessage(
"ERROR",
f"DEMデータの処理中に問題が発生しました.: {e}",
"CSMap Plugin",
f"DEMデータの処理中に問題が発生しました: {e}",
level=Qgis.Critical,
)
return
Expand All @@ -80,6 +77,12 @@ def convert_dem_to_csmap(self):
iface.setActiveLayer(rlayer)
iface.zoomToActiveLayer()

iface.messageBar().pushMessage(
"CSMap Plugin",
f"変換が完了しました: {output_path}",
level=Qgis.Info,
)

# 処理終了後にウィンドウを閉じるオプション
if self.ui.checkBox_closeAfterProcessing.isChecked():
self.close()
16 changes: 8 additions & 8 deletions dem_to_csmap.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>CSMap Plugin</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
Expand Down Expand Up @@ -290,13 +290,13 @@
<number>2</number>
</property>
<property name="minimum">
<double>-100.000000000000000</double>
<double>-1.000000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
<double>0.010000000000000</double>
</property>
<property name="value">
<double>-0.100000000000000</double>
Expand All @@ -318,13 +318,13 @@
<number>2</number>
</property>
<property name="minimum">
<double>-100.000000000000000</double>
<double>-1.000000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.100000000000000</double>
Expand Down Expand Up @@ -450,7 +450,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="SpinBoxGfSigma">
<widget class="QSpinBox" name="spinBoxGfSigma">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
Expand Down

0 comments on commit 63d6747

Please sign in to comment.