connect( myBrowser,
SIGNAL( dropped( const QList<SUIT_DataObject*>&, SUIT_DataObject*, int, Qt::DropAction ) ),
SLOT( onZonesDropped( const QList<SUIT_DataObject*>&, SUIT_DataObject*, int, Qt::DropAction ) ) );
+ connect( myBrowser, SIGNAL( newRegion() ), this, SLOT( OnNewRegion() ) );
return aPage;
}
}
}
+void HYDROGUI_CalculationDlg::OnNewRegion()
+{
+ emit createRegion( myBrowser->getSelected() );
+}
+
void HYDROGUI_CalculationDlg::onMergeTypeSelected( int theIndex )
{
int aType = myBathymetryChoice->itemData( theIndex ).toInt();
void HYDROGUI_CalculationDlg::onOrderChanged()
{
myPriorityWidget->setObjects( getGeometryObjects() );
-}
\ No newline at end of file
+}
virtual bool acceptCurrent() const;
+protected slots:
+ void OnNewRegion();
+
private:
QList<Handle(HYDROData_Object)> getGeometryObjects();
#include <QObject>
#include <QShortcut>
+#include <QMenu>
class SUIT_DataBrowser;
class LightApp_DataObject;
treeView()->setColumnWidth(SUIT_DataObject::VisibilityId, VISIBILITY_COLUMN_WIDTH);
treeView()->hideColumn( SUIT_DataObject::VisibilityId );
treeView()->hideColumn( LightApp_DataObject::EntryId );
- //RKV: connectPopupRequest( theModule->getApp(), SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
+ connectPopupRequest( theModule->getApp(), SLOT( onConnectPopupRequest( SUIT_PopupClient*, QContextMenuEvent* ) ) );
}
HYDROGUI_DataBrowser::~HYDROGUI_DataBrowser()
aShortcut->setEnabled( !theIsReadOnly );
}
}
-}
\ No newline at end of file
+}
+
+void HYDROGUI_DataBrowser::createPopupMenu( QMenu* theMenu )
+{
+ theMenu->clear();
+ theMenu->addAction( tr( "ZONE_TO_NEW_REGION" ), this, SIGNAL( newRegion() ) );
+}
signals:
void dropped( const QList<SUIT_DataObject*>& theList,
- SUIT_DataObject* theTargetParent, int theTargetRow, Qt::DropAction theDropAction );
+ SUIT_DataObject* theTargetParent,
+ int theTargetRow, Qt::DropAction theDropAction );
void dataChanged();
+ void newRegion();
+
+protected:
+ virtual void createPopupMenu( QMenu* );
private:
HYDROGUI_Module* myModule;
<source>ALTITUDE_COLUMN</source>
<translation>Altitude.Object</translation>
</message>
+ <message>
+ <source>ZONE_TO_NEW_REGION</source>
+ <translation>Create a new region</translation>
+ </message>
</context>
<context>