@ -226,8 +226,8 @@ void LabelEditor::createCommandHistory()
void LabelEditor : : createCommandHistoryActions ( )
{
undoAct = ( K Action* ) actionCollection ( ) - > action ( " edit_undo " ) ;
redoAct = ( K Action* ) actionCollection ( ) - > action ( " edit_redo " ) ;
undoAct = ( TDE Action* ) actionCollection ( ) - > action ( " edit_undo " ) ;
redoAct = ( TDE Action* ) actionCollection ( ) - > action ( " edit_redo " ) ;
undoAct - > plug ( editMenu , 0 ) ;
redoAct - > plug ( editMenu , 1 ) ;
@ -437,46 +437,46 @@ bool LabelEditor::newLabel()
void LabelEditor : : setupActions ( )
{
K Action* newAct = KStdAction : : openNew ( TQT_TQOBJECT ( this ) , TQT_SLOT ( startEditor ( ) ) , actionCollection ( ) ) ;
K Action* loadAct = KStdAction : : open ( TQT_TQOBJECT ( this ) , TQT_SLOT ( startLoadEditor ( ) ) , actionCollection ( ) ) ;
K Action* quitAct = KStdAction : : quit ( TQT_TQOBJECT ( kapp ) , TQT_SLOT ( quit ( ) ) , actionCollection ( ) ) ;
K Action* closeAct = KStdAction : : close ( TQT_TQOBJECT ( this ) , TQT_SLOT ( close ( ) ) , actionCollection ( ) , " close " ) ;
closeLabelAct = new K Action( i18n ( " Close &Label " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( closeLabel ( ) ) , actionCollection ( ) ) ;
TDE Action* newAct = KStdAction : : openNew ( TQT_TQOBJECT ( this ) , TQT_SLOT ( startEditor ( ) ) , actionCollection ( ) ) ;
TDE Action* loadAct = KStdAction : : open ( TQT_TQOBJECT ( this ) , TQT_SLOT ( startLoadEditor ( ) ) , actionCollection ( ) ) ;
TDE Action* quitAct = KStdAction : : quit ( TQT_TQOBJECT ( kapp ) , TQT_SLOT ( quit ( ) ) , actionCollection ( ) ) ;
TDE Action* closeAct = KStdAction : : close ( TQT_TQOBJECT ( this ) , TQT_SLOT ( close ( ) ) , actionCollection ( ) , " close " ) ;
closeLabelAct = new TDE Action( i18n ( " Close &Label " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( closeLabel ( ) ) , actionCollection ( ) ) ;
recentAct = new K RecentFilesAction( i18n ( " &Recent Files " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( loadRecentEditor ( const KURL & ) ) ) ;
recentAct = new TDE RecentFilesAction( i18n ( " &Recent Files " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( loadRecentEditor ( const KURL & ) ) ) ;
KAction* importPrintFileAct = new K Action( i18n ( " &Import and Print Batch File... " ) , BarIconSet ( " fileprint " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( batchPrint ( ) ) , actionCollection ( ) ) ;
TDEAction* importPrintFileAct = new TDE Action( i18n ( " &Import and Print Batch File... " ) , BarIconSet ( " fileprint " ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( batchPrint ( ) ) , actionCollection ( ) ) ;
saveAct = KStdAction : : save ( TQT_TQOBJECT ( this ) , TQT_SLOT ( save ( ) ) , actionCollection ( ) , " save " ) ;
saveAsAct = KStdAction : : saveAs ( TQT_TQOBJECT ( this ) , TQT_SLOT ( saveas ( ) ) , actionCollection ( ) , " saveas " ) ;
descriptionAct = new K Action( i18n ( " &Change description... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( changeDes ( ) ) , actionCollection ( ) ) ;
deleteAct = new K Action( i18n ( " &Delete Object " ) , TQIconSet ( BarIcon ( " editdelete " ) ) , Key_Delete , TQT_TQOBJECT ( cv ) , TQT_SLOT ( deleteCurrent ( ) ) , actionCollection ( ) ) ;
editPropAct = new K Action( i18n ( " &Properties... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( doubleClickedCurrent ( ) ) , actionCollection ( ) ) ;
descriptionAct = new TDE Action( i18n ( " &Change description... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( changeDes ( ) ) , actionCollection ( ) ) ;
deleteAct = new TDE Action( i18n ( " &Delete Object " ) , TQIconSet ( BarIcon ( " editdelete " ) ) , Key_Delete , TQT_TQOBJECT ( cv ) , TQT_SLOT ( deleteCurrent ( ) ) , actionCollection ( ) ) ;
editPropAct = new TDE Action( i18n ( " &Properties... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( doubleClickedCurrent ( ) ) , actionCollection ( ) ) ;
printAct = KStdAction : : print ( TQT_TQOBJECT ( this ) , TQT_SLOT ( print ( ) ) , actionCollection ( ) , " print " ) ;
bcpAct = new K Action( i18n ( " Print to &Barcode Printer... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( printBCP ( ) ) , actionCollection ( ) ) ;
imgAct = new K Action( i18n ( " Print to &Image... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( printImage ( ) ) , actionCollection ( ) ) ;
changeSizeAct = new K Action( i18n ( " &Change Label... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( changeSize ( ) ) , actionCollection ( ) ) ;
barcodeAct = new K Action( i18n ( " Insert &Barcode " ) , TQIconSet ( BarIcon ( " barcode " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertBarcode ( ) ) , actionCollection ( ) ) ;
bcpAct = new TDE Action( i18n ( " Print to &Barcode Printer... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( printBCP ( ) ) , actionCollection ( ) ) ;
imgAct = new TDE Action( i18n ( " Print to &Image... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( printImage ( ) ) , actionCollection ( ) ) ;
changeSizeAct = new TDE Action( i18n ( " &Change Label... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( changeSize ( ) ) , actionCollection ( ) ) ;
barcodeAct = new TDE Action( i18n ( " Insert &Barcode " ) , TQIconSet ( BarIcon ( " barcode " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertBarcode ( ) ) , actionCollection ( ) ) ;
barcodeAct - > setEnabled ( Barkode : : haveBarcode ( ) ) ;
pictureAct = new K Action( i18n ( " Insert &Picture " ) , TQIconSet ( BarIcon ( " inline_image " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertPicture ( ) ) , actionCollection ( ) ) ;
textAct = new K Action( i18n ( " Insert &Text " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertText ( ) ) , actionCollection ( ) ) ;
textDataAct = new K Action( i18n ( " Insert &Data Field " ) , TQIconSet ( BarIcon ( " contents " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertDataText ( ) ) , actionCollection ( ) ) ;
textLineAct = new K Action( i18n ( " Insert &Text Line " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertTextLine ( ) ) , actionCollection ( ) ) ;
lineAct = new K Action( i18n ( " Insert &Line " ) , TQIconSet ( BarIcon ( " kbarcodelinetool " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertLine ( ) ) , actionCollection ( ) ) ;
rectAct = new K Action( i18n ( " Insert &Rectangle " ) , TQIconSet ( BarIcon ( " kbarcoderect " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertRect ( ) ) , actionCollection ( ) ) ;
circleAct = new K Action( i18n ( " Insert &Ellipse " ) , TQIconSet ( BarIcon ( " kbarcodeellipse " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertCircle ( ) ) , actionCollection ( ) ) ;
pictureAct = new TDE Action( i18n ( " Insert &Picture " ) , TQIconSet ( BarIcon ( " inline_image " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertPicture ( ) ) , actionCollection ( ) ) ;
textAct = new TDE Action( i18n ( " Insert &Text " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertText ( ) ) , actionCollection ( ) ) ;
textDataAct = new TDE Action( i18n ( " Insert &Data Field " ) , TQIconSet ( BarIcon ( " contents " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertDataText ( ) ) , actionCollection ( ) ) ;
textLineAct = new TDE Action( i18n ( " Insert &Text Line " ) , TQIconSet ( BarIcon ( " text " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertTextLine ( ) ) , actionCollection ( ) ) ;
lineAct = new TDE Action( i18n ( " Insert &Line " ) , TQIconSet ( BarIcon ( " kbarcodelinetool " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertLine ( ) ) , actionCollection ( ) ) ;
rectAct = new TDE Action( i18n ( " Insert &Rectangle " ) , TQIconSet ( BarIcon ( " kbarcoderect " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertRect ( ) ) , actionCollection ( ) ) ;
circleAct = new TDE Action( i18n ( " Insert &Ellipse " ) , TQIconSet ( BarIcon ( " kbarcodeellipse " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( insertCircle ( ) ) , actionCollection ( ) ) ;
spellAct = KStdAction : : spelling ( TQT_TQOBJECT ( this ) , TQT_SLOT ( spellCheck ( ) ) , actionCollection ( ) , " spell " ) ;
gridAct = new K ToggleAction( i18n ( " &Grid " ) , TQIconSet ( BarIcon ( " kbarcodegrid " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( toggleGrid ( ) ) , actionCollection ( ) ) ;
previewAct = new K Action( i18n ( " &Preview... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( preview ( ) ) , actionCollection ( ) ) ;
sep = new K ActionSeparator( TQT_TQOBJECT ( this ) ) ;
gridAct = new TDE ToggleAction( i18n ( " &Grid " ) , TQIconSet ( BarIcon ( " kbarcodegrid " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( toggleGrid ( ) ) , actionCollection ( ) ) ;
previewAct = new TDE Action( i18n ( " &Preview... " ) , 0 , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( preview ( ) ) , actionCollection ( ) ) ;
sep = new TDE ActionSeparator( TQT_TQOBJECT ( this ) ) ;
cutAct = KStdAction : : cut ( TQT_TQOBJECT ( this ) , TQT_SLOT ( cut ( ) ) , actionCollection ( ) , " cut " ) ;
copyAct = KStdAction : : copy ( TQT_TQOBJECT ( this ) , TQT_SLOT ( copy ( ) ) , actionCollection ( ) , " copy " ) ;
pasteAct = KStdAction : : paste ( TQT_TQOBJECT ( this ) , TQT_SLOT ( paste ( ) ) , actionCollection ( ) , " paste " ) ;
selectAllAct = KStdAction : : selectAll ( TQT_TQOBJECT ( cv ) , TQT_SLOT ( selectAll ( ) ) , actionCollection ( ) , " select_all " ) ;
deSelectAllAct = KStdAction : : deselect ( TQT_TQOBJECT ( cv ) , TQT_SLOT ( deSelectAll ( ) ) , actionCollection ( ) , " de_select_all " ) ;
addressBookAct = new K Action( i18n ( " Address&book " ) , TQIconSet ( BarIcon ( " kaddressbook " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( launchAddressBook ( ) ) , actionCollection ( ) ) ;
KAction* singleBarcodeAct = new K Action( i18n ( " &Create Single Barcode... " ) , " " ,
addressBookAct = new TDE Action( i18n ( " Address&book " ) , TQIconSet ( BarIcon ( " kaddressbook " ) ) , 0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( launchAddressBook ( ) ) , actionCollection ( ) ) ;
TDEAction* singleBarcodeAct = new TDE Action( i18n ( " &Create Single Barcode... " ) , " " ,
0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( startBarcodeGen ( ) ) ,
actionCollection ( ) , " create " ) ;
singleBarcodeAct - > setEnabled ( Barkode : : haveBarcode ( ) ) ;
@ -490,7 +490,7 @@ void LabelEditor::setupActions()
copyAct - > plug ( toolBar ( ) ) ;
pasteAct - > plug ( toolBar ( ) ) ;
tools = new K ToolBar( this , this - > leftDock ( ) , true , " tools " ) ;
tools = new TDE ToolBar( this , this - > leftDock ( ) , true , " tools " ) ;
barcodeAct - > plug ( tools ) ;
pictureAct - > plug ( tools ) ;
@ -500,19 +500,19 @@ void LabelEditor::setupActions()
lineAct - > plug ( tools ) ;
rectAct - > plug ( tools ) ;
circleAct - > plug ( tools ) ;
( new K ActionSeparator( TQT_TQOBJECT ( this ) ) ) - > plug ( tools ) ;
( new TDE ActionSeparator( TQT_TQOBJECT ( this ) ) ) - > plug ( tools ) ;
// spellAct->plug( tools ); // KDE 3.2
gridAct - > plug ( tools ) ;
DSMainWindow : : setupActions ( ) ;
connect ( recentAct , TQT_SIGNAL ( urlSelected ( const KURL & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( startLoadRecentEditor ( const KURL & ) ) ) ;
KPopupMenu* fileMenu = new K PopupMenu( this ) ;
editMenu = new K PopupMenu( this ) ;
KPopupMenu* viewMenu = new K PopupMenu( this ) ;
KPopupMenu* insMenu = new K PopupMenu( this ) ;
KPopupMenu* toolMenu = new K PopupMenu( this ) ;
KPopupMenu* barMenu = new K PopupMenu( this ) ;
TDEPopupMenu* fileMenu = new TDE PopupMenu( this ) ;
editMenu = new TDE PopupMenu( this ) ;
TDEPopupMenu* viewMenu = new TDE PopupMenu( this ) ;
TDEPopupMenu* insMenu = new TDE PopupMenu( this ) ;
TDEPopupMenu* toolMenu = new TDE PopupMenu( this ) ;
TDEPopupMenu* barMenu = new TDE PopupMenu( this ) ;
menuBar ( ) - > removeItemAt ( 0 ) ;
menuBar ( ) - > insertItem ( i18n ( " &File " ) , fileMenu , - 1 , 0 ) ;
@ -575,16 +575,16 @@ void LabelEditor::setupActions()
void LabelEditor : : setupContextMenu ( )
{
m_mnuContext = new K PopupMenu( this ) ;
m_mnuContext = new TDE PopupMenu( this ) ;
m_mnuContext - > setCheckable ( true ) ;
KPopupMenu* orderMenu = new K PopupMenu( m_mnuContext ) ;
TDEPopupMenu* orderMenu = new TDE PopupMenu( m_mnuContext ) ;
orderMenu - > insertItem ( i18n ( " &On Top " ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( onTopCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &Raise " ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( raiseCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &Lower " ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( lowerCurrent ( ) ) ) ;
orderMenu - > insertItem ( i18n ( " &To Background " ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( backCurrent ( ) ) ) ;
KPopupMenu* centerMenu = new K PopupMenu( m_mnuContext ) ;
TDEPopupMenu* centerMenu = new TDE PopupMenu( m_mnuContext ) ;
centerMenu - > insertItem ( i18n ( " Center &Horizontally " ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( centerHorizontal ( ) ) ) ;
centerMenu - > insertItem ( i18n ( " Center &Vertically " ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( centerVertical ( ) ) ) ;