@ -159,14 +159,14 @@ LabelEditor::LabelEditor( TQWidget *parent, TQString _filename, const char *name
// if( isFirstStart() )
// moveDockWindow( tools, TQt::DockLeft );
connect ( cv , TQ T _SIGNAL( doubleClickedItem ( TCanvasItem * ) ) , this , TQ T _SLOT( doubleClickedItem ( TCanvasItem * ) ) ) ;
connect ( cv , TQ T _SIGNAL( showContextMenu ( TQPoint ) ) , this , TQ T _SLOT( showContextMenu ( TQPoint ) ) ) ;
connect ( cv , TQ T _SIGNAL( movedSomething ( ) ) , this , TQ T _SLOT( setEdited ( ) ) ) ;
connect ( KBarcodeSettings : : getInstance ( ) , TQ T _SIGNAL( updateGrid ( int ) ) , cv , TQ T _SLOT( updateGUI ( ) ) ) ;
connect ( kapp , TQ T _SIGNAL( aboutToQuit ( ) ) , this , TQ T _SLOT( saveConfig ( ) ) ) ;
connect ( cv , TQ _SIGNAL( doubleClickedItem ( TCanvasItem * ) ) , this , TQ _SLOT( doubleClickedItem ( TCanvasItem * ) ) ) ;
connect ( cv , TQ _SIGNAL( showContextMenu ( TQPoint ) ) , this , TQ _SLOT( showContextMenu ( TQPoint ) ) ) ;
connect ( cv , TQ _SIGNAL( movedSomething ( ) ) , this , TQ _SLOT( setEdited ( ) ) ) ;
connect ( KBarcodeSettings : : getInstance ( ) , TQ _SIGNAL( updateGrid ( int ) ) , cv , TQ _SLOT( updateGUI ( ) ) ) ;
connect ( kapp , TQ _SIGNAL( aboutToQuit ( ) ) , this , TQ _SLOT( saveConfig ( ) ) ) ;
connect ( history , TQ T _SIGNAL( commandExecuted ( ) ) , cv , TQ T _SLOT( updateGUI ( ) ) ) ;
connect ( history , TQ T _SIGNAL( commandExecuted ( ) ) , this , TQ T _SLOT( setEdited ( ) ) ) ;
connect ( history , TQ _SIGNAL( commandExecuted ( ) ) , cv , TQ _SLOT( updateGUI ( ) ) ) ;
connect ( history , TQ _SIGNAL( commandExecuted ( ) ) , this , TQ _SLOT( setEdited ( ) ) ) ;
if ( ! _filename . isEmpty ( ) )
openUrl ( _filename ) ;
@ -247,8 +247,8 @@ void LabelEditor::clearLabel()
createCommandHistory ( ) ;
createCommandHistoryActions ( ) ;
connect ( history , TQ T _SIGNAL( commandExecuted ( ) ) , cv , TQ T _SLOT( updateGUI ( ) ) ) ;
connect ( history , TQ T _SIGNAL( commandExecuted ( ) ) , this , TQ T _SLOT( setEdited ( ) ) ) ;
connect ( history , TQ _SIGNAL( commandExecuted ( ) ) , cv , TQ _SLOT( updateGUI ( ) ) ) ;
connect ( history , TQ _SIGNAL( commandExecuted ( ) ) , this , TQ _SLOT( setEdited ( ) ) ) ;
m_edited = false ;
@ -437,47 +437,47 @@ bool LabelEditor::newLabel()
void LabelEditor : : setupActions ( )
{
TDEAction * newAct = KStdAction : : openNew ( this , TQ T _SLOT( startEditor ( ) ) , actionCollection ( ) ) ;
TDEAction * loadAct = KStdAction : : open ( this , TQ T _SLOT( startLoadEditor ( ) ) , actionCollection ( ) ) ;
TDEAction * quitAct = KStdAction : : quit ( kapp , TQ T _SLOT( quit ( ) ) , actionCollection ( ) ) ;
TDEAction * closeAct = KStdAction : : close ( this , TQ T _SLOT( close ( ) ) , actionCollection ( ) , " close " ) ;
closeLabelAct = new TDEAction ( i18n ( " Close &Label " ) , 0 , 0 , this , TQ T _SLOT( closeLabel ( ) ) , actionCollection ( ) ) ;
recentAct = new TDERecentFilesAction ( i18n ( " &Recent Files " ) , 0 , this , TQ T _SLOT( loadRecentEditor ( const KURL & ) ) ) ;
TDEAction * importPrintFileAct = new TDEAction ( i18n ( " &Import and Print Batch File... " ) , BarIconSet ( " document-print " ) , 0 , this , TQ T _SLOT( batchPrint ( ) ) , actionCollection ( ) ) ;
saveAct = KStdAction : : save ( this , TQ T _SLOT( save ( ) ) , actionCollection ( ) , " save " ) ;
saveAsAct = KStdAction : : saveAs ( this , TQ T _SLOT( saveas ( ) ) , actionCollection ( ) , " saveas " ) ;
descriptionAct = new TDEAction ( i18n ( " &Change description... " ) , 0 , 0 , this , TQ T _SLOT( changeDes ( ) ) , actionCollection ( ) ) ;
deleteAct = new TDEAction ( i18n ( " &Delete Object " ) , TQIconSet ( BarIcon ( " edit-delete " ) ) , Key_Delete , cv , TQ T _SLOT( deleteCurrent ( ) ) , actionCollection ( ) ) ;
editPropAct = new TDEAction ( i18n ( " &Properties... " ) , 0 , 0 , this , TQ T _SLOT( doubleClickedCurrent ( ) ) , actionCollection ( ) ) ;
printAct = KStdAction : : print ( this , TQ T _SLOT( print ( ) ) , actionCollection ( ) , " print " ) ;
bcpAct = new TDEAction ( i18n ( " Print to &Barcode Printer... " ) , 0 , 0 , this , TQ T _SLOT( printBCP ( ) ) , actionCollection ( ) ) ;
imgAct = new TDEAction ( i18n ( " Print to &Image... " ) , 0 , 0 , this , TQ T _SLOT( printImage ( ) ) , actionCollection ( ) ) ;
changeSizeAct = new TDEAction ( i18n ( " &Change Label... " ) , 0 , 0 , this , TQ T _SLOT( changeSize ( ) ) , actionCollection ( ) ) ;
barcodeAct = new TDEAction ( i18n ( " Insert &Barcode " ) , TQIconSet ( BarIcon ( " barcode " ) ) , 0 , this , TQ T _SLOT( insertBarcode ( ) ) , actionCollection ( ) ) ;
TDEAction * newAct = KStdAction : : openNew ( this , TQ _SLOT( startEditor ( ) ) , actionCollection ( ) ) ;
TDEAction * loadAct = KStdAction : : open ( this , TQ _SLOT( startLoadEditor ( ) ) , actionCollection ( ) ) ;
TDEAction * quitAct = KStdAction : : quit ( kapp , TQ _SLOT( quit ( ) ) , actionCollection ( ) ) ;
TDEAction * closeAct = KStdAction : : close ( this , TQ _SLOT( close ( ) ) , actionCollection ( ) , " close " ) ;
closeLabelAct = new TDEAction ( i18n ( " Close &Label " ) , 0 , 0 , this , TQ _SLOT( closeLabel ( ) ) , actionCollection ( ) ) ;
recentAct = new TDERecentFilesAction ( i18n ( " &Recent Files " ) , 0 , this , TQ _SLOT( loadRecentEditor ( const KURL & ) ) ) ;
TDEAction * importPrintFileAct = new TDEAction ( i18n ( " &Import and Print Batch File... " ) , BarIconSet ( " document-print " ) , 0 , this , TQ _SLOT( batchPrint ( ) ) , actionCollection ( ) ) ;
saveAct = KStdAction : : save ( this , TQ _SLOT( save ( ) ) , actionCollection ( ) , " save " ) ;
saveAsAct = KStdAction : : saveAs ( this , TQ _SLOT( saveas ( ) ) , actionCollection ( ) , " saveas " ) ;
descriptionAct = new TDEAction ( i18n ( " &Change description... " ) , 0 , 0 , this , TQ _SLOT( changeDes ( ) ) , actionCollection ( ) ) ;
deleteAct = new TDEAction ( i18n ( " &Delete Object " ) , TQIconSet ( BarIcon ( " edit-delete " ) ) , Key_Delete , cv , TQ _SLOT( deleteCurrent ( ) ) , actionCollection ( ) ) ;
editPropAct = new TDEAction ( i18n ( " &Properties... " ) , 0 , 0 , this , TQ _SLOT( doubleClickedCurrent ( ) ) , actionCollection ( ) ) ;
printAct = KStdAction : : print ( this , TQ _SLOT( print ( ) ) , actionCollection ( ) , " print " ) ;
bcpAct = new TDEAction ( i18n ( " Print to &Barcode Printer... " ) , 0 , 0 , this , TQ _SLOT( printBCP ( ) ) , actionCollection ( ) ) ;
imgAct = new TDEAction ( i18n ( " Print to &Image... " ) , 0 , 0 , this , TQ _SLOT( printImage ( ) ) , actionCollection ( ) ) ;
changeSizeAct = new TDEAction ( i18n ( " &Change Label... " ) , 0 , 0 , this , TQ _SLOT( changeSize ( ) ) , actionCollection ( ) ) ;
barcodeAct = new TDEAction ( i18n ( " Insert &Barcode " ) , TQIconSet ( BarIcon ( " barcode " ) ) , 0 , this , TQ _SLOT( insertBarcode ( ) ) , actionCollection ( ) ) ;
barcodeAct - > setEnabled ( Barkode : : haveBarcode ( ) ) ;
pictureAct = new TDEAction ( i18n ( " Insert &Picture " ) , TQIconSet ( BarIcon ( " inline_image " ) ) , 0 , this , TQ T _SLOT( insertPicture ( ) ) , actionCollection ( ) ) ;
textAct = new TDEAction ( i18n ( " Insert &Text " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , this , TQ T _SLOT( insertText ( ) ) , actionCollection ( ) ) ;
textDataAct = new TDEAction ( i18n ( " Insert &Data Field " ) , TQIconSet ( BarIcon ( " contents " ) ) , 0 , this , TQ T _SLOT( insertDataText ( ) ) , actionCollection ( ) ) ;
textLineAct = new TDEAction ( i18n ( " Insert &Text Line " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , this , TQ T _SLOT( insertTextLine ( ) ) , actionCollection ( ) ) ;
lineAct = new TDEAction ( i18n ( " Insert &Line " ) , TQIconSet ( BarIcon ( " kbarcodelinetool " ) ) , 0 , this , TQ T _SLOT( insertLine ( ) ) , actionCollection ( ) ) ;
rectAct = new TDEAction ( i18n ( " Insert &Rectangle " ) , TQIconSet ( BarIcon ( " kbarcoderect " ) ) , 0 , this , TQ T _SLOT( insertRect ( ) ) , actionCollection ( ) ) ;
circleAct = new TDEAction ( i18n ( " Insert &Ellipse " ) , TQIconSet ( BarIcon ( " kbarcodeellipse " ) ) , 0 , this , TQ T _SLOT( insertCircle ( ) ) , actionCollection ( ) ) ;
spellAct = KStdAction : : spelling ( this , TQ T _SLOT( spellCheck ( ) ) , actionCollection ( ) , " spell " ) ;
gridAct = new TDEToggleAction ( i18n ( " &Grid " ) , TQIconSet ( BarIcon ( " kbarcodegrid " ) ) , 0 , this , TQ T _SLOT( toggleGrid ( ) ) , actionCollection ( ) ) ;
previewAct = new TDEAction ( i18n ( " &Preview... " ) , 0 , 0 , this , TQ T _SLOT( preview ( ) ) , actionCollection ( ) ) ;
pictureAct = new TDEAction ( i18n ( " Insert &Picture " ) , TQIconSet ( BarIcon ( " inline_image " ) ) , 0 , this , TQ _SLOT( insertPicture ( ) ) , actionCollection ( ) ) ;
textAct = new TDEAction ( i18n ( " Insert &Text " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , this , TQ _SLOT( insertText ( ) ) , actionCollection ( ) ) ;
textDataAct = new TDEAction ( i18n ( " Insert &Data Field " ) , TQIconSet ( BarIcon ( " contents " ) ) , 0 , this , TQ _SLOT( insertDataText ( ) ) , actionCollection ( ) ) ;
textLineAct = new TDEAction ( i18n ( " Insert &Text Line " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , this , TQ _SLOT( insertTextLine ( ) ) , actionCollection ( ) ) ;
lineAct = new TDEAction ( i18n ( " Insert &Line " ) , TQIconSet ( BarIcon ( " kbarcodelinetool " ) ) , 0 , this , TQ _SLOT( insertLine ( ) ) , actionCollection ( ) ) ;
rectAct = new TDEAction ( i18n ( " Insert &Rectangle " ) , TQIconSet ( BarIcon ( " kbarcoderect " ) ) , 0 , this , TQ _SLOT( insertRect ( ) ) , actionCollection ( ) ) ;
circleAct = new TDEAction ( i18n ( " Insert &Ellipse " ) , TQIconSet ( BarIcon ( " kbarcodeellipse " ) ) , 0 , this , TQ _SLOT( insertCircle ( ) ) , actionCollection ( ) ) ;
spellAct = KStdAction : : spelling ( this , TQ _SLOT( spellCheck ( ) ) , actionCollection ( ) , " spell " ) ;
gridAct = new TDEToggleAction ( i18n ( " &Grid " ) , TQIconSet ( BarIcon ( " kbarcodegrid " ) ) , 0 , this , TQ _SLOT( toggleGrid ( ) ) , actionCollection ( ) ) ;
previewAct = new TDEAction ( i18n ( " &Preview... " ) , 0 , 0 , this , TQ _SLOT( preview ( ) ) , actionCollection ( ) ) ;
sep = new TDEActionSeparator ( this ) ;
cutAct = KStdAction : : cut ( this , TQ T _SLOT( cut ( ) ) , actionCollection ( ) , " cut " ) ;
copyAct = KStdAction : : copy ( this , TQ T _SLOT( copy ( ) ) , actionCollection ( ) , " copy " ) ;
pasteAct = KStdAction : : paste ( this , TQ T _SLOT( paste ( ) ) , actionCollection ( ) , " paste " ) ;
selectAllAct = KStdAction : : selectAll ( cv , TQ T _SLOT( selectAll ( ) ) , actionCollection ( ) , " select_all " ) ;
deSelectAllAct = KStdAction : : deselect ( cv , TQ T _SLOT( deSelectAll ( ) ) , actionCollection ( ) , " de_select_all " ) ;
addressBookAct = new TDEAction ( i18n ( " Address&book " ) , TQIconSet ( BarIcon ( " kaddressbook " ) ) , 0 , this , TQ T _SLOT( launchAddressBook ( ) ) , actionCollection ( ) ) ;
cutAct = KStdAction : : cut ( this , TQ _SLOT( cut ( ) ) , actionCollection ( ) , " cut " ) ;
copyAct = KStdAction : : copy ( this , TQ _SLOT( copy ( ) ) , actionCollection ( ) , " copy " ) ;
pasteAct = KStdAction : : paste ( this , TQ _SLOT( paste ( ) ) , actionCollection ( ) , " paste " ) ;
selectAllAct = KStdAction : : selectAll ( cv , TQ _SLOT( selectAll ( ) ) , actionCollection ( ) , " select_all " ) ;
deSelectAllAct = KStdAction : : deselect ( cv , TQ _SLOT( deSelectAll ( ) ) , actionCollection ( ) , " de_select_all " ) ;
addressBookAct = new TDEAction ( i18n ( " Address&book " ) , TQIconSet ( BarIcon ( " kaddressbook " ) ) , 0 , this , TQ _SLOT( launchAddressBook ( ) ) , actionCollection ( ) ) ;
TDEAction * singleBarcodeAct = new TDEAction ( i18n ( " &Create Single Barcode... " ) , " " ,
0 , this , TQ T _SLOT( startBarcodeGen ( ) ) ,
0 , this , TQ _SLOT( startBarcodeGen ( ) ) ,
actionCollection ( ) , " create " ) ;
singleBarcodeAct - > setEnabled ( Barkode : : haveBarcode ( ) ) ;
@ -505,7 +505,7 @@ void LabelEditor::setupActions()
gridAct - > plug ( tools ) ;
DSMainWindow : : setupActions ( ) ;
connect ( recentAct , TQ T _SIGNAL( urlSelected ( const KURL & ) ) , this , TQ T _SLOT( startLoadRecentEditor ( const KURL & ) ) ) ;
connect ( recentAct , TQ _SIGNAL( urlSelected ( const KURL & ) ) , this , TQ _SLOT( startLoadRecentEditor ( const KURL & ) ) ) ;
TDEPopupMenu * fileMenu = new TDEPopupMenu ( this ) ;
editMenu = new TDEPopupMenu ( this ) ;
@ -579,22 +579,22 @@ void LabelEditor::setupContextMenu()
m_mnuContext - > setCheckable ( true ) ;
TDEPopupMenu * orderMenu = new TDEPopupMenu ( m_mnuContext ) ;
orderMenu - > insertItem ( i18n ( " &On Top " ) , this , TQ T _SLOT( onTopCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &Raise " ) , this , TQ T _SLOT( raiseCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &Lower " ) , this , TQ T _SLOT( lowerCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &To Background " ) , this , TQ T _SLOT( backCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &On Top " ) , this , TQ _SLOT( onTopCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &Raise " ) , this , TQ _SLOT( raiseCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &Lower " ) , this , TQ _SLOT( lowerCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &To Background " ) , this , TQ _SLOT( backCurrent ( ) ) ) ;
TDEPopupMenu * centerMenu = new TDEPopupMenu ( m_mnuContext ) ;
centerMenu - > insertItem ( i18n ( " Center &Horizontally " ) , this , TQ T _SLOT( centerHorizontal ( ) ) ) ;
centerMenu - > insertItem ( i18n ( " Center &Vertically " ) , this , TQ T _SLOT( centerVertical ( ) ) ) ;
centerMenu - > insertItem ( i18n ( " Center &Horizontally " ) , this , TQ _SLOT( centerHorizontal ( ) ) ) ;
centerMenu - > insertItem ( i18n ( " Center &Vertically " ) , this , TQ _SLOT( centerVertical ( ) ) ) ;
m_mnuContext - > insertItem ( i18n ( " &Order " ) , orderMenu ) ;
m_mnuContext - > insertItem ( i18n ( " &Center " ) , centerMenu ) ;
m_mnuContext - > insertSeparator ( ) ;
m_mnuContext - > insertItem ( SmallIcon ( " edit-delete " ) , i18n ( " &Delete " ) , cv , TQ T _SLOT( deleteCurrent ( ) ) ) ;
m_mnuContext - > insertItem ( i18n ( " &Protect Position and Size " ) , this , TQ T _SLOT( lockItem ( ) ) , 0 , ID_LOCK_ITEM ) ;
m_mnuContext - > insertItem ( SmallIcon ( " edit-delete " ) , i18n ( " &Delete " ) , cv , TQ _SLOT( deleteCurrent ( ) ) ) ;
m_mnuContext - > insertItem ( i18n ( " &Protect Position and Size " ) , this , TQ _SLOT( lockItem ( ) ) , 0 , ID_LOCK_ITEM ) ;
m_mnuContext - > insertSeparator ( ) ;
m_mnuContext - > insertItem ( i18n ( " &Properties " ) , this , TQ T _SLOT( doubleClickedCurrent ( ) ) ) ;
m_mnuContext - > insertItem ( i18n ( " &Properties " ) , this , TQ _SLOT( doubleClickedCurrent ( ) ) ) ;
}
void LabelEditor : : insertBarcode ( )