|
1 | | -import { Box, Button, Grid2, Stack, TextField, useTheme } from "@mui/material"; |
| 1 | +import { |
| 2 | + Box, |
| 3 | + Button, |
| 4 | + Dialog, |
| 5 | + DialogActions, |
| 6 | + DialogContent, |
| 7 | + DialogTitle, |
| 8 | + Grid2, |
| 9 | + IconButton, |
| 10 | + Stack, |
| 11 | + TextField, |
| 12 | + Typography, |
| 13 | + useTheme, |
| 14 | +} from "@mui/material"; |
2 | 15 | import { OavVideoStream } from "../components/OavVideoStream"; |
3 | 16 | import { |
4 | 17 | ArrowBackRounded, |
5 | 18 | ArrowDownwardRounded, |
6 | 19 | ArrowForwardRounded, |
7 | 20 | ArrowUpwardRounded, |
| 21 | + Close, |
| 22 | + Help, |
8 | 23 | } from "@mui/icons-material"; |
9 | 24 | import { useState } from "react"; |
10 | 25 |
|
@@ -175,6 +190,86 @@ export function PixelsToMicrons({ |
175 | 190 | ); |
176 | 191 | } |
177 | 192 |
|
| 193 | +export function CoordinateSystem() { |
| 194 | + const [open, setOpen] = React.useState(false); |
| 195 | + |
| 196 | + const handleClickOpen = () => { |
| 197 | + setOpen(true); |
| 198 | + }; |
| 199 | + const handleClose = () => { |
| 200 | + setOpen(false); |
| 201 | + }; |
| 202 | + |
| 203 | + return ( |
| 204 | + <> |
| 205 | + <Box> |
| 206 | + <Grid2 container spacing={2}> |
| 207 | + <Grid2 size={10}> |
| 208 | + <b>Co-ordinate System Setup</b> |
| 209 | + </Grid2> |
| 210 | + <Grid2> |
| 211 | + <Help onClick={handleClickOpen} /> |
| 212 | + </Grid2> |
| 213 | + <Grid2 size={4}> |
| 214 | + <Button>Move chip to origin</Button> |
| 215 | + </Grid2> |
| 216 | + <Grid2 size={4}> |
| 217 | + <Button>Go to Fiducial 1</Button> |
| 218 | + </Grid2> |
| 219 | + <Grid2 size={4}> |
| 220 | + <Button>Go to Fiducial 2</Button> |
| 221 | + </Grid2> |
| 222 | + <Grid2 size={4}> |
| 223 | + <Button>Set Fiducial 0</Button> |
| 224 | + </Grid2> |
| 225 | + <Grid2 size={4}> |
| 226 | + <Button>Set Fiducial 1</Button> |
| 227 | + </Grid2> |
| 228 | + <Grid2 size={4}> |
| 229 | + <Button>Set Fiducial 2</Button> |
| 230 | + </Grid2> |
| 231 | + <Grid2 size={8} offset={2}> |
| 232 | + <Button>Make Coordinate System</Button> |
| 233 | + </Grid2> |
| 234 | + </Grid2> |
| 235 | + </Box> |
| 236 | + <Dialog |
| 237 | + onClose={handleClose} |
| 238 | + aria-labelledby="customized-dialog-title" |
| 239 | + open={open} |
| 240 | + > |
| 241 | + <DialogTitle sx={{ m: 0, p: 2 }} id="customized-dialog-title"> |
| 242 | + Modal title |
| 243 | + </DialogTitle> |
| 244 | + <IconButton |
| 245 | + aria-label="close" |
| 246 | + onClick={handleClose} |
| 247 | + sx={(theme) => ({ |
| 248 | + position: "absolute", |
| 249 | + right: 8, |
| 250 | + top: 8, |
| 251 | + color: theme.palette.grey[500], |
| 252 | + })} |
| 253 | + > |
| 254 | + <Close /> |
| 255 | + </IconButton> |
| 256 | + <DialogContent dividers> |
| 257 | + <Typography gutterBottom> |
| 258 | + Cras mattis consectetur purus sit amet fermentum. Cras justo odio, |
| 259 | + dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta |
| 260 | + ac consectetur ac, vestibulum at eros. |
| 261 | + </Typography> |
| 262 | + </DialogContent> |
| 263 | + <DialogActions> |
| 264 | + <Button autoFocus onClick={handleClose}> |
| 265 | + Save changes |
| 266 | + </Button> |
| 267 | + </DialogActions> |
| 268 | + </Dialog> |
| 269 | + </> |
| 270 | + ); |
| 271 | +} |
| 272 | + |
178 | 273 | export function OavMover() { |
179 | 274 | const [crosshairX, setCrosshairX] = useState<number>(200); |
180 | 275 | const [crosshairY, setCrosshairY] = useState<number>(200); |
@@ -226,6 +321,8 @@ export function OavMover() { |
226 | 321 | label="zoom-level" |
227 | 322 | pv="ca://BL24I-EA-OAV-01:FZOOM:MP:SELECT" |
228 | 323 | /> |
| 324 | + <hr /> |
| 325 | + <CoordinateSystem /> |
229 | 326 | </Grid2> |
230 | 327 | </Grid2> |
231 | 328 | </div> |
|
0 commit comments