Canvas
::Canvas(const QPoint
& Position,
const QSize
& Size,
QWidget* Parent
) : QSFMLCanvas(Parent, Position, Size),
MenuBar(this)
{
setMouseTracking(true);
setAttribute(Qt::WA_DeleteOnClose);
points.reserve(3000);
EqualizeSize=0;
PointsVisible=true;
QMenu* menu
= MenuBar.
addMenu("File");
menu
->addAction
("&Open",
this,
SLOT(OpenFile
()),
QKeySequence::Open);
menu
->addAction
("&Save",
this,
SLOT(SaveFile
()),
QKeySequence::Save);
menu = MenuBar.addMenu("Edit");
menu->setEnabled(false);
connect(this,SIGNAL(FileLoaded(bool)),menu,SLOT(setEnabled(bool)));
QAction* action
= menu
->addAction
("&Fault Properties",
this,
SLOT(FaultPropertiesDlg
()),
QString("Ctrl+F"));
action->setEnabled(false);
connect(this,SIGNAL(FileLoaded(bool)),action,SLOT(setEnabled(bool)));
action
= menu
->addAction
("&Equalize Fault Segments",
this,
SLOT(EqualizeDlg
()),
QString("Ctrl+E"));
action->setEnabled(false);
connect(this,SIGNAL(FileLoaded(bool)),action,SLOT(setEnabled(bool)));
menu->addSeparator();
action
= menu
->addAction
("&Define Seafloor",
this,
SLOT(SeafloorDlg
()),
QString("Ctrl+D"));
action->setEnabled(false);
connect(this,SIGNAL(FileLoaded(bool)),action,SLOT(setEnabled(bool)));
action
= menu
->addAction
("&New Horizon",
this,
SLOT(NewHorizonDlg
()),
QString("Ctrl+N"));
action->setEnabled(false);
connect(this,SIGNAL(SeaFloorDefined(bool)),action,SLOT(setEnabled(bool)));
action
= menu
->addAction
("&Horizon Properties",
this,
SLOT(HorizonPropertiesDlg
()),
QString("Ctrl+H"));
action->setEnabled(false);
connect(this,SIGNAL(SeaFloorDefined(bool)),action,SLOT(setEnabled(bool)));
menu = MenuBar.addMenu("View");
menu->setEnabled(false);
connect(this,SIGNAL(FileLoaded(bool)),menu,SLOT(setEnabled(bool)));
action
= menu
->addAction
("&Global View",
this,
SLOT(ChangeView_Key
()),
QString("Ctrl+G"));
action->setEnabled(false);
connect(this,SIGNAL(FileLoaded(bool)),action,SLOT(setEnabled(bool)));
action = menu->addAction("&Show Sealevel",this,SLOT(ViewSealevel()));
action->setEnabled(false);
action->setCheckable(true);
action->setChecked(true);
connect(this,SIGNAL(FileLoaded(bool)),action,SLOT(setEnabled(bool)));
connect(this,SIGNAL(ViewingSealevel(bool)),action,SLOT(setChecked(bool)));
action = menu->addAction("Show &Points",this,SLOT(ViewPoints()));
action->setEnabled(false);
action->setCheckable(true);
action->setChecked(true);
connect(this,SIGNAL(FileLoaded(bool)),action,SLOT(setEnabled(bool)));
connect(this,SIGNAL(ViewingPoints(bool)),action,SLOT(setChecked(bool)));
menu = MenuBar.addMenu("Analyze");
menu->setEnabled(false);
connect(this,SIGNAL(SeaFloorDefined(bool)),menu,SLOT(setEnabled(bool)));
action
= menu
->addAction
("Estimate Maximum PPI",
this,
SLOT(PPIDlg
()),
QString("Ctrl+A"));
action->setEnabled(false);
connect(this,SIGNAL(SeaFloorDefined(bool)),action,SLOT(setEnabled(bool)));
action
= menu
->addAction
("View Geostatic Ratio",
this,
SLOT(ViewRatio
()),
QString("Ctrl+R"));
action->setEnabled(false);
action->setCheckable(true);
connect(this,SIGNAL(RatioCalculated(bool)),action,SLOT(setEnabled(bool)));
connect(this,SIGNAL(ViewingRatio(bool)),action,SLOT(setChecked(bool)));
}