# set the window title
self.setWindowTitle ("BiaCV - " + self.currentfile)
+ # function to save a file as a new document
+ def on_file_save_as (self):
+ savefilename = PyQt4.QtGui.QFileDialog.getSaveFileName (self,
+ lang.SAVE_TITLE)
+
+ # if save file name is not none
+ if savefilename <> "":
+ mydata = self.get_document_data ()
+ mydata.save_data (savefilename)
+ self.ismodified = False
+ self.currentfile = savefilename
+ self.setWindowTitle ("BiaCV - " + self.currentfile)
+
# function to save a file
def on_file_save (self):
# only save modified file
if savefilename <> "":
mydata = self.get_document_data ()
- mydata.save_data (self.currentfile)
+ mydata.save_data (savefilename)
self.ismodified = False
self.currentfile = savefilename
self.setWindowTitle ("BiaCV - " + self.currentfile)
<slot>on_add_education()</slot>
<hints>
<hint type="sourcelabel">
- <x>426</x>
- <y>189</y>
+ <x>70</x>
+ <y>98</y>
</hint>
<hint type="destinationlabel">
<x>730</x>
<slot>on_delete_education()</slot>
<hints>
<hint type="sourcelabel">
- <x>658</x>
- <y>189</y>
+ <x>100</x>
+ <y>98</y>
</hint>
<hint type="destinationlabel">
<x>728</x>
<hints>
<hint type="sourcelabel">
<x>100</x>
- <y>217</y>
+ <y>102</y>
</hint>
<hint type="destinationlabel">
<x>726</x>
<slot>on_update_education()</slot>
<hints>
<hint type="sourcelabel">
- <x>579</x>
- <y>189</y>
+ <x>85</x>
+ <y>98</y>
</hint>
<hint type="destinationlabel">
<x>728</x>
<hints>
<hint type="sourcelabel">
<x>100</x>
- <y>217</y>
+ <y>102</y>
</hint>
<hint type="destinationlabel">
<x>729</x>
<slot>on_change_currentemployment()</slot>
<hints>
<hint type="sourcelabel">
- <x>328</x>
- <y>136</y>
+ <x>80</x>
+ <y>88</y>
</hint>
<hint type="destinationlabel">
<x>728</x>
<slot>on_add_profession()</slot>
<hints>
<hint type="sourcelabel">
- <x>309</x>
- <y>216</y>
+ <x>61</x>
+ <y>99</y>
</hint>
<hint type="destinationlabel">
<x>729</x>
<hints>
<hint type="sourcelabel">
<x>99</x>
- <y>244</y>
+ <y>103</y>
</hint>
<hint type="destinationlabel">
<x>727</x>
<hints>
<hint type="sourcelabel">
<x>99</x>
- <y>244</y>
+ <y>103</y>
</hint>
<hint type="destinationlabel">
<x>729</x>
<slot>on_delete_profession()</slot>
<hints>
<hint type="sourcelabel">
- <x>596</x>
- <y>216</y>
+ <x>99</x>
+ <y>99</y>
</hint>
<hint type="destinationlabel">
<x>729</x>
<slot>on_update_profession()</slot>
<hints>
<hint type="sourcelabel">
- <x>453</x>
- <y>216</y>
+ <x>80</x>
+ <y>99</y>
</hint>
<hint type="destinationlabel">
<x>726</x>
<slot>on_add_skill()</slot>
<hints>
<hint type="sourcelabel">
- <x>207</x>
- <y>234</y>
+ <x>51</x>
+ <y>96</y>
</hint>
<hint type="destinationlabel">
<x>730</x>
<slot>on_delete_skill()</slot>
<hints>
<hint type="sourcelabel">
- <x>566</x>
- <y>234</y>
+ <x>99</x>
+ <y>96</y>
</hint>
<hint type="destinationlabel">
<x>728</x>
<hints>
<hint type="sourcelabel">
<x>99</x>
- <y>261</y>
+ <y>102</y>
</hint>
<hint type="destinationlabel">
<x>730</x>
<hints>
<hint type="sourcelabel">
<x>99</x>
- <y>261</y>
+ <y>102</y>
</hint>
<hint type="destinationlabel">
<x>726</x>
<slot>on_update_skill()</slot>
<hints>
<hint type="sourcelabel">
- <x>386</x>
- <y>234</y>
+ <x>75</x>
+ <y>96</y>
</hint>
<hint type="destinationlabel">
<x>728</x>
<slot>on_add_lang()</slot>
<hints>
<hint type="sourcelabel">
- <x>468</x>
- <y>132</y>
+ <x>107</x>
+ <y>110</y>
</hint>
<hint type="destinationlabel">
<x>729</x>
<slot>on_delete_lang()</slot>
<hints>
<hint type="sourcelabel">
- <x>656</x>
- <y>132</y>
+ <x>107</x>
+ <y>110</y>
</hint>
<hint type="destinationlabel">
<x>733</x>
<slot>on_select_lang()</slot>
<hints>
<hint type="sourcelabel">
- <x>94</x>
- <y>160</y>
+ <x>98</x>
+ <y>110</y>
</hint>
<hint type="destinationlabel">
<x>730</x>
<slot>on_select_lang()</slot>
<hints>
<hint type="sourcelabel">
- <x>94</x>
- <y>160</y>
+ <x>98</x>
+ <y>110</y>
</hint>
<hint type="destinationlabel">
<x>730</x>
<slot>on_update_lang()</slot>
<hints>
<hint type="sourcelabel">
- <x>591</x>
- <y>132</y>
+ <x>107</x>
+ <y>110</y>
</hint>
<hint type="destinationlabel">
<x>729</x>
<hints>
<hint type="sourcelabel">
<x>99</x>
- <y>101</y>
+ <y>89</y>
</hint>
<hint type="destinationlabel">
<x>0</x>
<slot>on_document_modified()</slot>
<hints>
<hint type="sourcelabel">
- <x>86</x>
- <y>297</y>
+ <x>90</x>
+ <y>102</y>
</hint>
<hint type="destinationlabel">
<x>2</x>
<slot>on_document_modified()</slot>
<hints>
<hint type="sourcelabel">
- <x>90</x>
- <y>333</y>
+ <x>94</x>
+ <y>103</y>
</hint>
<hint type="destinationlabel">
<x>1</x>
</hint>
</hints>
</connection>
+ <connection>
+ <sender>actionSave_As</sender>
+ <signal>triggered()</signal>
+ <receiver>biacv_mainwindow</receiver>
+ <slot>on_file_save_as()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>364</x>
+ <y>248</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
<slots>
<slot>on_add_education()</slot>
<slot>on_file_new()</slot>
<slot>on_file_save()</slot>
<slot>on_file_open()</slot>
+ <slot>on_file_save_as()</slot>
</slots>
</ui>
# Form implementation generated from reading ui file 'biacv_mainwindow.ui'
#
-# Created: Mon Dec 5 20:12:17 2011
+# Created: Tue Dec 6 10:37:09 2011
# by: PyQt4 UI code generator 4.8.6
#
# WARNING! All changes made in this file will be lost!
QtCore.QObject.connect(self.action_New, QtCore.SIGNAL(_fromUtf8("triggered()")), biacv_mainwindow.on_file_new)
QtCore.QObject.connect(self.action_Save, QtCore.SIGNAL(_fromUtf8("triggered()")), biacv_mainwindow.on_file_save)
QtCore.QObject.connect(self.action_Open, QtCore.SIGNAL(_fromUtf8("triggered()")), biacv_mainwindow.on_file_open)
+ QtCore.QObject.connect(self.actionSave_As, QtCore.SIGNAL(_fromUtf8("triggered()")), biacv_mainwindow.on_file_save_as)
QtCore.QMetaObject.connectSlotsByName(biacv_mainwindow)
def retranslateUi(self, biacv_mainwindow):