From b1155373232b6e981f8515b851c44e78286ce151 Mon Sep 17 00:00:00 2001 From: Steffen Pohle Date: Wed, 23 Nov 2022 18:23:43 +0100 Subject: [PATCH] split application into different windows. --- gui.cc | 8 + simpleskycam.ui | 1606 ++++++++++++++++++++++++----------------------- 2 files changed, 841 insertions(+), 773 deletions(-) diff --git a/gui.cc b/gui.cc index 01a95c2..d6804d0 100644 --- a/gui.cc +++ b/gui.cc @@ -59,6 +59,14 @@ void cb_window_show (GtkWidget *widget, gpointer data) { GtkWidget *rboff = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "detect-pos-cboff")); GtkWidget *rbcrossc = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "detect-type-indet2")); + GtkWidget *win_detect = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "window-detect")); + GtkWidget *win_input = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "window-input")); + GtkWidget *win_output = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "window-output")); + gtk_widget_show (win_detect); + gtk_widget_show (win_input); + gtk_widget_show (win_output); + + // changing the value, will cause the 'change' event to be triggered gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rboff), true); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rbcrossc), true); diff --git a/simpleskycam.ui b/simpleskycam.ui index ff48336..e5f0dfb 100644 --- a/simpleskycam.ui +++ b/simpleskycam.ui @@ -9,66 +9,253 @@ 10 1 - + False - 1024 - 786 - - + 440 + 250 - + True - True - 600 - True - True + False + start + vertical + 3 + top - + True - True - vertical - 480 - True - True + False + + + + True + True + 0 + + + + + True + False + + + True + False + 8 + 8 + 8 + 8 + Position: + + + False + True + 0 + + + + + True + False + True + 4 + 4 + 4 + 4 + 4 + 4 + 5 + 5 + 5 + digits + + + False + True + 1 + + + + + True + False + center + 3 + 4 + , + + + False + True + 2 + + + + + True + False + True + 4 + 4 + 4 + 4 + 4 + 4 + 5 + 5 + + + False + True + 3 + + + + + Set Pos + True + True + True + 8 + 8 + 8 + 8 + 4 + 4 + + + + + False + False + 4 + + + + + Set Size + True + True + True + 8 + 8 + 4 + 4 + + + + + False + False + end + 5 + + + + + True + True + 4 + 4 + 4 + 4 + 4 + 4 + 5 + 5 + + + False + True + end + 6 + + + + + True + False + 4 + 4 + x + + + False + True + end + 7 + + + + + True + True + 4 + 4 + 4 + 4 + 4 + 4 + 5 + 5 + + + False + True + end + 8 + + - + True False - GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SMOOTH_SCROLL_MASK | GDK_TOUCHPAD_GESTURE_MASK - True - True - - - - + Size: - False - True + False + True + end + 9 + + + False + False + 1 + + + + + True + False + vertical + top - + True True True False - vertical - 1 True False - 5 - 5 - 7 + start + True + True True False - Device: + 8 + 8 + 8 + 8 + Helligkeit Grenze: False @@ -77,86 +264,27 @@ - - cb-videodev - True - False - True - - - - False - - - - - False - True - 1 - - - - - gtk-refresh - btn-videodev-refresh - True - True - True - True - True - - - - - False - True - 2 - - - - - gtk-stop - btn-videodev-stop + True - False True - True - True - True - - + detect-pos-adjbright + on + on + True + 255 + 1 + - False - True - end - 3 - - - - - gtk-media-record - btn-videodev-rec - True - True - True - True - True - - - - - False + True True - end - 4 + 1 False True - 3 0 @@ -164,12 +292,16 @@ True False - 7 + vertical - + + Off True - False - Res: + True + False + True + detect-pos-cbbright + False @@ -178,24 +310,14 @@ - + + Brightest Point True - False - True - - MAX - 1920x1080 - 1280x1024 - 1024x768 - 800x600 - 640x480 - - - - False - 10 - - + True + False + True + detect-pos-cboff + False @@ -203,671 +325,312 @@ 1 - - - True - False - Format: - - - False - True - 2 - - - - - True - False - True - - MJPG - YUYV - RGB4 - - - - False - 4 - MJPG - - - - - False - True - 3 - - - - - True - False - - - 4 - True - True - True - - - - - - False - True - end - 0 - - - - - 3 - True - True - True - - - - - - False - True - end - 1 - - - - - 2 - True - True - True - - - - - - False - True - end - 2 - - - - - 1 - True - True - True - - - - - - False - True - end - 3 - - - - - False - True - 4 - end - 5 - - False True - 3 + 8 + 1 + + + + + + + True + False + start + start + Detect Object + + + + + False + False + 0 + + + + + True + True + start + start + + + True + False + vertical + + + OFF + True + True + False + True + True + detect-type-indet1 + + + + False + True + 0 + + + + + Brightest Point + True + True + False + start + True + True + detect-type-indet0 + + + + False + True 1 - + + InputDetectCrossC True True - in - - - True - False - - - - True - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + False + start + True + True + detect-type-indet0 + - True + False True 2 + + + - + True False - Video Device + Follow Object - - False - - - - True - False - start - vertical - 2 - top - - - True - False - - - True - False - 8 - 8 - 8 - 8 - Position: - - - False - True - 0 - - - - - True - False - True - 4 - 4 - 4 - 4 - 4 - 4 - 5 - 5 - 5 - digits - - - False - True - 1 - - - - - True - False - center - 3 - 4 - , - - - False - True - 2 - - - - - True - False - True - 4 - 4 - 4 - 4 - 4 - 4 - 5 - 5 - - - False - True - 3 - - - - - Set Pos - True - True - True - 8 - 8 - 8 - 8 - 4 - 4 - - - - - False - False - 4 - - - - - Set Size - True - True - True - 8 - 8 - 4 - 4 - - - - - False - False - end - 5 - - - - - True - True - 4 - 4 - 4 - 4 - 4 - 4 - 5 - 5 - - - False - True - end - 6 - - - - - True - False - 4 - 4 - x - - - False - True - end - 7 - - - - - True - True - 4 - 4 - 4 - 4 - 4 - 4 - 5 - 5 - - - False - True - end - 8 - - - - - True - False - Size: - - - False - True - end - 9 - - + + + False + False + 1 + + + + + False + False + 2 + + + + + + + False + 400 + 300 + + + True + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK | GDK_TOUCH_MASK | GDK_SMOOTH_SCROLL_MASK | GDK_TOUCHPAD_GESTURE_MASK + True + True + + + + + + + + + False + 350 + 400 + + + + + True + False + vertical + + + True + False + + + True + False + _Datei + True + + + True + False + + + gtk-new + True + False + True + True - - False - True - 0 - - + + gtk-open True False - vertical - top - - - True - True - - - True - False - - - True - False - start - True - True - - - True - False - 8 - 8 - 8 - 8 - Helligkeit Grenze: - - - False - True - 0 - - - - - True - True - detect-pos-adjbright - on - on - True - 255 - 1 - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - - - Off - True - True - False - True - detect-pos-cbbright - - - - False - True - 0 - - - - - Brightest Point - True - True - False - True - detect-pos-cboff - - - - False - True - 1 - - - - - - - - False - True - 8 - 1 - - - - - - - True - False - start - start - Detect Object - - - - - False - False - 0 - - - - - True - True - start - start - - - True - False - vertical - - - OFF - True - True - False - True - True - detect-type-indet1 - - - - False - True - 0 - - - - - Brightest Point - True - True - False - start - True - True - detect-type-indet0 - - - - False - True - 1 - - - - - InputDetectCrossC - True - True - False - start - True - True - detect-type-indet0 - - - - False - True - 2 - - - - - - - - - - True - False - Follow Object - - - - - False - False - 1 - - + True + True - - False - False - 1 - - + + gtk-save + True + False + True + True + - + + gtk-save-as + True + False + True + True + + + + + True + False + + + + + gtk-quit + True + False + True + True + - - 1 - False - - - - - True - False - Detection/Follow - - - 1 - False - - - + + + + + True + False + _Bearbeiten + True + + True False - nix da + + + gtk-cut + True + False + True + True + + + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + gtk-delete + True + False + True + True + + - - 2 - - - + + + + + True + False + _Ansicht + True + + + + + True + False + _Hilfe + True + + True False - Output + + + gtk-about + True + False + True + True + + - - 2 - False - - - True - True - - False - True + False + True + 0 @@ -875,41 +638,102 @@ True False vertical + 1 - + True - True - vertical - 500 - True - True + False + 5 + 5 + 7 - + True False - + Device: - False - True + False + True + 0 - + + cb-videodev True False - - + True + + + + False + True + 1 + + + + + gtk-refresh + btn-videodev-refresh + True + True + True + True + True + + + + + False + True + 2 + + + + + gtk-stop + btn-videodev-stop + True + False + True + True + True + True + + + + + False + True + end + 3 + + + + + gtk-media-record + btn-videodev-rec + True + True + True + True + True + + - True - True + False + True + end + 4 - True + False True + 3 0 @@ -917,16 +741,12 @@ True False + 7 - - gtk-new + True - True - True - True - True - - + False + Res: False @@ -935,40 +755,280 @@ - - gtk-save + True - True - True - True - True - - + False + True + + MAX + 1920x1080 + 1280x1024 + 1024x768 + 800x600 + 640x480 + False True - 6 1 + + + True + False + Format: + + + False + True + 2 + + + + + True + False + True + + MJPG + YUYV + RGB4 + + + + False + True + 3 + + + + + True + False + + + 4 + True + True + True + + + + + + False + True + end + 0 + + + + + 3 + True + True + True + + + + + + False + True + end + 1 + + + + + 2 + True + True + True + + + + + + False + True + end + 2 + + + + + 1 + True + True + True + + + + + + False + True + end + 3 + + + + + False + True + 4 + end + 5 + + False True - 4 + 3 1 + + + True + True + in + + + True + False + + + + True + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + 2 + + + + + True + True + 1 + + + + + + + False + 400 + 300 + + + True + False + vertical + + + True + False + + - True - True + True + True + 0 + + + True + False + + + gtk-new + True + True + True + True + True + + + + + False + True + 0 + + + + + gtk-save + True + True + True + True + True + + + + + False + True + 6 + 1 + + + + + False + True + 4 + 1 + + + + +