Initial commit: COPILOT D6 Flutter keyboard controller
Flutter web app replacing legacy WPF CCTV surveillance keyboard controller. Includes wall overview, section view with monitor grid, camera input, PTZ control, alarm/lock/sequence BLoCs, and legacy-matching UI styling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
90
copilot_keyboard/lib/presentation/blocs/ptz/ptz_event.dart
Normal file
90
copilot_keyboard/lib/presentation/blocs/ptz/ptz_event.dart
Normal file
@@ -0,0 +1,90 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
abstract class PtzEvent extends Equatable {
|
||||
const PtzEvent();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
/// Start panning
|
||||
class PtzPanStart extends PtzEvent {
|
||||
final int cameraId;
|
||||
final String direction; // 'left' or 'right'
|
||||
final int speed;
|
||||
|
||||
const PtzPanStart({
|
||||
required this.cameraId,
|
||||
required this.direction,
|
||||
this.speed = 50,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cameraId, direction, speed];
|
||||
}
|
||||
|
||||
/// Start tilting
|
||||
class PtzTiltStart extends PtzEvent {
|
||||
final int cameraId;
|
||||
final String direction; // 'up' or 'down'
|
||||
final int speed;
|
||||
|
||||
const PtzTiltStart({
|
||||
required this.cameraId,
|
||||
required this.direction,
|
||||
this.speed = 50,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cameraId, direction, speed];
|
||||
}
|
||||
|
||||
/// Start zooming
|
||||
class PtzZoomStart extends PtzEvent {
|
||||
final int cameraId;
|
||||
final String direction; // 'in' or 'out'
|
||||
final int speed;
|
||||
|
||||
const PtzZoomStart({
|
||||
required this.cameraId,
|
||||
required this.direction,
|
||||
this.speed = 50,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cameraId, direction, speed];
|
||||
}
|
||||
|
||||
/// Stop all PTZ movement
|
||||
class PtzStop extends PtzEvent {
|
||||
final int cameraId;
|
||||
|
||||
const PtzStop(this.cameraId);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cameraId];
|
||||
}
|
||||
|
||||
/// Go to preset
|
||||
class PtzGoToPreset extends PtzEvent {
|
||||
final int cameraId;
|
||||
final int preset;
|
||||
|
||||
const PtzGoToPreset({
|
||||
required this.cameraId,
|
||||
required this.preset,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cameraId, preset];
|
||||
}
|
||||
|
||||
/// Set camera for PTZ control
|
||||
class PtzSetCamera extends PtzEvent {
|
||||
final int? cameraId;
|
||||
|
||||
const PtzSetCamera(this.cameraId);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [cameraId];
|
||||
}
|
||||
Reference in New Issue
Block a user