Changeset - 45f7246b22b1
[Not reviewed]
snapshots
0 3 0
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-09-30 03:47:39
hy@ozderya.net
added "Close" menu item to snapshot window

Note that if `delete view` is used, segfault occurs upon clicking "Close" menu
3 files changed with 32 insertions and 3 deletions:
0 comments (0 inline, 0 general)
snapshot.cpp
Show inline comments
 
@@ -53,7 +53,7 @@ void SnapShot::show()
 

	
 
void SnapShot::viewClosed()
 
{
 
    delete view;
 
    view->deleteLater();
 
    view = NULL;
 
}
 

	
snapshotview.cpp
Show inline comments
 
@@ -11,7 +11,7 @@ SnapShotView::SnapShotView(QWidget *pare
 
    _snapShot = snapShot;
 

	
 
    ui->setupUi(this);
 
    ui->menuSnapshot->addAction(snapShot->deleteAction());
 
    ui->menuSnapshot->insertAction(ui->actionClose, snapShot->deleteAction());
 
    this->setWindowTitle(snapShot->name());
 

	
 
    unsigned numOfChannels = snapShot->data.size();
snapshotview.ui
Show inline comments
 
@@ -35,6 +35,7 @@
 
    </property>
 
    <addaction name="actionRename"/>
 
    <addaction name="actionExport"/>
 
    <addaction name="actionClose"/>
 
   </widget>
 
   <widget class="QMenu" name="menuView">
 
    <property name="title">
 
@@ -60,6 +61,17 @@
 
    <string>Rename this snapshot</string>
 
   </property>
 
  </action>
 
  <action name="actionClose">
 
   <property name="text">
 
    <string>Close</string>
 
   </property>
 
   <property name="toolTip">
 
    <string>Close Window</string>
 
   </property>
 
   <property name="shortcut">
 
    <string>Ctrl+W</string>
 
   </property>
 
  </action>
 
 </widget>
 
 <customwidgets>
 
  <customwidget>
 
@@ -70,5 +82,22 @@
 
  </customwidget>
 
 </customwidgets>
 
 <resources/>
 
 <connections/>
 
 <connections>
 
  <connection>
 
   <sender>actionClose</sender>
 
   <signal>triggered()</signal>
 
   <receiver>SnapShotView</receiver>
 
   <slot>close()</slot>
 
   <hints>
 
    <hint type="sourcelabel">
 
     <x>-1</x>
 
     <y>-1</y>
 
    </hint>
 
    <hint type="destinationlabel">
 
     <x>271</x>
 
     <y>224</y>
 
    </hint>
 
   </hints>
 
  </connection>
 
 </connections>
 
</ui>
0 comments (0 inline, 0 general)