texteditor.cpp
changeset 395 7ced3733ba60
parent 393 053b8645e3e9
child 404 53efc2562a7d
     1.1 --- a/texteditor.cpp	Tue Oct 24 15:36:38 2006 +0000
     1.2 +++ b/texteditor.cpp	Mon Oct 30 12:39:37 2006 +0000
     1.3 @@ -35,7 +35,7 @@
     1.4  	connect (e, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) );
     1.5      setCentralWidget( e );
     1.6      statusBar()->message( tr("Ready","Statusbar message"), statusbarTime);
     1.7 -	setCaption(__VYM " - " +tr ("Note Editor"));
     1.8 +	setCaption(__VYM " - " +tr ("Note Editor","Window caption"));
     1.9  
    1.10  
    1.11  	connect(e, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)),
    1.12 @@ -196,11 +196,11 @@
    1.13  {
    1.14      QToolBar *tb = addToolBar ( tr("Note Actions") );
    1.15  	tb->setObjectName ("noteEditorFileActions");
    1.16 -    QMenu *fileMenu = menuBar()->addMenu( tr( "&Note" ));
    1.17 +    QMenu *fileMenu = menuBar()->addMenu( tr( "&Note","Menubar" ));
    1.18  
    1.19      QAction *a;
    1.20      a = new QAction( QPixmap( iconPath+"fileopen.png"), tr( "&Import..." ),this);
    1.21 -	a->setStatusTip (tr( "Import" ) );
    1.22 +	a->setStatusTip (tr( "Import","Status tip for Note menu" ) );
    1.23  	a->setShortcut( Qt::CTRL + Qt::Key_O );
    1.24      connect( a, SIGNAL( activated() ), this, SLOT( textLoad() ) );
    1.25  	tb->addAction (a);
    1.26 @@ -209,7 +209,7 @@
    1.27  
    1.28      fileMenu->addSeparator();
    1.29      a = new QAction( QPixmap(iconPath+"filesave.png" ), tr( "&Export..." ),this);
    1.30 -	a->setStatusTip (tr( "Export Note (HTML)" ) );
    1.31 +	a->setStatusTip (tr( "Export Note (HTML)","Status tip for Note menu" ) );
    1.32  	a->setShortcut( Qt::CTRL + Qt::Key_S );
    1.33      connect( a, SIGNAL( activated() ), this, SLOT( textSave() ) );
    1.34  	tb->addAction (a);
    1.35 @@ -217,13 +217,13 @@
    1.36  	actionFileSave=a;
    1.37  	
    1.38      a = new QAction(  QPixmap(), tr( "Export &As... (HTML)" ), this);
    1.39 -	a->setStatusTip (tr( "Export Note As (HTML) " ));
    1.40 +	a->setStatusTip (tr( "Export Note As (HTML) ","Status tip for Note Menu"  ));
    1.41      connect( a, SIGNAL( activated() ), this, SLOT( textSaveAs() ) );
    1.42  	fileMenu->addAction (a);
    1.43  	actionFileSaveAs=a;
    1.44  
    1.45      a = new QAction(QPixmap(), tr( "Export &As...(ASCII)" ), this);
    1.46 -	a->setStatusTip ( tr( "Export Note As (ASCII) " ) );
    1.47 +	a->setStatusTip ( tr( "Export Note As (ASCII) ","Status tip for note menu" ) );
    1.48  	a->setShortcut(Qt::ALT + Qt::Key_X );
    1.49      connect( a, SIGNAL( activated() ), this, SLOT( textExportAsASCII() ) );
    1.50  	fileMenu->addAction (a);
    1.51 @@ -231,7 +231,7 @@
    1.52  
    1.53      fileMenu->addSeparator();
    1.54      a = new QAction( QPixmap(iconPath+"fileprint.png" ), tr( "&Print..." ),this);
    1.55 -	a->setStatusTip (tr( "Print Note" ) );
    1.56 +	a->setStatusTip (tr( "Print Note","Status tip for note menu" ) );
    1.57  	a->setShortcut( Qt::CTRL + Qt::Key_P );
    1.58      connect( a, SIGNAL( activated() ), this, SLOT( textPrint() ) );
    1.59  	tb->addAction (a);
    1.60 @@ -247,7 +247,7 @@
    1.61  
    1.62      QAction *a;
    1.63      a = new QAction(QPixmap(iconPath+"undo.png"), tr( "&Undo" ), this );
    1.64 -	a->setStatusTip ( tr( "Undo" ) );
    1.65 +	a->setStatusTip ( tr( "Undo","Status tip for note menu" ) );
    1.66  	a->setShortcut(Qt::CTRL + Qt::Key_Z );
    1.67      connect( a, SIGNAL( activated() ), e, SLOT( undo() ) );
    1.68  	editMenu->addAction (a);
    1.69 @@ -255,7 +255,7 @@
    1.70  	actionEditUndo=a;
    1.71  	
    1.72      a = new QAction(QPixmap(iconPath+"redo.png" ), tr( "&Redo" ),this); 
    1.73 -	a->setStatusTip ( tr( "Redo" ) );
    1.74 +	a->setStatusTip ( tr( "Redo","Status tip for note menu" ) );
    1.75  	a->setShortcut( Qt::CTRL + Qt::Key_Y );
    1.76      connect( a, SIGNAL( activated() ), e, SLOT( redo() ) );
    1.77  	editMenu->addAction (a);
    1.78 @@ -264,14 +264,14 @@
    1.79  
    1.80      editMenu->addSeparator();
    1.81      a = new QAction(QPixmap(), tr( "Select and copy &all" ),this); 
    1.82 -	a->setStatusTip ( tr( "Select and copy all" ) );
    1.83 +	a->setStatusTip ( tr( "Select and copy all","Status tip for note menu" ) );
    1.84  	a->setShortcut( Qt::CTRL + Qt::Key_A );
    1.85      connect( a, SIGNAL( activated() ), this, SLOT( editCopyAll() ) );
    1.86  	editMenu->addAction (a);
    1.87  
    1.88      editMenu->addSeparator();
    1.89      a = new QAction(QPixmap(iconPath+"editcopy.png" ), tr( "&Copy" ),this);
    1.90 -	a->setStatusTip ( tr( "Copy" ) );
    1.91 +	a->setStatusTip ( tr( "Copy","Status tip for note menu" ) );
    1.92  	a->setShortcut( Qt::CTRL + Qt::Key_C );
    1.93      connect( a, SIGNAL( activated() ), e, SLOT( copy() ) );
    1.94  	editMenu->addAction (a);
    1.95 @@ -279,7 +279,7 @@
    1.96  	actionEditCopy=a;
    1.97  	
    1.98      a = new QAction(QPixmap(iconPath+"editcut.png" ), tr( "Cu&t" ),this);
    1.99 -	a->setStatusTip ( tr( "Cut" ) );
   1.100 +	a->setStatusTip ( tr( "Cut","Status tip for note menu" ) );
   1.101  	a->setShortcut( Qt::CTRL + Qt::Key_X );
   1.102      connect( a, SIGNAL( activated() ), e, SLOT( cut() ) );
   1.103  	editMenu->addAction (a);
   1.104 @@ -287,7 +287,7 @@
   1.105  	actionEditCut=a;
   1.106  
   1.107      a = new QAction(QPixmap(iconPath+"editpaste.png" ), tr( "&Paste" ),this);
   1.108 -	a->setStatusTip ( tr( "Paste" ) );
   1.109 +	a->setStatusTip ( tr( "Paste","Status tip for note menu" ) );
   1.110  	a->setShortcut( Qt::CTRL + Qt::Key_V );
   1.111      connect( a, SIGNAL( activated() ), e, SLOT( paste() ) );
   1.112  	editMenu->addAction (a);
   1.113 @@ -295,7 +295,7 @@
   1.114  	actionEditPaste=a;
   1.115  	
   1.116      a = new QAction( QPixmap( iconPath+"edittrash.png"), tr( "&Delete All" ), this);
   1.117 -	a->setStatusTip (tr( "Delete all" ) );
   1.118 +	a->setStatusTip (tr( "Delete all","Status tip for note menu" ) );
   1.119      connect( a, SIGNAL( activated() ), e, SLOT( clear() ) );
   1.120  	editMenu->addAction (a);
   1.121  	tb->addAction (a);
   1.122 @@ -312,7 +312,7 @@
   1.123      QAction *a;
   1.124  
   1.125      a = new QAction( QPixmap(iconPath+"formatfixedfont.png"), tr( "&Font hint" ), Qt::ALT + Qt::Key_I, this, "fontHint" );
   1.126 -	a->setStatusTip (tr( "Toggle font hint for the whole text" ) );
   1.127 +	a->setStatusTip (tr( "Toggle font hint for the whole text","Status tip for note menu" ) );
   1.128  	a->setToggleAction (true);
   1.129  	a->setOn (settings.value("/noteeditor/fonts/useFixedByDefault",false).toBool() );
   1.130      connect( a, SIGNAL( activated() ), this, SLOT( toggleFonthint() ) );
   1.131 @@ -429,19 +429,19 @@
   1.132  
   1.133      QAction *a;
   1.134      a = new QAction(tr( "Set &fixed font" ), this);
   1.135 -	a->setStatusTip ( tr( "Set fixed font" ));
   1.136 +	a->setStatusTip ( tr( "Set fixed font","Status tip for note menu" ));
   1.137      connect( a, SIGNAL( activated() ), this, SLOT( setFixedFont() ) );
   1.138  	settingsMenu->addAction (a);
   1.139  	actionSettingsFixedFont=a;
   1.140  
   1.141      a = new QAction(tr( "Set &variable font" ), this);
   1.142 -	a->setStatusTip ( tr( "Set variable font" ) );
   1.143 +	a->setStatusTip ( tr( "Set variable font","Status tip for note menu" ) );
   1.144      connect( a, SIGNAL( activated() ), this, SLOT( setVarFont() ) );
   1.145  	settingsMenu->addAction (a);
   1.146  	actionSettingsVarFont=a;
   1.147  
   1.148      a = new QAction(tr( "&fixed font is default" ),  this);
   1.149 -	a->setStatusTip (tr( "Used fixed font by default" ) );
   1.150 +	a->setStatusTip (tr( "Used fixed font by default","Status tip for note menu" ) );
   1.151  	a->setToggleAction (true);
   1.152  	// set state later in constructor...
   1.153  	settingsMenu->addAction (a);
   1.154 @@ -559,9 +559,7 @@
   1.155  		if (file.exists())
   1.156  		{
   1.157  			QMessageBox mb( __VYM,
   1.158 -				tr("The file ") + fn + 
   1.159 -				tr(" exists already. "
   1.160 -				"Do you want to overwrite it?"),
   1.161 +				tr("The file %1\nexists already.\nDo you want to overwrite it?","dialog 'save note as'").arg(fn),
   1.162  			QMessageBox::Warning,
   1.163  			QMessageBox::Yes | QMessageBox::Default,
   1.164  			QMessageBox::Cancel | QMessageBox::Escape,
   1.165 @@ -585,7 +583,7 @@
   1.166  			return;
   1.167  		}			
   1.168      }
   1.169 -	statusBar()->message(tr( "Couldn't export note ") + fn, statusbarTime );
   1.170 +	statusBar()->message(tr( "Couldn't export note ","dialog 'save note as'") + fn, statusbarTime );
   1.171  }
   1.172  
   1.173  
   1.174 @@ -635,10 +633,8 @@
   1.175  		QFile file (fn);
   1.176  		if (file.exists())
   1.177  		{
   1.178 -			QMessageBox mb( "VYM",
   1.179 -				tr("The file ") + fn + 
   1.180 -				tr(" exists already. "
   1.181 -				"Do you want to overwrite it?"),
   1.182 +			QMessageBox mb( __VYM,
   1.183 +				tr("The file %1\nexists already.\nDo you want to overwrite it?","dialog 'save note as'").arg(fn),
   1.184  			QMessageBox::Warning,
   1.185  			QMessageBox::Yes | QMessageBox::Default,
   1.186  			QMessageBox::Cancel | QMessageBox::Escape,
   1.187 @@ -673,7 +669,7 @@
   1.188      QPrinter printer;
   1.189  
   1.190      QPrintDialog *dialog = new QPrintDialog(&printer, this);
   1.191 -    dialog->setWindowTitle(tr("Print Document"));
   1.192 +    dialog->setWindowTitle(tr("Print Note"));
   1.193      if (dialog->exec() != QDialog::Accepted)
   1.194          return;
   1.195