Skip to main content

ikkVisualKit

Overview

Pythonアプリケーション開発用の軽量GUIツールキット。tkinterとcustomtkinterをベースに、ウィンドウ、ダイアログ、システムトレイアプリケーション用の汎用コンポーネントを提供します。

主な機能

  • ウィンドウベースクラス CustomTkinterベースのウィンドウを簡単に構築するベースクラスを提供。DPIスケーリング対応
  • ダイアログコンポーネント OK、YesNo、カスタムダイアログなど汎用ダイアログ
  • システムトレイ対応 トレイメニュー、常駐アプリケーション機能
  • アイコン画像 GUIボタン用プリセットアイコンを豊富に用意。ユーザー独自のアイコンも自由に追加可能。
  • ログメッセージ ikkToolkitのLogReporterと連携するログ表示用のテキストエリアを用意。ログレベルに応じた色分けやウインドウ全体のBrinkを提供。

インストール

PyPiよりインストール可能

pip install ikkVisualKit

フォームアプリケーションの作成方法

フォームの作成

  1. WindowBaseModanを継承した任意のウインドウクラスを作成します。
  2. def _build(self, root):をオーバライドして,super()._build(root)を実行します。
  3. show_window()とrun()を実行するとWindowアプリケーションが起動します。
from ikkVisualKit import WindowBaseModan

class TestWindow(WindowBaseModan):
    def __init__(self):
        super().__init__(
            title="MyWindowSample",#アプリ名
            version="0.0.0",       #バージョン
            size=(600, 400),       #ウィンドウサイズ
            icon_path="resources/icon.dio.ico", #アイコンパス(.ico推奨)
            tray_app=False      #常駐アプリにしたいならTrue
            )
        
    def _build(self, root):
        super()._build(root)
        # UIパーツの配置
        self.btn1 = self.make_ActionButton(16 ,16,  image_key="setting.dio")      #設定
        #ツールチップの付加
        self.btn1.tooltip_text = "設定を開く"
        #ハンドラの設定
        self.btn1.OnClicked += self.on_btn1_click
    def on_btn1_click(self):
        self.show_ok_dialog(title="ボタンがクリックされました", message="これはテスト用のダイアログです。")
        self .WarningBlink()  # 警告点滅を開始
    @override
    def _loadAppState(self):
        pass #フォームロード後の処理(継承必須)ウインドウ状態の復元に利用してください
    @override
    def _backupAppState(self):
        pass #フォームクローズ前の処理(継承必須)ウインドウ状態保存に利用してください

カスタムボタン

  • 大中小3タイプのボタンサイズを用意
  • ツールチップテキストをプロパティとして用意
  • マウスホバー時の色変更
  • ボタンに付与するアイコン画像を予め用意

小さいアイコン付きボタン

以下のコードは小さいサイズのアイコン付きボタンを作成する例です。 コンストラクタのx,yに配置する座標を指定し、image_keyでアイコンを指定してください。 ツールチップテキストと、イベントハンドラを後から登録することが可能です。

self.btnSetting  = self.make_ActionButton(x=16 , y=176, image_key="setting.dio")
self.btnSetting.tooltip_text = "設定を開く"  #ツールチップテキスト設定
self.btnSetting.command = self.on_setting   #ボタン押下で実行する関数の登録

alt text

大きいサイズのボタン

大きいサイズのボタンを利用する場合ばsize_rank=1もしくはsize_rank=2を指定してください。また、text=で指定した文字がアイコンと共に表示されます。

self.btnScan     = self.make_ActionButton(624, 16 , image_key="start.dio",size_rank=2,text="検査スタート")
self.btnClear    = self.make_ActionButton(784, 16 , image_key="clear.dio",size_rank=1,text="クリア")

アイコンの一覧

Name Image
alert.dio alert.dio
alwaysTop.dio alwaysTop.dio
clear.dio clear.dio
disconnect.dio disconnect.dio
error.dio error.dio
focus.dio focus.dio
folder.dio folder.dio
goto.dio goto.dio
handyReader.dio handyReader.dio
help.dio help.dio
info.dio info.dio
link.dio link.dio
lock.dio lock.dio
log.dio log.dio
open.dio open.dio
recipe.dio recipe.dio
save.dio save.dio
search.dio search.dio
setting.dio setting.dio
start.dio start.dio
swap.dio swap.dio
unlock.dio unlock.dio
warning.dio warning.dio

常に手前に表示

ui.isAlwaysOnTop = True

Metadata

Release files for ikkVisualKit 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ikkVisualKit 0.3.0
File Size Uploaded Provenance Actions
ikkvisualkit-0.3.0.tar.gz 177.8 kB Without provenance Details for ikkvisualkit-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ikkVisualKit 0.3.0
File Interpreter ABI Platform Actions
ikkvisualkit-0.3.0-py3-none-any.whl Python 3 none any Details for ikkvisualkit-0.3.0-py3-none-any.whl

Total release size: 389.7 kB

Release files / ikkvisualkit-0.3.0.tar.gz

Download URL ikkvisualkit-0.3.0.tar.gz
Size 177.8 kB
Tags Source
SHA-256 checksum
How to use checksums
62ab7ac46c0e680192486c0556c9b83e2713ef74de2574850a40dcf9980b5d4a
BLAKE2b-256 checksum
How to use checksums
b053e755437931ced3a323634e16fd646d7a25ceaa1dbbed5f21d0f98aed223e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / ikkvisualkit-0.3.0-py3-none-any.whl

Download URL ikkvisualkit-0.3.0-py3-none-any.whl
Size 211.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c61428bf68f149b055916de61641a14078ff1c56c599de1d7975b559a2e846c
BLAKE2b-256 checksum
How to use checksums
b46e8cf52098bec121f0c8f6ed50e751ba54a6e6a6da66d90dbce430843ba445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Security for ikkVisualKit 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page