Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 5242 → Rev 5243

/branches/Version13x/Scribus/scribus/filewatcher.h
21,7 → 21,7
Q_OBJECT
 
public:
FileWatcher(QWidget* parent);
FileWatcher(QObject* parent);
~FileWatcher();
bool isActive();
// Set the timer length in milliseconds
/branches/Version13x/Scribus/scribus/actionmanager.h
47,6 → 47,8
ActionManager ( QObject * parent, const char * name );
~ActionManager() {};
static void createDefaultShortcuts();
static const QMap<QString, QKeySequence>* defaultShortcuts() {return &defKeys;};
void createActions();
void disconnectModeActions();
void connectModeActions();
83,7 → 85,7
static void languageChangeUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap);
QPixmap noIcon;
ScribusMainWindow *ScMW;
ScribusMainWindow *mainWindow;
ScribusQApp *ScQApp;
UndoManager *undoManager;
QMap<QString, QGuardedPtr<ScrAction> > *scrActions;
91,6 → 93,7
QStringList *modeActionNames;
QStringList *nonEditActionNames;
QStringList *unicodeCharActionNames;
static QMap<QString, QKeySequence> defKeys;
};
 
/branches/Version13x/Scribus/scribus/lineformats.cpp
123,6 → 123,7
TempStyles.insert(dia->SName->text(), dia->TempVorl);
sFnumber = dia->SName->text();
}
delete dia;
UpdateFList();
}
 
/branches/Version13x/Scribus/scribus/mpalette.cpp
24,6 → 24,7
#include "sccombobox.h"
#include "scfonts.h"
#include "scribus.h"
#include "scribuscore.h"
#include "scraction.h"
#include "scribusview.h"
#include "selection.h"
3355,14 → 3356,14
if (CurItem->pixm.imgInfo.colorspace == 1)
{
ProfilesL::Iterator itP;
ProfilesL::Iterator itPend=ScMW->InputProfilesCMYK.end();
for (itP = ScMW->InputProfilesCMYK.begin(); itP != itPend; ++itP)
ProfilesL::Iterator itPend=ScCore->InputProfilesCMYK.end();
for (itP = ScCore->InputProfilesCMYK.begin(); itP != itPend; ++itP)
{
InputP->insertItem(itP.key());
if (itP.key() == CurItem->IProfile)
InputP->setCurrentItem(InputP->count()-1);
}
if (!ScMW->InputProfilesCMYK.contains(CurItem->IProfile))
if (!ScCore->InputProfilesCMYK.contains(CurItem->IProfile))
{
InputP->insertItem(CurItem->IProfile);
InputP->setCurrentItem(InputP->count()-1);
3376,14 → 3377,14
else
{
ProfilesL::Iterator itP;
ProfilesL::Iterator itPend=ScMW->InputProfiles.end();
for (itP = ScMW->InputProfiles.begin(); itP != itPend; ++itP)
ProfilesL::Iterator itPend=ScCore->InputProfiles.end();
for (itP = ScCore->InputProfiles.begin(); itP != itPend; ++itP)
{
InputP->insertItem(itP.key());
if (itP.key() == CurItem->IProfile)
InputP->setCurrentItem(InputP->count()-1);
}
if (!ScMW->InputProfiles.contains(CurItem->IProfile))
if (!ScCore->InputProfiles.contains(CurItem->IProfile))
{
InputP->insertItem(CurItem->IProfile);
InputP->setCurrentItem(InputP->count()-1);
/branches/Version13x/Scribus/scribus/loadsaveplugin.h
62,7 → 62,7
// file type (eg "XML doc with root element SCRIBUSXML and version 1.3.1").
// All plugins must implement this method.
virtual bool fileSupported(QIODevice* file) const = 0;
protected:
 
/// Register the passed format so it can be used by the app
/branches/Version13x/Scribus/scribus/pluginmanager.h
14,6 → 14,7
 
#include "scribusapi.h"
 
class ScribusMainWindow;
class ScPlugin;
class ScActionPlugin;
class ScPersistentPlugin;
45,7 → 46,7
static void* resolveSym( void* plugin, const char* sym );
static void unloadDLL( void* plugin );
 
/*! \brief Ininitalization of all plugins. It's called at scribus start.
/*! \brief Initalization of all plugins. It's called at scribus start.
*
* This method loadDLL(...)'s each plug-in, creates a Plugin instance for
* them, stores a PluginData for the plugin, sets up the plug-in's
53,6 → 54,12
* It doesn't ask plug-ins to do any time-consuming setup.
*/
void initPlugs();
/*! \brief Called at after initPlugs to hook the loaded plugin into the GUI.
* Run in main window startup
*/
bool setupPluginActions(ScribusMainWindow*);
 
/*! \brief Checks if is the plugin is in the plugin map, is loaded, and is enabled.
*
172,9 → 179,6
DOES NOT destroy the ScPlugin instance or unload the plugin. */
void disablePlugin(PluginData & pda);
 
/*! \brief Called by enablePlugin to hook the loaded plugin into the GUI. */
bool setupPluginActions(ScActionPlugin*);
 
/*! \brief Runs plugin's languageChange() method, and returns main menu item text if one exists */
QString callDLLForNewLanguage(const PluginData & pluginData);
 
/branches/Version13x/Scribus/scribus/prefs.cpp
51,6 → 51,7
#include "sccombobox.h"
#include "colorcombo.h"
#include "commonstrings.h"
#include "scribuscore.h"
 
using namespace std;
 
353,7 → 354,7
 
if (CMSavail)
{
tabColorManagement = new CMSPrefs(prefsWidgets, &prefsData->DCMSset, &ap->InputProfiles, &ap->InputProfilesCMYK, &ap->PrinterProfiles, &ap->MonitorProfiles);
tabColorManagement = new CMSPrefs(prefsWidgets, &prefsData->DCMSset, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
}
QMap<QString,int> DocFonts;
361,7 → 362,7
tabPDF = new TabPDFOptions( prefsWidgets,
prefsData->PDF_Options,
prefsData->AvailFonts,
ap->PDFXProfiles,
ScCore->PDFXProfiles,
DocFonts,
prefsData->PDF_Options.PresentVals,
docUnitIndex,
/branches/Version13x/Scribus/scribus/menumanager.cpp
50,9 → 50,6
if (!parent.isNull() && menuList[parent])
retVal=menuList[parent]->insertSubMenu(newMenu);
}
else
retVal=false;
return retVal;
}
 
60,7 → 57,6
bool MenuManager::createMenu(const QString &menuName, const QIconSet menuIcon, const QString &menuText, const QString parent, bool checkable)
{
bool retVal=false;
ScrPopupMenu *newMenu = new ScrPopupMenu(NULL, NULL, menuName, menuIcon, menuText, parent, checkable);
if (newMenu)
{
68,10 → 64,6
if (!parent.isNull() && menuList[parent])
retVal=menuList[parent]->insertSubMenu(newMenu);
}
else
retVal=false;
//qDebug(QString("createMenu: parent=%1 (%2) newMenu=%3 (%4) checkable=%5 -> %6").arg(parent).arg(!parent.isNull()).arg(menuName).arg(!newMenu).arg(checkable).arg(retVal));
return retVal;
}
 
89,8 → 81,6
menuList.insert(child, menuList[child]);
retVal=menuList[parent]->insertSubMenu(menuList[child]);
}
else
retVal=false;
return retVal;
}
97,14 → 87,12
 
bool MenuManager::clearMenu(const QString &menuName)
{
bool retVal;
bool retVal=false;
if (menuList.contains(menuName) && menuList[menuName]!=NULL)
{
menuList[menuName]->clear();
retVal=true;
}
else
retVal=false;
return retVal;
}
 
173,7 → 161,7
 
bool MenuManager::addMenuToMenuBar(const QString &menuName)
{
bool retVal;
bool retVal=false;
if (menuList.contains(menuName) && menuList[menuName]!=NULL)
{
int id=scribusMenuBar->insertItem( menuList[menuName]->getMenuIcon(), menuList[menuName]->getMenuText(), menuList[menuName]->getLocalPopupMenu());
180,8 → 168,6
menuList[menuName]->setMenuBarID(id);
retVal=true;
}
else
retVal=false;
return retVal;
}
 
206,7 → 192,7
 
bool MenuManager::removeMenuFromMenuBar(const QString &menuName)
{
bool retVal;
bool retVal=false;
if (menuList.contains(menuName) && menuList[menuName]!=NULL)
{
int id=menuList[menuName]->getMenuBarID();
214,8 → 200,6
scribusMenuBar->removeItem( id );
retVal=true;
}
else
retVal=false;
return retVal;
}
 
244,37 → 228,30
 
bool MenuManager::addMenuItem(ScrAction *menuAction, const QString &parent)
{
bool retVal;
bool retVal=false;
if (menuList.contains(parent) && menuList[parent]!=NULL)
retVal=menuList[parent]->insertMenuItem(menuAction);
else
retVal=false;
return retVal;
}
 
bool MenuManager::addMenuItem(QWidget *widget, const QString &parent)
{
bool retVal;
bool retVal=false;
if (menuList.contains(parent) && menuList[parent]!=NULL)
retVal=menuList[parent]->insertMenuItem(widget);
else
retVal=false;
return retVal;
}
 
bool MenuManager::addMenuItemAfter(ScrAction *menuAction, const QString &parent, ScrAction *afterMenuAction)
{
bool retVal;
bool retVal=false;
if (menuList.contains(parent) && menuList[parent]!=NULL)
retVal=menuList[parent]->insertMenuItemAfter(menuAction, afterMenuAction);
else
retVal=false;
return retVal;
}
 
bool MenuManager::addMenuItemAfter(ScrAction *menuAction, const QString &parent, const QString &afterMenuName)
{
bool retVal;
ScrAction *actionFromName=NULL;
//quick hack to make this work for existing plugins for now
if (parent=="File" && afterMenuName=="New")
285,11 → 262,9
actionFromName=ScMW->scrActions["fileSaveAs"];
if (parent=="Help" && afterMenuName=="Manual")
actionFromName=ScMW->scrActions["helpManual"];
bool retVal=false;
if (menuList.contains(parent) && menuList[parent]!=NULL)
retVal=menuList[parent]->insertMenuItemAfter(menuAction, actionFromName);
else
retVal=false;
return retVal;
}
 
296,11 → 271,9
 
bool MenuManager::addMenuSeparator(const QString &parent)
{
bool retVal;
bool retVal=false;
if (menuList.contains(parent) && menuList[parent]!=NULL)
retVal=menuList[parent]->insertMenuSeparator();
else
retVal=false;
return retVal;
}
307,11 → 280,9
 
bool MenuManager::removeMenuItem(ScrAction *menuAction, const QString &parent)
{
bool retVal;
bool retVal=false;
if (menuList.contains(parent) && menuList[parent]!=NULL)
retVal=menuList[parent]->removeMenuItem(menuAction);
else
retVal=false;
return retVal;
}
 
/branches/Version13x/Scribus/scribus/Makefile.am
238,6 → 238,7
werktoolb.cpp \
scribus.cpp \
scribusapp.cpp \
scribuscore.cpp \
main.cpp
 
# NOTE we have no conditional for this file yet, as Makefile.am is not used on win32 VCC.
/branches/Version13x/Scribus/scribus/scplugin.h
211,7 → 211,9
 
//! \brief Returns human readable plugin type from plug-in's pluginType
const QString pluginTypeName() const;
 
//! \brief Allow plugins to add to a main menu
virtual void addToMainWindowMenu(ScribusMainWindow *) = 0;
protected:
//! \brief Human readable, translated version of last error to occur.
QString m_lastError;
/branches/Version13x/Scribus/scribus/filewatcher.cpp
17,7 → 17,7
#include <windows.h>
#endif
 
FileWatcher::FileWatcher( QWidget* parent) : QObject(parent)
FileWatcher::FileWatcher( QObject* parent) : QObject(parent)
{
m_timeOut=10000;
watchedFiles.clear();
/branches/Version13x/Scribus/scribus/tabpdfoptions.cpp
26,7 → 26,7
extern bool CMSuse;
#endif
extern bool CMSavail;
#include "scribus.h"
#include "scribuscore.h"
 
 
 
952,7 → 952,7
#ifdef HAVE_CMS
 
QString tp = Opts.SolidProf;
if (!ScMW->InputProfiles.contains(tp))
if (!ScCore->InputProfiles.contains(tp))
{
if (vie != 0)
tp = vie->Doc->CMSSettings.DefaultSolidColorProfile;
960,8 → 960,8
tp = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorProfile;
}
ProfilesL::Iterator itp;
ProfilesL::Iterator itpend=ScMW->InputProfiles.end();
for (itp = ScMW->InputProfiles.begin(); itp != itpend; ++itp)
ProfilesL::Iterator itpend=ScCore->InputProfiles.end();
for (itp = ScCore->InputProfiles.begin(); itp != itpend; ++itp)
{
SolidPr->insertItem(itp.key());
if (itp.key() == tp)
973,7 → 973,7
if ((CMSuse) && (CMSavail))
IntendS->setCurrentItem(Opts.Intent);
QString tp1 = Opts.ImageProf;
if (!ScMW->InputProfiles.contains(tp1))
if (!ScCore->InputProfiles.contains(tp1))
{
if (vie != 0)
tp1 = vie->Doc->CMSSettings.DefaultSolidColorProfile;
981,8 → 981,8
tp1 = PrefsManager::instance()->appPrefs.DCMSset.DefaultSolidColorProfile;
}
ProfilesL::Iterator itp2;
ProfilesL::Iterator itp2end=ScMW->InputProfiles.end();
for (itp2 = ScMW->InputProfiles.begin(); itp2 != itp2end; ++itp2)
ProfilesL::Iterator itp2end=ScCore->InputProfiles.end();
for (itp2 = ScCore->InputProfiles.begin(); itp2 != itp2end; ++itp2)
{
ImageP->insertItem(itp2.key());
if (itp2.key() == tp1)
1373,7 → 1373,7
{
#ifdef HAVE_CMS
QString tp = Opts.SolidProf;
if (!ScMW->InputProfiles.contains(tp))
if (!ScCore->InputProfiles.contains(tp))
{
if (view != 0)
tp = view->Doc->CMSSettings.DefaultSolidColorProfile;
1382,8 → 1382,8
}
SolidPr->clear();
ProfilesL::Iterator itp;
ProfilesL::Iterator itpend=ScMW->InputProfiles.end();
for (itp = ScMW->InputProfiles.begin(); itp != itpend; ++itp)
ProfilesL::Iterator itpend=ScCore->InputProfiles.end();
for (itp = ScCore->InputProfiles.begin(); itp != itpend; ++itp)
{
SolidPr->insertItem(itp.key());
if (itp.key() == tp)
1395,7 → 1395,7
if (cms)
IntendS->setCurrentItem(Opts.Intent);
QString tp1 = Opts.ImageProf;
if (!ScMW->InputProfiles.contains(tp1))
if (!ScCore->InputProfiles.contains(tp1))
{
if (view != 0)
tp1 = view->Doc->CMSSettings.DefaultSolidColorProfile;
1404,8 → 1404,8
}
ImageP->clear();
ProfilesL::Iterator itp2;
ProfilesL::Iterator itp2end=ScMW->InputProfiles.end();
for (itp2 = ScMW->InputProfiles.begin(); itp2 != itp2end; ++itp2)
ProfilesL::Iterator itp2end=ScCore->InputProfiles.end();
for (itp2 = ScCore->InputProfiles.begin(); itp2 != itp2end; ++itp2)
{
ImageP->insertItem(itp2.key());
if (itp2.key() == tp1)
/branches/Version13x/Scribus/scribus/reformdoc.cpp
23,6 → 23,7
#include "units.h"
#include "mspinbox.h"
#include "scribus.h"
#include "scribuscore.h"
#include "tabpdfoptions.h"
#include "fontprefs.h"
#include "units.h"
392,7 → 393,7
addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
 
tabPDF = new TabPDFOptions( prefsWidgets, doc->PDF_Options, PrefsManager::instance()->appPrefs.AvailFonts,
ScMW->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
ScCore->PDFXProfiles, doc->UsedFonts, doc->PDF_Options.PresentVals,
einheit, doc->pageHeight, doc->pageWidth, 0 );
addItem( tr("PDF Export"), loadIcon("acroread.png"), tabPDF);
 
414,7 → 415,7
int cmsTab = 0;
if (CMSavail)
{
tabColorManagement = new CMSPrefs(prefsWidgets, &doc->CMSSettings, &ScMW->InputProfiles, &ScMW->InputProfilesCMYK, &ScMW->PrinterProfiles, &ScMW->MonitorProfiles);
tabColorManagement = new CMSPrefs(prefsWidgets, &doc->CMSSettings, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
cmsTab = addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
}
 
983,7 → 984,7
currDoc->CMSSettings.CMSinUse = oldCM;
currDoc->CloseCMSProfiles();
currDoc->CMSSettings.CMSinUse = newCM;
if ( currDoc->OpenCMSProfiles(ScMW->InputProfiles, ScMW->MonitorProfiles, ScMW->PrinterProfiles) )
if ( currDoc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->MonitorProfiles, ScCore->PrinterProfiles) )
{
stdProofG = currDoc->stdProof;
stdTransG = currDoc->stdTrans;
1014,7 → 1015,7
currDoc->PDF_Options.PrintProf = currDoc->CMSSettings.DefaultPrinterProfile;
currDoc->PDF_Options.Intent = currDoc->CMSSettings.DefaultIntentMonitor;
ScMW->recalcColors(ScMW->mainWindowProgressBar);
currDoc->RecalcPictures(&ScMW->InputProfiles, &ScMW->InputProfilesCMYK, ScMW->mainWindowProgressBar);
currDoc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, ScMW->mainWindowProgressBar);
}
else
{
/branches/Version13x/Scribus/scribus/collect4output.cpp
8,7 → 8,7
#include "collect4output.moc"
 
#include "scribus.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "util.h"
#include "prefscontext.h"
#include "prefsfile.h"
25,11 → 25,8
#include <qmap.h>
#include <qdir.h>
 
extern ScribusQApp* ScQApp;
 
 
CollectForOutput::CollectForOutput(bool withFonts, bool compressDoc)
: QObject(ScQApp, 0)
: QObject(ScCore, 0)
{
outputDirectory = QString();
compressDoc = compressDoc;
41,7 → 38,7
bool CollectForOutput::newDirDialog()
{
QString curDir = QDir::currentDirPath();
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
{
QString wdir = ".";
QString prefsDocDir = PrefsManager::instance()->documentDir();
62,8 → 59,8
{
if (!newDirDialog())
return "";
ScMW->fileWatcher->forceScan();
ScMW->fileWatcher->stop();
ScCore->fileWatcher->forceScan();
ScCore->fileWatcher->stop();
if(outputDirectory.right(1) != "/")
outputDirectory += "/";
dirs->set("collect", outputDirectory.left(outputDirectory.findRev("/",-2)));
92,7 → 89,7
ScMW->updateRecent(newName);
ScMW->mainWindowStatusLabel->setText("");
ScMW->mainWindowProgressBar->reset();
ScMW->fileWatcher->start();
ScCore->fileWatcher->start();
collectedFiles.clear();
return newName;
}
182,8 → 179,8
ite->Pfile = collectFile(oldFile, itf.fileName());
if (ScMW->fileWatcherActive())
{
ScMW->fileWatcher->removeFile(oldFile);
ScMW->fileWatcher->addFile(ite->Pfile);
ScCore->fileWatcher->removeFile(oldFile);
ScCore->fileWatcher->addFile(ite->Pfile);
}
}
}
201,8 → 198,8
ite->Pfile = collectFile(oldFile, itf.fileName());
if (ScMW->fileWatcherActive())
{
ScMW->fileWatcher->removeFile(oldFile);
ScMW->fileWatcher->addFile(ite->Pfile);
ScCore->fileWatcher->removeFile(oldFile);
ScCore->fileWatcher->addFile(ite->Pfile);
}
}
}
/branches/Version13x/Scribus/scribus/pdflib.cpp
47,7 → 47,7
#include "pageitem.h"
#include "bookmwin.h"
#include "scribus.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "scribusdoc.h"
#include "multiprogressdialog.h"
#include "bookpalette.h"
92,7 → 92,7
spotCount(0),
progressDialog(0),
abortExport(false),
usingGUI(ScQApp->usingGUI())
usingGUI(ScCore->usingGUI())
{
Catalog.Outlines = 2;
Catalog.PageTree = 3;
166,7 → 166,7
{
if (pageNsMpa.contains(ap))
{
ScQApp->processEvents();
qApp->processEvents();
PDF_TemplatePage(doc.MasterPages.at(ap));
++pc_exportmasterpages;
}
182,13 → 182,13
{
if (doc.PDF_Options.Thumbnails)
pm = thumbs[pageNs[a]];
ScQApp->processEvents();
qApp->processEvents();
if (abortExport) break;
PDF_Begin_Page(doc.Pages->at(pageNs[a]-1), pm);
ScQApp->processEvents();
qApp->processEvents();
if (abortExport) break;
PDF_ProcessPage(doc.Pages->at(pageNs[a]-1), pageNs[a]-1, doc.PDF_Options.doClip);
ScQApp->processEvents();
qApp->processEvents();
if (abortExport) break;
PDF_End_Page();
pc_exportpages++;
202,7 → 202,7
if (!abortExport)
{
if (doc.PDF_Options.Version == PDFOptions::PDFVersion_X3)
PDF_End_Doc(ScMW->PrinterProfiles[doc.PDF_Options.PrintProf], nam, Components);
PDF_End_Doc(ScCore->PrinterProfiles[doc.PDF_Options.PrintProf], nam, Components);
else
PDF_End_Doc();
}
1011,7 → 1011,7
ObjCounter++;
QString dataP;
struct ICCD dataD;
loadText(ScMW->InputProfiles[Options.SolidProf], &dataP);
loadText(ScCore->InputProfiles[Options.SolidProf], &dataP);
PutDoc("<<\n");
if ((Options.Compress) && (CompAvail))
{
2024,7 → 2024,7
if (usingGUI)
{
progressDialog->setProgress("ECPI", ++pc_exportpagesitems);
ScQApp->processEvents();
qApp->processEvents();
}
ite = PItems.at(a);
if (ite->LayerNr != ll.LNr)
2036,7 → 2036,7
if (usingGUI)
{
progressDialog->setProgress("ECPI", ++pc_exportpagesitems);
ScQApp->processEvents();
qApp->processEvents();
}
ite = PItems.at(a);
if (ite->LayerNr != ll.LNr)
4743,12 → 4743,12
{
if (img.imgInfo.colorspace == 1)
{
loadRawBytes((Embedded ? ScMW->InputProfilesCMYK[Options.ImageProf] : ScMW->InputProfilesCMYK[Profil]), dataP);
loadRawBytes((Embedded ? ScCore->InputProfilesCMYK[Options.ImageProf] : ScCore->InputProfilesCMYK[Profil]), dataP);
components = 4;
}
else
{
loadRawBytes((Embedded ? ScMW->InputProfiles[Options.ImageProf] : ScMW->InputProfiles[Profil]), dataP);
loadRawBytes((Embedded ? ScCore->InputProfiles[Options.ImageProf] : ScCore->InputProfiles[Profil]), dataP);
components = 3;
}
}
4757,12 → 4757,12
{
if (img.imgInfo.colorspace == 1)
{
loadRawBytes((Embedded ? ScMW->InputProfilesCMYK[Options.ImageProf] : ScMW->InputProfilesCMYK[Profil]), dataP);
loadRawBytes((Embedded ? ScCore->InputProfilesCMYK[Options.ImageProf] : ScCore->InputProfilesCMYK[Profil]), dataP);
components = 4;
}
else
{
loadRawBytes((Embedded ? ScMW->InputProfiles[Options.ImageProf] : ScMW->InputProfiles[Profil]), dataP);
loadRawBytes((Embedded ? ScCore->InputProfiles[Options.ImageProf] : ScCore->InputProfiles[Profil]), dataP);
components = 3;
}
}
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
22,7 → 22,7
***************************************************************************/
#include "scribusdoc.moc"
#include "scribus.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "scribusdoc.h"
#include "scribusview.h"
#include "scribuswin.h"
62,9 → 62,6
 
#include "text/nlsconfig.h"
 
 
extern ScribusQApp* ScQApp;
 
#ifdef HAVE_CMS
#include "cmserrorhandling.h"
extern cmsHPROFILE CMSoutputProf;
277,7 → 274,7
// Fixme: Check PDF version input
PDF_Options.Version = (PDFOptions::PDFVersion)prefsData.PDF_Options.Version;
 
if (AutoSave && ScQApp->usingGUI())
if (AutoSave && ScCore->usingGUI())
autoSaveTimer->start(AutoSaveTime);
//Do this after all the collections have been created and cleared!
m_masterPageMode=true; // quick hack to force the change of pointers in setMasterPageMode();
368,7 → 365,7
if ((CMSavail) && (CMSSettings.CMSinUse))
{
#ifdef HAVE_CMS
if (OpenCMSProfiles(ScMW->InputProfiles, ScMW->MonitorProfiles, ScMW->PrinterProfiles))
if (OpenCMSProfiles(ScCore->InputProfiles, ScCore->MonitorProfiles, ScCore->PrinterProfiles))
{
stdProofG = stdProof;
stdTransG = stdTrans;
473,7 → 470,7
CloseCMSProfiles();
CMSSettings.CMSinUse = CMSuse = false;
QString message = tr("An error occurred while opening icc profiles, color management is not enabled." );
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
QMessageBox::warning(ScMW, CommonStrings::trWarning, message, QMessageBox::Ok, 0, 0);
else
qWarning( message.local8Bit().data() );
744,7 → 741,7
 
if (layersUndo)
{
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
{
ScMW->changeLayer(ss->getInt("ACTIVE"));
ScMW->layerPalette->rebuildList();
1153,7 → 1150,7
if (UndoManager::undoEnabled())
undoManager->beginTransaction("Layer", Um::IDocument, Um::DeleteLayer, "", Um::IDelete);
 
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
removeLayer(layerNumber, deleteItems);
/*
//Layer found, do we want to delete its items too?
2044,7 → 2041,7
QFileInfo fi(fileName);
QDir::setCurrent(fi.dirPath(true));
QProgressBar* mainWindowProgressBar=NULL;
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
{
mainWindowProgressBar=ScMW->mainWindowProgressBar;
mainWindowProgressBar->reset();
2421,7 → 2418,7
if (frameType==PageItem::Rectangle || itemType==PageItem::TextFrame || itemType==PageItem::ImageFrame)
{
newItem->SetRectFrame();
//TODO one day hopefully, if(ScQApp->usingGUI())
//TODO one day hopefully, if(ScCore->usingGUI())
newItem->setRedrawBounding();
//ScMW->view->setRedrawBounding(newItem);
newItem->ContourLine = newItem->PoLine.copy();
2430,7 → 2427,7
if (frameType==PageItem::Ellipse)
{
newItem->SetOvalFrame();
//TODO one day hopefully, if(ScQApp->usingGUI())
//TODO one day hopefully, if(ScCore->usingGUI())
newItem->setRedrawBounding();
//ScMW->view->setRedrawBounding(newItem);
newItem->ContourLine = newItem->PoLine.copy();
2494,13 → 2491,13
{
if (!reload)
{
if ((ScMW->fileWatcher->files().contains(pageItem->Pfile) != 0) && (pageItem->PicAvail))
ScMW->fileWatcher->removeFile(pageItem->Pfile);
if ((ScCore->fileWatcher->files().contains(pageItem->Pfile) != 0) && (pageItem->PicAvail))
ScCore->fileWatcher->removeFile(pageItem->Pfile);
}
if(!pageItem->loadImage(fn, reload))
return false;
if (!reload)
ScMW->fileWatcher->addFile(pageItem->Pfile);
ScCore->fileWatcher->addFile(pageItem->Pfile);
if (!isLoading())
{
//TODO: Make this a signal again one day
3472,7 → 3469,7
if ( docItemCount!= 0)
{
int counter;
bool usingGUI=ScQApp->usingGUI();
bool usingGUI=ScCore->usingGUI();
if (usingGUI)
{
if (dia != NULL)
4978,7 → 4975,7
|| (newMinX != minCanvasCoordinate.x()) || (newMinY != minCanvasCoordinate.y()))
{
//CB TODO Make a list of views we belong to and make this the doc's active view via an internal*
if (ScQApp->usingGUI() && !ScMW->view->operItemMoving)
if (ScCore->usingGUI() && !ScMW->view->operItemMoving)
{
//Save the old values for the emit, but update now to ensure we are all ready
double oldMinX=minCanvasCoordinate.x();
4992,7 → 4989,7
 
void ScribusDoc::connectDocSignals()
{
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
{
connect(this, SIGNAL(setApplicationMode(int)), ScMW, SLOT(setAppMode(int)));
connect(this, SIGNAL(docChanged()), ScMW, SLOT(slotDocCh()));
5459,11 → 5456,11
currItem = itemSelection->itemAt(i);
if (currItem->asImageFrame())
{
if ((ScMW->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail))
ScMW->fileWatcher->removeFile(currItem->Pfile);
if ((ScCore->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail))
ScCore->fileWatcher->removeFile(currItem->Pfile);
}
else
if (currItem->asTextFrame() && ScQApp->usingGUI())
if (currItem->asTextFrame() && ScCore->usingGUI())
{
if (currItem->itemText.length() != 0 && (currItem->NextBox == 0 || currItem->BackBox == 0))
{
5524,8 → 5521,8
for (uint de = 0; de < selectedItemCount; ++de)
{
currItem = delItems.last();
if ((currItem->asImageFrame()) && ((ScMW->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail)))
ScMW->fileWatcher->removeFile(currItem->Pfile);
if ((currItem->asImageFrame()) && ((ScCore->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->PicAvail)))
ScCore->fileWatcher->removeFile(currItem->Pfile);
if (currItem->asTextFrame())
{
#ifndef NLS_PROTO
/branches/Version13x/Scribus/scribus/main_win32.cpp
82,7 → 82,7
{
#endif
app.parseCommandLine();
if (app.usingGUI())
if (app.useGUI)
{
appRetVal = app.init();
if (appRetVal != EXIT_FAILURE)
/branches/Version13x/Scribus/scribus/prefsmanager.cpp
28,6 → 28,8
 
#include "prefsmanager.h"
#include "prefsmanager.moc"
 
#include "actionmanager.h"
#include "colorsetmanager.h"
#include "commonstrings.h"
#include "filewatcher.h"
42,13 → 44,12
#include "scpaths.h"
#include "scribus.h"
#include "scribusstructs.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "gsutil.h"
#include "util.h"
#include "werktoolb.h"
 
 
extern ScribusQApp* ScQApp;
extern bool emergencyActivated;
 
PrefsManager* PrefsManager::_instance = 0;
424,8 → 425,21
//Attribute setup
appPrefs.defaultItemAttributes.clear();
appPrefs.defaultToCSetups.clear();
initDefaultActionKeys();
}
 
void PrefsManager::initDefaultActionKeys()
{
ActionManager::createDefaultShortcuts();
const QMap<QString, QKeySequence > *map=ActionManager::defaultShortcuts();
for( QMap<QString, QKeySequence >::ConstIterator it = map->begin(); it!=map->end(); ++it )
{
appPrefs.KeyActions[it.key()].actionName = it.key();
appPrefs.KeyActions[it.key()].keySequence = it.data();
}
}
 
void PrefsManager::initDefaultGUIFont(const QFont& guiFont)
{
appPrefs.AppFontSize = guiFont.pointSize();
594,9 → 608,9
if( (existsPrefs12[0] && !existsPrefs130[0]) || (existsPrefs12[2] && !existsPrefs130[2]) )
{
retVal=true; // converting from 1.2 prefs
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
{
ScMW->showSplash(false);
ScCore->showSplash(false);
if ( (ScMessageBox::question( ScMW, tr("Migrate Old Scribus Settings?"),
tr("Scribus has detected existing Scribus 1.2 preferences files.\n"
"Do you want to migrate them to the new Scribus version?"),
608,7 → 622,7
copyFile(prefs12[i], prefs134[i]);
}
}
ScMW->showSplash(true);
ScCore->showSplash(true);
}
}
else
656,8 → 670,11
return;
}
}
}
 
ScMW->setDefaultPrinter(appPrefs.PrinterName, appPrefs.PrinterFile, appPrefs.PrinterCommand);
void PrefsManager::setupMainWindow(ScribusMainWindow* mw)
{
mw->setDefaultPrinter(appPrefs.PrinterName, appPrefs.PrinterFile, appPrefs.PrinterCommand);
 
uint max = QMIN(appPrefs.RecentDCount, appPrefs.RecentDocs.count());
for (uint m = 0; m < max; ++m)
665,15 → 682,15
QFileInfo fd(appPrefs.RecentDocs[m]);
if (fd.exists())
{
ScMW->RecentDocs.append(appPrefs.RecentDocs[m]);
ScMW->fileWatcher->addFile(appPrefs.RecentDocs[m]);
mw->RecentDocs.append(appPrefs.RecentDocs[m]);
ScCore->fileWatcher->addFile(appPrefs.RecentDocs[m]);
}
}
ScMW->rebuildRecentFileMenu();
ScMW->move(appPrefs.mainWinSettings.xPosition, appPrefs.mainWinSettings.yPosition);
ScMW->resize(appPrefs.mainWinSettings.width, appPrefs.mainWinSettings.height);
mw->rebuildRecentFileMenu();
mw->move(appPrefs.mainWinSettings.xPosition, appPrefs.mainWinSettings.yPosition);
mw->resize(appPrefs.mainWinSettings.width, appPrefs.mainWinSettings.height);
if (appPrefs.mainWinSettings.maximized)
ScMW->setWindowState(ScMW->windowState() & ~Qt::WindowMinimized | Qt::WindowMaximized);
mw->setWindowState(ScMW->windowState() & ~Qt::WindowMinimized | Qt::WindowMaximized);
ReadPrefsXML();
if (appPrefs.checkerProfiles.count() == 0)
{
1645,7 → 1662,7
QString newFont = "";
if (!appPrefs.AvailFonts.find(tmpf))
{
ScMW->showSplash(false);
ScCore->showSplash(false);
MissingFont *dia = new MissingFont(0, tmpf, 0);
dia->exec();
newFont = dia->getReplacementFont();
1872,9 → 1889,9
// triggered by a signal sent from here and displayed by ScribusMainWindow.
void PrefsManager::alertLoadPrefsFailed() const
{
bool splashShowing = ScMW->splashShowing();
bool splashShowing = ScCore->splashShowing();
if (splashShowing)
ScMW->showSplash(false);
ScCore->showSplash(false);
QMessageBox::critical(ScMW, tr("Error Loading Preferences"),
"<qt>" +
tr("Scribus was not able to load its preferences:<br>"
1884,7 → 1901,7
+ "</qt>",
QMessageBox::Ok|QMessageBox::Default|QMessageBox::Escape,
QMessageBox::NoButton);
ScMW->showSplash(splashShowing);
ScCore->showSplash(splashShowing);
}
 
const int PrefsManager::gsResolution()
/branches/Version13x/Scribus/scribus/prefsmanager.h
26,6 → 26,7
#include "prefsstructs.h"
 
class PrefsFile;
class ScribusMainWindow;
 
 
/**
62,6 → 63,7
void initDefaults();
void initDefaultGUIFont(const QFont&);
void initDefaultCheckerPrefs(CheckerPrefsList* cp);
void initDefaultActionKeys();
void initArrowStyles();
/*!
\author Craig Bradney
113,7 → 115,8
\param ho a file name to write
\retval bool true on success, false on write error */
bool ReadPref(QString ho);
 
//! \brief Set up the main window with prefs values, recent files list, main window size etc
void setupMainWindow(ScribusMainWindow* mw);
void setGhostscriptExecutable(const QString&);
void setImageEditorExecutable(const QString&);
const QString ghostscriptExecutable();
/branches/Version13x/Scribus/scribus/sccolor.cpp
37,7 → 37,7
extern cmsHTRANSFORM stdTransRGBG;
extern cmsHTRANSFORM stdProofGCG;
extern cmsHTRANSFORM stdProofCMYKGCG;
extern bool SoftProofing;
extern bool SoftProofing;
extern bool CMSuse;
#endif
extern bool CMSavail;
/branches/Version13x/Scribus/scribus/scfonts.cpp
38,6 → 38,7
#include "prefscontext.h"
#include "prefstable.h"
#include "scribus.h"
#include "scribuscore.h"
#ifdef Q_WS_X11
#include <X11/X.h>
#include <X11/Xlib.h>
666,7 → 667,7
if (checkedFonts.count() == 0)
{
firstRun = true;
ScMW->setSplashStatus( QObject::tr("Creating Font Cache") );
ScCore->setSplashStatus( QObject::tr("Creating Font Cache") );
}
bool error = FT_New_Face( library, filename, 0, &face );
if (error)
692,7 → 693,7
if (!checkedFonts.contains(filename))
{
if (!firstRun)
ScMW->setSplashStatus( QObject::tr("New Font found, checking...") );
ScCore->setSplashStatus( QObject::tr("New Font found, checking...") );
FT_UInt gindex = 0;
FT_ULong charcode = FT_Get_First_Char( face, &gindex );
while ( gindex != 0 )
729,7 → 730,7
}
if (checkedFonts[filename].lastMod != fic.lastModified())
{
ScMW->setSplashStatus( QObject::tr("Modified Font found, checking...") );
ScCore->setSplashStatus( QObject::tr("Modified Font found, checking...") );
FT_UInt gindex = 0;
FT_ULong charcode = FT_Get_First_Char( face, &gindex );
while ( gindex != 0 )
1063,7 → 1064,7
QFile f(pf + "/checkfonts.xml");
if(!f.open(IO_ReadOnly))
return;
ScMW->setSplashStatus( QObject::tr("Reading Font Cache") );
ScCore->setSplashStatus( QObject::tr("Reading Font Cache") );
QTextStream ts(&f);
ts.setEncoding(QTextStream::UnicodeUTF8);
QString errorMsg;
1110,7 → 1111,7
elem.appendChild(fosu);
}
}
ScMW->setSplashStatus( QObject::tr("Writing updated Font Cache") );
ScCore->setSplashStatus( QObject::tr("Writing updated Font Cache") );
QFile f(pf + "/checkfonts.xml");
if(f.open(IO_WriteOnly))
{
1127,7 → 1128,7
showFontInformation=showFontInfo;
FontPath.clear();
ReadCacheList(pf);
ScMW->setSplashStatus( QObject::tr("Searching for Fonts") );
ScCore->setSplashStatus( QObject::tr("Searching for Fonts") );
AddUserPath(pf);
// Search the system paths
QStringList ftDirs = ScPaths::getSystemFontDirs();
/branches/Version13x/Scribus/scribus/story.cpp
3022,9 → 3022,9
{
blockUpdate = true;
QString retval;
if (ScMW->pluginManager->DLLexists("fontpreview"))
if (PluginManager::instance().DLLexists("fontpreview"))
{
bool result = ScMW->pluginManager->callSpecialActionPlugin("fontpreview", Editor->CurrFont, retval);
bool result = PluginManager::instance().callSpecialActionPlugin("fontpreview", Editor->CurrFont, retval);
if (result && !retval.isEmpty())
{
sDebug("Got retval");
/branches/Version13x/Scribus/scribus/scmessagebox.cpp
21,7 → 21,7
 
#include "scmessagebox.h"
#include "scmessagebox.moc"
#include "scribusapp.h"
#include "scribuscore.h"
 
extern ScribusQApp* ScQApp;
 
29,7 → 29,7
int ScMessageBox::swapButtonValues(int &b0, int &b1, int &b2)
{
int buttonsUsed=1;
if (ScQApp->reverseDialogButtons())
if (ScCore->reverseDialogButtons())
{
//Last button not used, and 2nd one used, swap 1st and 2nd.
if (b2==0 && b1!=0) //Could be: if ((b2==0 || b2==QMessageBox::NoButton) && b1!=0) but NoButton is 0x0000, for now.
43,7 → 43,7
if (b2!=0 && b1!=0 && b0!=0)
{
int t;
if (ScQApp->isMacGUI())
if (ScCore->isMacGUI())
{
// Mac order is "No, Cancel, Yes"
t = b2;
67,7 → 67,7
int ScMessageBox::swapButtonValues(QString &b0Text, QString &b1Text, QString &b2Text, int &defaultButton, int &escapeButton)
{
int buttonsUsed=1;
if (ScQApp->reverseDialogButtons())
if (ScCore->reverseDialogButtons())
{
//Last button not used, and 2nd one used, swap 1st and 2nd.
if (b2Text.isEmpty() && !b1Text.isEmpty())
91,7 → 91,7
if (!b2Text.isEmpty() && !b1Text.isEmpty() && !b0Text.isEmpty())
{
QString tText;
if (ScQApp->isMacGUI())
if (ScCore->isMacGUI())
{
// Mac order is "No, Cancel, Yes"
tText = b2Text;
147,7 → 147,7
int ScMessageBox::swapReturnValues(const int b0Val, const int b1Val, const int b2Val, const int returnVal, const int buttonsUsed)
{
int retVal=returnVal;
if (ScQApp->reverseDialogButtons())
if (ScCore->reverseDialogButtons())
{
//Last button not used, and 2nd one used, swap 1st and 2nd.
if (buttonsUsed==2)
162,7 → 162,7
//All three buttons used, swap the outside ones only
if (buttonsUsed==3)
{
if (ScQApp->isMacGUI()) {
if (ScCore->isMacGUI()) {
if (returnVal == b0Val)
retVal = b1Val;
else if (returnVal == b1Val)
/branches/Version13x/Scribus/scribus/main_nix.cpp
33,6 → 33,7
#define BASE_QM "scribus"
 
#include "scribusapp.h"
#include "scribuscore.h"
#include "scribus.h"
 
#include "scconfig.h"
41,6 → 42,7
void initCrashHandler();
static void defaultCrashHandler(int sig);
 
ScribusCore SCRIBUS_API *ScCore;
ScribusMainWindow SCRIBUS_API *ScMW;
ScribusQApp SCRIBUS_API *ScQApp;
bool emergencyActivated;
66,7 → 68,7
ScribusQApp app(argc, argv);
initCrashHandler();
app.parseCommandLine();
if (app.usingGUI())
if (app.useGUI)
{
int appRetVal=app.init();
if (appRetVal==EXIT_FAILURE)
121,7 → 123,7
std::cout << sigMsg << std::endl;
if (ScribusQApp::useGUI)
{
ScMW->closeSplash();
ScCore->closeSplash();
QMessageBox::critical(ScMW, sigHdr, sigMsg, QObject::tr("&OK"));
ScMW->emergencySave();
ScMW->close();
/branches/Version13x/Scribus/scribus/pageitem.cpp
40,6 → 40,7
#include "page.h"
#include "scpainter.h"
#include "scribus.h"
#include "scribuscore.h"
#include "scribusapp.h"
#include "scribusstructs.h"
#include "scribusdoc.h"
3667,7 → 3668,7
 
bool PageItem::connectToGUI()
{
if (!ScQApp->usingGUI())
if (!ScCore->usingGUI())
return false;
if (!m_Doc->m_Selection->primarySelectionIs(this))
return false;
3723,7 → 3724,7
 
bool PageItem::disconnectFromGUI()
{
if (!ScQApp->usingGUI())
if (!ScCore->usingGUI())
return false;
disconnect(this, 0, 0, 0);
return true;
/branches/Version13x/Scribus/scribus/scribusview.cpp
9746,7 → 9746,7
 
void ScribusView::ToPolyFrame()
{
PageItem *currItem = new PageItem_Polygon(*Doc->m_Selection->itemAt(0));
PageItem *currItem = Doc->m_Selection->itemAt(0);
Deselect(true);
PageItem* newItem=Doc->convertItemTo(currItem, PageItem::Polygon);
RefreshItem(newItem);
/branches/Version13x/Scribus/scribus/actionmanager.cpp
12,7 → 12,7
 
/***************************************************************************
* *
* ScMW program is free software; you can redistribute it and/or modify *
* mainWindow program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
29,11 → 29,13
#include "undomanager.h"
#include "util.h"
 
QMap<QString, QKeySequence> ActionManager::defKeys;
 
ActionManager::ActionManager ( QObject * parent, const char * name ) : QObject ( parent, name )
{
ScMW=(ScribusMainWindow *)parent;
scrActions=&(ScMW->scrActions);
scrActionGroups=&(ScMW->scrActionGroups);
mainWindow=(ScribusMainWindow *)parent;
scrActions=&(mainWindow->scrActions);
scrActionGroups=&(mainWindow->scrActionGroups);
modeActionNames=new QStringList();
nonEditActionNames=new QStringList();
unicodeCharActionNames=new QStringList();
61,7 → 63,7
initWindowsMenuActions();
initScriptMenuActions();
initHelpMenuActions();
initUnicodeActions(scrActions, ScMW, unicodeCharActionNames);
initUnicodeActions(scrActions, mainWindow, unicodeCharActionNames);
enableUnicodeActions(scrActions, false);
initSpecialActions();
}
68,113 → 70,152
 
void ActionManager::initFileMenuActions()
{
QString name;
//File Menu
scrActions->insert("fileNew", new ScrAction(QIconSet(loadIcon("16/document-new.png"), loadIcon("22/document-new.png")), "", CTRL+Key_N, ScMW, "fileNew"));
scrActions->insert("fileOpen", new ScrAction(QIconSet(loadIcon("16/document-open.png"), loadIcon("22/document-open.png")), "", CTRL+Key_O, ScMW, "fileOpen"));
scrActions->insert("fileClose", new ScrAction(QIconSet(loadIcon("16/close.png"), loadIcon("22/close.png")), "", CTRL+Key_W, ScMW, "fileClose"));
scrActions->insert("fileSave", new ScrAction(QIconSet(loadIcon("16/document-save.png"), loadIcon("22/document-save.png")), "", CTRL+Key_S, ScMW, "fileSave"));
scrActions->insert("fileSaveAs", new ScrAction(QIconSet(loadIcon("16/document-save-as.png"), loadIcon("22/document-save-as.png")), "", CTRL+SHIFT+Key_S, ScMW, "fileSaveAs"));
scrActions->insert("fileRevert", new ScrAction(loadIcon("revert.png"), "", QKeySequence(), ScMW, "fileRevert"));
scrActions->insert("fileCollect", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileCollect"));
name="fileNew";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-new.png"), loadIcon("22/document-new.png")), "", defKeys[name], mainWindow, name));
name="fileOpen";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-open.png"), loadIcon("22/document-open.png")), "", defKeys[name], mainWindow, name));
name="fileClose";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/close.png"), loadIcon("22/close.png")), "", defKeys[name], mainWindow, name));
name="fileSave";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-save.png"), loadIcon("22/document-save.png")), "", defKeys[name], mainWindow, name));
name="fileSaveAs";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-save-as.png"), loadIcon("22/document-save-as.png")), "", defKeys[name], mainWindow, name));
name="fileRevert";
scrActions->insert(name, new ScrAction(loadIcon("revert.png"), "", defKeys[name], mainWindow, name));
name="fileCollect";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
//File Import Menu
scrActions->insert("fileImportText", new ScrAction(QIconSet(noIcon),"", CTRL+Key_D, ScMW, "fileImportText"));
scrActions->insert("fileImportAppendText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileImportAppendText"));
scrActions->insert("fileImportImage", new ScrAction(QIconSet(noIcon),"", CTRL+Key_D, ScMW, "fileImportImage"));
name="fileImportText";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="fileImportAppendText";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="fileImportImage";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
 
//File Export Menu
scrActions->insert("fileExportText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileExportText"));
scrActions->insert("fileExportAsEPS", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "fileExportAsEPS"));
scrActions->insert("fileExportAsPDF", new ScrAction(loadIcon("acrobat.png"), "", QKeySequence(), ScMW, "fileExportAsPDF"));
name="fileExportText";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="fileExportAsEPS";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="fileExportAsPDF";
scrActions->insert(name, new ScrAction(loadIcon("acrobat.png"), "", defKeys[name], mainWindow, name));
//Rest of File Menu
scrActions->insert("fileDocSetup", new ScrAction(QIconSet(loadIcon("16/document-properties.png"), loadIcon("22/document-properties.png")), "", 0, ScMW, "fileDocSetup"));
scrActions->insert("filePrint", new ScrAction(QIconSet(loadIcon("16/document-print.png"), loadIcon("22/document-print.png")), "", CTRL+Key_P, ScMW, "filePrint"));
scrActions->insert("PrintPreview", new ScrAction(QIconSet(noIcon), "", CTRL+ALT+Key_P, ScMW, "PrintPreview"));
scrActions->insert("fileQuit", new ScrAction(QPixmap(loadIcon("exit.png")), "", CTRL+Key_Q, ScMW, "fileQuit"));
name="fileDocSetup";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-properties.png"), loadIcon("22/document-properties.png")), "", defKeys[name], mainWindow, name));
name="filePrint";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-print.png"), loadIcon("22/document-print.png")), "", defKeys[name], mainWindow, name));
name="PrintPreview";
scrActions->insert(name, new ScrAction(QIconSet(noIcon), "", defKeys[name], mainWindow, name));
name="fileQuit";
scrActions->insert(name, new ScrAction(QPixmap(loadIcon("exit.png")), "", defKeys[name], mainWindow, name));
 
//Connect our signals and slots
//File Menu
connect( (*scrActions)["fileNew"], SIGNAL(activated()), ScMW, SLOT(slotFileNew()) );
connect( (*scrActions)["fileOpen"], SIGNAL(activated()), ScMW, SLOT(slotDocOpen()) );
connect( (*scrActions)["fileClose"], SIGNAL(activated()), ScMW, SLOT(slotFileClose()) );
connect( (*scrActions)["filePrint"], SIGNAL(activated()), ScMW, SLOT(slotFilePrint()) );
connect( (*scrActions)["PrintPreview"], SIGNAL(activated()), ScMW, SLOT(printPreview()) );
connect( (*scrActions)["fileSave"], SIGNAL(activated()), ScMW, SLOT(slotFileSave()) );
connect( (*scrActions)["fileSaveAs"], SIGNAL(activated()), ScMW, SLOT(slotFileSaveAs()) );
connect( (*scrActions)["fileDocSetup"], SIGNAL(activated()), ScMW, SLOT(slotDocSetup()) );
connect( (*scrActions)["fileRevert"], SIGNAL(activated()), ScMW, SLOT(slotFileRevert()) );
connect( (*scrActions)["fileCollect"], SIGNAL(activated()), ScMW, SLOT(Collect()) );
connect( (*scrActions)["fileQuit"], SIGNAL(activated()), ScMW, SLOT(slotFileQuit()) );
connect( (*scrActions)["fileNew"], SIGNAL(activated()), mainWindow, SLOT(slotFileNew()) );
connect( (*scrActions)["fileOpen"], SIGNAL(activated()), mainWindow, SLOT(slotDocOpen()) );
connect( (*scrActions)["fileClose"], SIGNAL(activated()), mainWindow, SLOT(slotFileClose()) );
connect( (*scrActions)["filePrint"], SIGNAL(activated()), mainWindow, SLOT(slotFilePrint()) );
connect( (*scrActions)["PrintPreview"], SIGNAL(activated()), mainWindow, SLOT(printPreview()) );
connect( (*scrActions)["fileSave"], SIGNAL(activated()), mainWindow, SLOT(slotFileSave()) );
connect( (*scrActions)["fileSaveAs"], SIGNAL(activated()), mainWindow, SLOT(slotFileSaveAs()) );
connect( (*scrActions)["fileDocSetup"], SIGNAL(activated()), mainWindow, SLOT(slotDocSetup()) );
connect( (*scrActions)["fileRevert"], SIGNAL(activated()), mainWindow, SLOT(slotFileRevert()) );
connect( (*scrActions)["fileCollect"], SIGNAL(activated()), mainWindow, SLOT(Collect()) );
connect( (*scrActions)["fileQuit"], SIGNAL(activated()), mainWindow, SLOT(slotFileQuit()) );
//File Import Menu
connect( (*scrActions)["fileImportText"], SIGNAL(activated()), ScMW, SLOT(slotGetContent()) );
connect( (*scrActions)["fileImportAppendText"], SIGNAL(activated()), ScMW, SLOT(slotFileAppend()) );
connect( (*scrActions)["fileImportImage"], SIGNAL(activated()), ScMW, SLOT(slotGetContent()) );
connect( (*scrActions)["fileImportText"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent()) );
connect( (*scrActions)["fileImportAppendText"], SIGNAL(activated()), mainWindow, SLOT(slotFileAppend()) );
connect( (*scrActions)["fileImportImage"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent()) );
//File Export Menu
connect( (*scrActions)["fileExportText"], SIGNAL(activated()), ScMW, SLOT(SaveText()) );
connect( (*scrActions)["fileExportAsEPS"], SIGNAL(activated()), ScMW, SLOT(SaveAsEps()) );
connect( (*scrActions)["fileExportAsPDF"], SIGNAL(activated()), ScMW, SLOT(SaveAsPDF()) );
connect( (*scrActions)["fileExportText"], SIGNAL(activated()), mainWindow, SLOT(SaveText()) );
connect( (*scrActions)["fileExportAsEPS"], SIGNAL(activated()), mainWindow, SLOT(SaveAsEps()) );
connect( (*scrActions)["fileExportAsPDF"], SIGNAL(activated()), mainWindow, SLOT(SaveAsPDF()) );
//The rest are plugins
}
 
void ActionManager::initEditMenuActions()
{
QString name;
//Edit Menu
scrActions->insert("editUndoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-undo.png"), loadIcon("22/edit-undo.png")), "", CTRL+Key_Z, ScMW, "editUndoAction",1));
scrActions->insert("editRedoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-redo.png"), loadIcon("22/edit-redo.png")), "", CTRL+SHIFT+Key_Z, ScMW, "editRedoAction", 1));
scrActions->insert("editActionMode", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editActionMode"));
name="editUndoAction";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-undo.png"), loadIcon("22/edit-undo.png")), "", defKeys[name], mainWindow, name,1));
name="editRedoAction";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-redo.png"), loadIcon("22/edit-redo.png")), "", defKeys[name], mainWindow, name, 1));
name="editActionMode";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
(*scrActions)["editActionMode"]->setToggleAction(true);
scrActions->insert("editCut", new ScrAction(QIconSet(loadIcon("16/edit-cut.png"), loadIcon("22/edit-cut.png")), "", CTRL+Key_X, ScMW, "editCut"));
scrActions->insert("editCopy", new ScrAction(QIconSet(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png")), "", CTRL+Key_C, ScMW, "editCopy"));
scrActions->insert("editPaste", new ScrAction(QIconSet(loadIcon("16/edit-paste.png"), loadIcon("22/edit-paste.png")), "", CTRL+Key_V, ScMW, "editPaste"));
scrActions->insert("editCopyContents", new ScrAction(QIconSet(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png")), "", CTRL+SHIFT+Key_C, ScMW, "editCopyContents"));
scrActions->insert("editPasteContents", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-paste.png")), "", CTRL+SHIFT+Key_V, ScMW, "editPasteContents",0));
scrActions->insert("editPasteContentsAbs", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("editpaste.png")), "", CTRL+SHIFT+ALT+Key_V, ScMW, "editPasteContentsAbs",1));
scrActions->insert("editClearContents", new ScrAction(QIconSet(loadIcon("editdelete.png"), loadIcon("editdelete22.png")), "", QKeySequence(), ScMW, "editClearContents"));
scrActions->insert("editSelectAll", new ScrAction(QIconSet(noIcon), "", CTRL+Key_A, ScMW, "editSelectAll"));
scrActions->insert("editDeselectAll", new ScrAction(QIconSet(noIcon), "", CTRL+SHIFT+Key_A, ScMW, "editDeselectAll"));
scrActions->insert("editSearchReplace", new ScrAction(QIconSet(loadIcon("16/edit-find-replace.png"), loadIcon("22/edit-find-replace.png")), "", QKeySequence(CTRL+Key_F), ScMW, "editSearchReplace"));
name="editCut";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-cut.png"), loadIcon("22/edit-cut.png")), "", defKeys[name], mainWindow, name));
name="editCopy";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png")), "", defKeys[name], mainWindow, name));
name="editPaste";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-paste.png"), loadIcon("22/edit-paste.png")), "", defKeys[name], mainWindow, name));
name="editCopyContents";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png")), "", defKeys[name], mainWindow, name));
name="editPasteContents";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-paste.png")), "", defKeys[name], mainWindow, name,0));
name="editPasteContentsAbs";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("editpaste.png")), "", defKeys[name], mainWindow, name,1));
name="editClearContents";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("editdelete.png"), loadIcon("editdelete22.png")), "", defKeys[name], mainWindow, name));
name="editSelectAll";
scrActions->insert(name, new ScrAction(QIconSet(noIcon), "", defKeys[name], mainWindow, name));
name="editDeselectAll";
scrActions->insert(name, new ScrAction(QIconSet(noIcon), "", defKeys[name], mainWindow, name));
name="editSearchReplace";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-find-replace.png"), loadIcon("22/edit-find-replace.png")), "", defKeys[name], mainWindow, name));
name="editEditWithImageEditor";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="editColors";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="editStyles";
scrActions->insert(name, new ScrAction(QIconSet(noIcon), "", defKeys[name], mainWindow, name));
name="editParaStyles";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="editLineStyles";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="editMasterPages";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="editJavascripts";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="editPreferences";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
 
scrActions->insert("editEditWithImageEditor", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editEditWithImageEditor"));
 
scrActions->insert("editColors", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editColors"));
scrActions->insert("editStyles", new ScrAction(QIconSet(noIcon), "", QKeySequence(), ScMW, "editStyles"));
scrActions->insert("editParaStyles", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editParaStyles"));
scrActions->insert("editLineStyles", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editLineStyles"));
scrActions->insert("editMasterPages", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editMasterPages"));
scrActions->insert("editJavascripts", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editJavascripts"));
scrActions->insert("editPreferences", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "editPreferences"));
 
(*scrActions)["editStyles"]->setToggleAction(true);
 
connect( (*scrActions)["editUndoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(undo(int)) );
connect( (*scrActions)["editRedoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(redo(int)) );
connect( (*scrActions)["editActionMode"], SIGNAL(toggled(bool)), ScMW, SLOT(setUndoMode(bool)) );
connect( (*scrActions)["editCut"], SIGNAL(activated()), ScMW, SLOT(slotEditCut()) );
connect( (*scrActions)["editCopy"], SIGNAL(activated()), ScMW, SLOT(slotEditCopy()) );
connect( (*scrActions)["editPaste"], SIGNAL(activated()), ScMW, SLOT(slotEditPaste()) );
connect( (*scrActions)["editCopyContents"], SIGNAL(activated()), ScMW, SLOT(slotEditCopyContents()) );
connect( (*scrActions)["editPasteContents"], SIGNAL(activatedData(int)), ScMW, SLOT(slotEditPasteContents(int)) );
connect( (*scrActions)["editPasteContentsAbs"], SIGNAL(activatedData(int)), ScMW, SLOT(slotEditPasteContents(int)) );
connect( (*scrActions)["editSelectAll"], SIGNAL(activated()), ScMW, SLOT(SelectAll()) );
connect( (*scrActions)["editDeselectAll"], SIGNAL(activated()), ScMW, SLOT(deselectAll()) );
connect( (*scrActions)["editSearchReplace"], SIGNAL(activated()), ScMW, SLOT(SearchText()) );
connect( (*scrActions)["editEditWithImageEditor"], SIGNAL(activated()), ScMW, SLOT(callImageEditor()) );
connect( (*scrActions)["editColors"], SIGNAL(activated()), ScMW, SLOT(slotEditColors()) );
connect( (*scrActions)["editStyles"], SIGNAL(activated()), ScMW, SLOT(slotStyleManager()) );
connect( (*scrActions)["editParaStyles"], SIGNAL(activated()), ScMW, SLOT(slotEditStyles()) );
connect( (*scrActions)["editLineStyles"], SIGNAL(activated()), ScMW, SLOT(slotEditLineStyles()) );
connect( (*scrActions)["editMasterPages"], SIGNAL(activated()), ScMW, SLOT(manageMasterPages()) );
connect( (*scrActions)["editJavascripts"], SIGNAL(activated()), ScMW, SLOT(ManageJava()) );
connect( (*scrActions)["editPreferences"], SIGNAL(activated()), ScMW, SLOT(slotPrefsOrg()) );
connect( (*scrActions)["editActionMode"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoMode(bool)) );
connect( (*scrActions)["editCut"], SIGNAL(activated()), mainWindow, SLOT(slotEditCut()) );
connect( (*scrActions)["editCopy"], SIGNAL(activated()), mainWindow, SLOT(slotEditCopy()) );
connect( (*scrActions)["editPaste"], SIGNAL(activated()), mainWindow, SLOT(slotEditPaste()) );
connect( (*scrActions)["editCopyContents"], SIGNAL(activated()), mainWindow, SLOT(slotEditCopyContents()) );
connect( (*scrActions)["editPasteContents"], SIGNAL(activatedData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
connect( (*scrActions)["editPasteContentsAbs"], SIGNAL(activatedData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
connect( (*scrActions)["editSelectAll"], SIGNAL(activated()), mainWindow, SLOT(SelectAll()) );
connect( (*scrActions)["editDeselectAll"], SIGNAL(activated()), mainWindow, SLOT(deselectAll()) );
connect( (*scrActions)["editSearchReplace"], SIGNAL(activated()), mainWindow, SLOT(SearchText()) );
connect( (*scrActions)["editEditWithImageEditor"], SIGNAL(activated()), mainWindow, SLOT(callImageEditor()) );
connect( (*scrActions)["editColors"], SIGNAL(activated()), mainWindow, SLOT(slotEditColors()) );
connect( (*scrActions)["editStyles"], SIGNAL(activated()), mainWindow, SLOT(slotStyleManager()) );
connect( (*scrActions)["editParaStyles"], SIGNAL(activated()), mainWindow, SLOT(slotEditStyles()) );
connect( (*scrActions)["editLineStyles"], SIGNAL(activated()), mainWindow, SLOT(slotEditLineStyles()) );
connect( (*scrActions)["editMasterPages"], SIGNAL(activated()), mainWindow, SLOT(manageMasterPages()) );
connect( (*scrActions)["editJavascripts"], SIGNAL(activated()), mainWindow, SLOT(ManageJava()) );
connect( (*scrActions)["editPreferences"], SIGNAL(activated()), mainWindow, SLOT(slotPrefsOrg()) );
}
 
void ActionManager::initStyleMenuActions()
{
QString name;
//Text Size actions
(*scrActionGroups).insert("fontSize", new QActionGroup(ScMW, "fontSize", true));
scrActions->insert("fontSizeOther", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["fontSize"], "fontSizeOther", -1));
connect( (*scrActions)["fontSizeOther"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemFSize(int)));
(*scrActionGroups).insert("fontSize", new QActionGroup(mainWindow, "fontSize", true));
name="fontSizeOther";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["fontSize"], name, -1));
connect( (*scrActions)["fontSizeOther"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemFSize(int)));
 
int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
181,17 → 222,22
for (uint s = 0; s < f_size; ++s)
{
QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
scrActions->insert(fontSizeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["fontSize"], fontSizeName, font_sizes[s]));
scrActions->insert(fontSizeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["fontSize"], fontSizeName, font_sizes[s]));
(*scrActions)[fontSizeName]->setToggleAction(true);
connect( (*scrActions)[fontSizeName], SIGNAL(activatedData(int)), ScMW, SLOT(setItemFSize(int)));
connect( (*scrActions)[fontSizeName], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemFSize(int)));
}
 
//Alignment actions
scrActions->insert("alignLeft", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "alignLeft", 0));
scrActions->insert("alignCenter", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "alignCenter", 1));
scrActions->insert("alignRight", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "alignRight", 2));
scrActions->insert("alignBlock", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "alignBlock", 3));
scrActions->insert("alignForced", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "alignForced", 4));
name="alignLeft";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 0));
name="alignCenter";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 1));
name="alignRight";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 2));
name="alignBlock";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 3));
name="alignForced";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 4));
 
(*scrActions)["alignLeft"]->setToggleAction(true);
(*scrActions)["alignCenter"]->setToggleAction(true);
199,36 → 245,47
(*scrActions)["alignBlock"]->setToggleAction(true);
(*scrActions)["alignForced"]->setToggleAction(true);
 
connect( (*scrActions)["alignLeft"], SIGNAL(activatedData(int)), ScMW, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignCenter"], SIGNAL(activatedData(int)), ScMW, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignRight"], SIGNAL(activatedData(int)), ScMW, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignBlock"], SIGNAL(activatedData(int)), ScMW, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignForced"], SIGNAL(activatedData(int)), ScMW, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignLeft"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignCenter"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignRight"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignBlock"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
connect( (*scrActions)["alignForced"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAbStyle(int)));
 
//Shade actions
scrActionGroups->insert("shade", new QActionGroup(ScMW, "shade", true));
scrActions->insert("shadeOther", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["shade"], "shadeOther", -1));
connect( (*scrActions)["shadeOther"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemShade(int)));
scrActionGroups->insert("shade", new QActionGroup(mainWindow, "shade", true));
name="shadeOther";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["shade"], name, -1));
connect( (*scrActions)["shadeOther"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemShade(int)));
for (uint i=0; i<=100 ; i+=10)
{
QString shadeName=QString("shade%1").arg(i);
scrActions->insert(shadeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["shade"], shadeName, i));
scrActions->insert(shadeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["shade"], shadeName, i));
(*scrActions)[shadeName]->setToggleAction(true);
connect( (*scrActions)[shadeName], SIGNAL(activatedData(int)), ScMW, SLOT(setItemShade(int)));
connect( (*scrActions)[shadeName], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemShade(int)));
}
 
//Type Effects actions
scrActionGroups->insert("typeEffects", new QActionGroup(ScMW, "typeEffects", false));
scrActions->insert("typeEffectNormal", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectNormal", 0));
scrActions->insert("typeEffectUnderline", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectUnderline", 1));
scrActions->insert("typeEffectUnderlineWords", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectUnderlineWords", 8));
scrActions->insert("typeEffectStrikeThrough", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectStrikeThrough", 2));
scrActions->insert("typeEffectAllCaps", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectAllCaps", 7));
scrActions->insert("typeEffectSmallCaps", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectSmallCaps", 3));
scrActions->insert("typeEffectSuperscript", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectSuperscript", 4));
scrActions->insert("typeEffectSubscript", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectSubscript", 5));
scrActions->insert("typeEffectOutline", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectOutline", 6));
scrActions->insert("typeEffectShadow", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectShadow", 9));
scrActionGroups->insert("typeEffects", new QActionGroup(mainWindow, "typeEffects", false));
name="typeEffectNormal";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 0));
name="typeEffectUnderline";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 1));
name="typeEffectUnderlineWords";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 8));
name="typeEffectStrikeThrough";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 2));
name="typeEffectAllCaps";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 7));
name="typeEffectSmallCaps";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 3));
name="typeEffectSuperscript";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 4));
name="typeEffectSubscript";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 5));
name="typeEffectOutline";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 6));
name="typeEffectShadow";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 9));
(*scrActions)["typeEffectNormal"]->setToggleAction(true);
(*scrActions)["typeEffectUnderline"]->setToggleAction(true);
(*scrActions)["typeEffectUnderlineWords"]->setToggleAction(true);
239,65 → 296,94
(*scrActions)["typeEffectSubscript"]->setToggleAction(true);
(*scrActions)["typeEffectOutline"]->setToggleAction(true);
(*scrActions)["typeEffectShadow"]->setToggleAction(true);
connect( (*scrActions)["typeEffectNormal"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectUnderline"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectUnderlineWords"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectStrikeThrough"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectSmallCaps"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectAllCaps"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectSuperscript"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectSubscript"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectOutline"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectShadow"], SIGNAL(activatedData(int)), ScMW, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectNormal"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectUnderline"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectUnderlineWords"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectStrikeThrough"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectSmallCaps"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectAllCaps"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectSuperscript"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectSubscript"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectOutline"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
connect( (*scrActions)["typeEffectShadow"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
 
//Other Style menu items that get added in various places
scrActions->insert("styleImageEffects", new ScrAction("", CTRL+Key_E, ScMW, "styleImageEffects"));
scrActions->insert("styleTabulators", new ScrAction(ScMW, "styleTabulators"));
connect( (*scrActions)["styleImageEffects"], SIGNAL(activated()), ScMW, SLOT(ImageEffects()));
connect( (*scrActions)["styleTabulators"], SIGNAL(activated()), ScMW, SLOT(EditTabs()));
name="styleImageEffects";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="styleTabulators";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
connect( (*scrActions)["styleImageEffects"], SIGNAL(activated()), mainWindow, SLOT(ImageEffects()));
connect( (*scrActions)["styleTabulators"], SIGNAL(activated()), mainWindow, SLOT(EditTabs()));
 
}
 
void ActionManager::initItemMenuActions()
{
QString name;
//Item Menu
scrActions->insert("itemDuplicate", new ScrAction("", CTRL+ALT+SHIFT+Key_D, ScMW, "itemDuplicate"));
scrActions->insert("itemMulDuplicate", new ScrAction(ScMW, "itemMulDuplicate"));
scrActions->insert("itemDelete", new ScrAction("", CTRL+Key_K, ScMW, "itemDelete"));
scrActions->insert("itemGroup", new ScrAction("", CTRL+Key_G, ScMW, "itemGroup"));
scrActions->insert("itemUngroup", new ScrAction("", CTRL+SHIFT+Key_G, ScMW, "itemUngroup"));
scrActions->insert("itemLock", new ScrAction("", CTRL+Key_L, ScMW, "itemLock"));
scrActions->insert("itemLockSize", new ScrAction("", CTRL+SHIFT+Key_L, ScMW, "itemLockSize"));
scrActions->insert("itemPrintingEnabled", new ScrAction("", QKeySequence(), ScMW, "itemPrintingEnabled"));
scrActions->insert("itemFlipH", new ScrAction("", QKeySequence(), ScMW, "itemFlipH"));
scrActions->insert("itemFlipV", new ScrAction("", QKeySequence(), ScMW, "itemFlipV"));
name="itemDuplicate";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemMulDuplicate";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemDelete";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemGroup";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemUngroup";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemLock";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemLockSize";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemPrintingEnabled";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemFlipH";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemFlipV";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
(*scrActions)["itemLock"]->setToggleAction(true, true);
(*scrActions)["itemLockSize"]->setToggleAction(true, true);
(*scrActions)["itemPrintingEnabled"]->setToggleAction(true, true);
(*scrActions)["itemFlipH"]->setToggleAction(true, true);
(*scrActions)["itemFlipV"]->setToggleAction(true, true);
scrActions->insert("itemLowerToBottom", new ScrAction(QIconSet(loadIcon("16/go-bottom.png"), loadIcon("22/go-bottom.png")), "", QKeySequence(Key_End), ScMW, "itemLowerToBottom"));
scrActions->insert("itemRaiseToTop", new ScrAction(QIconSet(loadIcon("16/go-top.png"), loadIcon("22/go-top.png")), "", QKeySequence(Key_Home), ScMW, "itemRaiseToTop"));
scrActions->insert("itemLower", new ScrAction(QIconSet(loadIcon("16/go-down.png"), loadIcon("22/go-down.png")), "", QKeySequence(CTRL+Key_End), ScMW, "itemLower"));
scrActions->insert("itemRaise", new ScrAction(QIconSet(loadIcon("16/go-up.png"), loadIcon("22/go-up.png")), "", QKeySequence(CTRL+Key_Home), ScMW, "itemRaise"));
scrActions->insert("itemSendToScrapbook", new ScrAction(ScMW, "itemSendToScrapbook"));
 
scrActions->insert("itemImageInfo", new ScrAction(ScMW, "itemImageInfo"));
scrActions->insert("itemAttributes", new ScrAction(ScMW, "itemAttributes"));
scrActions->insert("itemImageIsVisible", new ScrAction(ScMW, "itemImageIsVisible"));
scrActions->insert("itemUpdateImage", new ScrAction(ScMW, "itemUpdateImage"));
scrActions->insert("itemAdjustFrameToImage", new ScrAction(ScMW, "itemAdjustFrameToImage"));
scrActions->insert("itemExtendedImageProperties", new ScrAction(ScMW, "itemExtendedImageProperties"));
scrActions->insert("itemPreviewLow", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "itemPreviewLow", 2));
scrActions->insert("itemPreviewNormal", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "itemPreviewNormal", 1));
scrActions->insert("itemPreviewFull", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScMW, "itemPreviewFull", 0));
scrActions->insert("itemPDFIsBookmark", new ScrAction(ScMW, "itemPDFIsBookmark"));
name="itemLowerToBottom";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-bottom.png"), loadIcon("22/go-bottom.png")), "", defKeys[name], mainWindow, name));
name="itemRaiseToTop";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-top.png"), loadIcon("22/go-top.png")), "", defKeys[name], mainWindow, name));
name="itemLower";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-down.png"), loadIcon("22/go-down.png")), "", defKeys[name], mainWindow, name));
name="itemRaise";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-up.png"), loadIcon("22/go-up.png")), "", defKeys[name], mainWindow, name));
name="itemSendToScrapbook";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemImageInfo";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemAttributes";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemImageIsVisible";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemUpdateImage";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemAdjustFrameToImage";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemExtendedImageProperties";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemPreviewLow";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 2));
name="itemPreviewNormal";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 1));
name="itemPreviewFull";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 0));
name="itemPDFIsBookmark";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
(*scrActions)["itemPDFIsBookmark"]->setToggleAction(true);
scrActions->insert("itemPDFIsAnnotation", new ScrAction(ScMW, "itemPDFIsAnnotation"));
name="itemPDFIsAnnotation";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
(*scrActions)["itemPDFIsAnnotation"]->setToggleAction(true);
scrActions->insert("itemPDFAnnotationProps", new ScrAction(ScMW, "itemPDFAnnotationProps"));
scrActions->insert("itemPDFFieldProps", new ScrAction(ScMW, "itemPDFFieldProps"));
name="itemPDFAnnotationProps";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemPDFFieldProps";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
 
(*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
(*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
309,85 → 395,127
(*scrActions)["itemPreviewNormal"]->setToggleAction(true);
(*scrActions)["itemPreviewFull"]->setToggleAction(true);
 
scrActions->insert("itemShapeEdit", new ScrAction(ScMW, "itemShapeEdit"));
name="itemShapeEdit";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
(*scrActions)["itemShapeEdit"]->setToggleAction(true);
scrActions->insert("itemAttachTextToPath", new ScrAction(ScMW, "itemAttachTextToPath"));
scrActions->insert("itemDetachTextFromPath", new ScrAction(ScMW, "itemDetachTextFromPath"));
scrActions->insert("itemCombinePolygons", new ScrAction(ScMW, "itemCombinePolygons"));
scrActions->insert("itemSplitPolygons", new ScrAction(ScMW, "itemSplitPolygons"));
scrActions->insert("itemConvertToBezierCurve", new ScrAction(ScMW, "itemConvertToBezierCurve"));
scrActions->insert("itemConvertToImageFrame", new ScrAction(ScMW, "itemConvertToImageFrame"));
scrActions->insert("itemConvertToOutlines", new ScrAction(ScMW, "itemConvertToOutlines"));
scrActions->insert("itemConvertToPolygon", new ScrAction(ScMW, "itemConvertToPolygon"));
scrActions->insert("itemConvertToTextFrame", new ScrAction(ScMW, "itemConvertToTextFrame"));
name="itemAttachTextToPath";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemDetachTextFromPath";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemCombinePolygons";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemSplitPolygons";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemConvertToBezierCurve";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemConvertToImageFrame";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemConvertToOutlines";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemConvertToPolygon";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="itemConvertToTextFrame";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
 
connect( (*scrActions)["itemDuplicate"], SIGNAL(activated()), ScMW, SLOT(ObjektDup()) );
connect( (*scrActions)["itemMulDuplicate"], SIGNAL(activated()), ScMW, SLOT(ObjektDupM()) );
connect( (*scrActions)["itemGroup"], SIGNAL(activated()), ScMW, SLOT(GroupObj()) );
connect( (*scrActions)["itemUngroup"], SIGNAL(activated()), ScMW, SLOT(UnGroupObj()) );
connect( (*scrActions)["itemPDFAnnotationProps"], SIGNAL(activated()), ScMW, SLOT(ModifyAnnot()) );
connect( (*scrActions)["itemPDFFieldProps"], SIGNAL(activated()), ScMW, SLOT(ModifyAnnot()) );
connect( (*scrActions)["itemSendToScrapbook"], SIGNAL(activated()), ScMW, SLOT(PutScrap()) );
connect( (*scrActions)["itemAttributes"], SIGNAL(activated()), ScMW, SLOT(objectAttributes()) );
connect( (*scrActions)["itemShapeEdit"], SIGNAL(activated()), ScMW, SLOT(ToggleFrameEdit()) );
connect( (*scrActions)["itemImageInfo"], SIGNAL(activated()), ScMW, SLOT(getImageInfo()) );
connect( (*scrActions)["itemDuplicate"], SIGNAL(activated()), mainWindow, SLOT(ObjektDup()) );
connect( (*scrActions)["itemMulDuplicate"], SIGNAL(activated()), mainWindow, SLOT(ObjektDupM()) );
connect( (*scrActions)["itemGroup"], SIGNAL(activated()), mainWindow, SLOT(GroupObj()) );
connect( (*scrActions)["itemUngroup"], SIGNAL(activated()), mainWindow, SLOT(UnGroupObj()) );
connect( (*scrActions)["itemPDFAnnotationProps"], SIGNAL(activated()), mainWindow, SLOT(ModifyAnnot()) );
connect( (*scrActions)["itemPDFFieldProps"], SIGNAL(activated()), mainWindow, SLOT(ModifyAnnot()) );
connect( (*scrActions)["itemSendToScrapbook"], SIGNAL(activated()), mainWindow, SLOT(PutScrap()) );
connect( (*scrActions)["itemAttributes"], SIGNAL(activated()), mainWindow, SLOT(objectAttributes()) );
connect( (*scrActions)["itemShapeEdit"], SIGNAL(activated()), mainWindow, SLOT(ToggleFrameEdit()) );
connect( (*scrActions)["itemImageInfo"], SIGNAL(activated()), mainWindow, SLOT(getImageInfo()) );
}
 
void ActionManager::initInsertMenuActions()
{
QString name;
//Insert Menu
scrActions->insert("insertGlyph", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "insertGlyph"));
scrActions->insert("insertSampleText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "insertSampleText"));
name="insertGlyph";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="insertSampleText";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
 
connect( (*scrActions)["insertGlyph"], SIGNAL(activated()), ScMW, SLOT(slotCharSelect()) );
connect( (*scrActions)["insertSampleText"], SIGNAL(activated()), ScMW, SLOT(insertSampleText()) );
connect( (*scrActions)["insertGlyph"], SIGNAL(activated()), mainWindow, SLOT(slotCharSelect()) );
connect( (*scrActions)["insertSampleText"], SIGNAL(activated()), mainWindow, SLOT(insertSampleText()) );
}
 
void ActionManager::initPageMenuActions()
{
QString name;
//Page menu
scrActions->insert("pageInsert", new ScrAction(ScMW, "pageInsert"));
scrActions->insert("pageImport", new ScrAction(ScMW, "pageImport"));
scrActions->insert("pageDelete", new ScrAction(ScMW, "pageDelete"));
scrActions->insert("pageCopy", new ScrAction(ScMW, "pageCopy"));
scrActions->insert("pageMove", new ScrAction(ScMW, "pageMove"));
scrActions->insert("pageApplyMasterPage", new ScrAction(ScMW, "pageApplyMasterPage"));
scrActions->insert("pageCopyToMasterPage", new ScrAction(ScMW, "pageCopyToMasterPage"));
scrActions->insert("pageManageGuides", new ScrAction(ScMW, "pageManageGuides"));
name="pageInsert";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="pageImport";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="pageDelete";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="pageCopy";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="pageMove";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="pageApplyMasterPage";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="pageCopyToMasterPage";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="pageManageGuides";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
(*scrActions)["pageManageGuides"]->setToggleAction(true);
scrActions->insert("pageManageMargins", new ScrAction(ScMW, "pageManageMargins"));
name="pageManageMargins";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
 
connect( (*scrActions)["pageInsert"], SIGNAL(activated()), ScMW, SLOT(slotNewPageM()) );
connect( (*scrActions)["pageImport"], SIGNAL(activated()), ScMW, SLOT(slotPageImport()) );
connect( (*scrActions)["pageDelete"], SIGNAL(activated()), ScMW, SLOT(DeletePage()) );
connect( (*scrActions)["pageCopy"], SIGNAL(activated()), ScMW, SLOT(CopyPage()) );
connect( (*scrActions)["pageMove"], SIGNAL(activated()), ScMW, SLOT(MovePage()) );
connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(activated()), ScMW, SLOT(ApplyMasterPage()) );
connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(activated()), ScMW, SLOT(duplicateToMasterPage()) );
connect( (*scrActions)["pageManageMargins"], SIGNAL(activated()), ScMW, SLOT(changePageMargins()) );
connect( (*scrActions)["pageInsert"], SIGNAL(activated()), mainWindow, SLOT(slotNewPageM()) );
connect( (*scrActions)["pageImport"], SIGNAL(activated()), mainWindow, SLOT(slotPageImport()) );
connect( (*scrActions)["pageDelete"], SIGNAL(activated()), mainWindow, SLOT(DeletePage()) );
connect( (*scrActions)["pageCopy"], SIGNAL(activated()), mainWindow, SLOT(CopyPage()) );
connect( (*scrActions)["pageMove"], SIGNAL(activated()), mainWindow, SLOT(MovePage()) );
connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(activated()), mainWindow, SLOT(ApplyMasterPage()) );
connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(activated()), mainWindow, SLOT(duplicateToMasterPage()) );
connect( (*scrActions)["pageManageMargins"], SIGNAL(activated()), mainWindow, SLOT(changePageMargins()) );
}
 
void ActionManager::initViewMenuActions()
{
scrActions->insert("viewFitInWindow", new ScrAction(ScrAction::DataDouble, QIconSet(), "", CTRL+Key_0, ScMW, "viewFitInWindow", 0, -100.0));
scrActions->insert("viewFit50", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScMW, "viewFit50", 0, 50.0));
scrActions->insert("viewFit75", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScMW, "viewFit75", 0, 75.0));
scrActions->insert("viewFit100", new ScrAction(ScrAction::DataDouble, QIconSet(), "", CTRL+Key_1, ScMW, "viewFit100", 0, 100.0));
scrActions->insert("viewFit200", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScMW, "viewFit200", 0, 200.0));
scrActions->insert("viewFit20", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScMW, "viewFit20", 0, 20.0));
scrActions->insert("viewShowMargins", new ScrAction(ScMW, "viewShowMargins"));
scrActions->insert("viewShowFrames", new ScrAction(ScMW, "viewShowFrames"));
scrActions->insert("viewShowImages", new ScrAction(ScMW, "viewShowImages"));
scrActions->insert("viewShowGrid", new ScrAction(ScMW, "viewShowGrid"));
scrActions->insert("viewShowGuides", new ScrAction(ScMW, "viewShowGuides"));
scrActions->insert("viewShowBaseline", new ScrAction(ScMW, "viewShowBaseline"));
scrActions->insert("viewShowTextChain", new ScrAction(ScMW, "viewShowTextChain"));
scrActions->insert("viewShowTextControls", new ScrAction(ScMW, "viewShowTextControls"));
scrActions->insert("viewShowRulers", new ScrAction("", CTRL+SHIFT+Key_R, ScMW, "viewShowRulers"));
scrActions->insert("viewRulerMode", new ScrAction(ScMW, "viewRulerMode"));
scrActions->insert("viewSnapToGrid", new ScrAction(ScMW, "viewSnapToGrid"));
scrActions->insert("viewSnapToGuides", new ScrAction(ScMW, "viewSnapToGuides"));
// scrActions->insert("viewNewView", new ScrAction(ScMW, "viewNewView"));
QString name;
name="viewFitInWindow";
scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, -100.0));
name="viewFit50";
scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 50.0));
name="viewFit75";
scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 75.0));
name="viewFit100";
scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 100.0));
name="viewFit200";
scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 200.0));
name="viewFit20";
scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 20.0));
name="viewShowMargins";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowFrames";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowImages";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowGrid";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowGuides";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowBaseline";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowTextChain";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowTextControls";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewShowRulers";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewRulerMode";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewSnapToGrid";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="viewSnapToGuides";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
// scrActions->insert("viewNewView", new ScrAction("", defKeys[name], mainWindow, name));
 
(*scrActions)["viewShowMargins"]->setToggleAction(true);
(*scrActions)["viewShowFrames"]->setToggleAction(true);
409,66 → 537,97
(*scrActions)["viewShowRulers"]->setOn(true);
(*scrActions)["viewRulerMode"]->setOn(true);
 
connect( (*scrActions)["viewFitInWindow"], SIGNAL(activatedData(double)), ScMW, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit50"], SIGNAL(activatedData(double)), ScMW, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit75"], SIGNAL(activatedData(double)), ScMW, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit100"], SIGNAL(activatedData(double)), ScMW, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit200"], SIGNAL(activatedData(double)), ScMW, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit20"], SIGNAL(activatedData(double)), ScMW, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewShowMargins"], SIGNAL(activated()), ScMW, SLOT(ToggleMarks()) );
connect( (*scrActions)["viewShowFrames"], SIGNAL(activated()), ScMW, SLOT(ToggleFrames()) );
connect( (*scrActions)["viewShowImages"], SIGNAL(activated()), ScMW, SLOT(TogglePics()) );
connect( (*scrActions)["viewShowGrid"], SIGNAL(activated()), ScMW, SLOT(ToggleRaster()) );
connect( (*scrActions)["viewShowGuides"], SIGNAL(activated()), ScMW, SLOT(ToggleGuides()) );
connect( (*scrActions)["viewShowBaseline"], SIGNAL(activated()), ScMW, SLOT(ToggleBase()) );
connect( (*scrActions)["viewShowTextChain"], SIGNAL(activated()), ScMW, SLOT(ToggleTextLinks()) );
connect( (*scrActions)["viewShowTextControls"], SIGNAL(activated()), ScMW, SLOT(ToggleTextControls()) );
connect( (*scrActions)["viewShowRulers"], SIGNAL(activated()), ScMW, SLOT(ToggleRulers()) );
connect( (*scrActions)["viewRulerMode"], SIGNAL(activated()), ScMW, SLOT(ToggleRulerMode()) );
connect( (*scrActions)["viewSnapToGrid"], SIGNAL(activated()), ScMW, SLOT(ToggleURaster()) );
connect( (*scrActions)["viewSnapToGuides"], SIGNAL(activated()), ScMW, SLOT(ToggleUGuides()) );
// connect( (*scrActions)["viewNewView"], SIGNAL(activated()), ScMW, SLOT(newView()) );
connect( (*scrActions)["viewFitInWindow"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit50"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit75"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit100"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit200"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewFit20"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
connect( (*scrActions)["viewShowMargins"], SIGNAL(activated()), mainWindow, SLOT(ToggleMarks()) );
connect( (*scrActions)["viewShowFrames"], SIGNAL(activated()), mainWindow, SLOT(ToggleFrames()) );
connect( (*scrActions)["viewShowImages"], SIGNAL(activated()), mainWindow, SLOT(TogglePics()) );
connect( (*scrActions)["viewShowGrid"], SIGNAL(activated()), mainWindow, SLOT(ToggleRaster()) );
connect( (*scrActions)["viewShowGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleGuides()) );
connect( (*scrActions)["viewShowBaseline"], SIGNAL(activated()), mainWindow, SLOT(ToggleBase()) );
connect( (*scrActions)["viewShowTextChain"], SIGNAL(activated()), mainWindow, SLOT(ToggleTextLinks()) );
connect( (*scrActions)["viewShowTextControls"], SIGNAL(activated()), mainWindow, SLOT(ToggleTextControls()) );
connect( (*scrActions)["viewShowRulers"], SIGNAL(activated()), mainWindow, SLOT(ToggleRulers()) );
connect( (*scrActions)["viewRulerMode"], SIGNAL(activated()), mainWindow, SLOT(ToggleRulerMode()) );
connect( (*scrActions)["viewSnapToGrid"], SIGNAL(activated()), mainWindow, SLOT(ToggleURaster()) );
connect( (*scrActions)["viewSnapToGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleUGuides()) );
// connect( (*scrActions)["viewNewView"], SIGNAL(activated()), mainWindow, SLOT(newView()) );
 
}
 
void ActionManager::initToolsMenuActions()
{
QString name;
//Tool menu
scrActions->insert("toolsProperties", new ScrAction(QIconSet(noIcon),"", Key_F2, ScMW, "toolsProperties"));
scrActions->insert("toolsOutline", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsOutline"));
scrActions->insert("toolsScrapbook", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsScrapbook"));
scrActions->insert("toolsLayers", new ScrAction(QIconSet(noIcon),"", QKeySequence(Key_F6), ScMW, "toolsLayers"));
scrActions->insert("toolsPages", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsPages"));
scrActions->insert("toolsBookmarks", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsBookmarks"));
scrActions->insert("toolsMeasurements", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/measure.png"), loadIcon("22/measure.png")), "", QKeySequence(), ScMW, "toolsMeasurements", modeMeasurementTool));
scrActions->insert("toolsActionHistory", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsActionHistory"));
scrActions->insert("toolsPreflightVerifier", new ScrAction(QIconSet(loadIcon("16/preflight-verifier.png"), loadIcon("22/preflight-verifier.png")),"", QKeySequence(), ScMW, "toolsPreflightVerifier"));
scrActions->insert("toolsAlignDistribute", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsAlignDistribute"));
scrActions->insert("toolsToolbarTools", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsToolbarTools"));
scrActions->insert("toolsToolbarPDF", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScMW, "toolsToolbarPDF"));
name="toolsProperties";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsOutline";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsScrapbook";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsLayers";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsPages";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsBookmarks";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsMeasurements";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/measure.png"), loadIcon("22/measure.png")), "", defKeys[name], mainWindow, name, modeMeasurementTool));
name="toolsActionHistory";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsPreflightVerifier";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/preflight-verifier.png"), loadIcon("22/preflight-verifier.png")),"", defKeys[name], mainWindow, name));
name="toolsAlignDistribute";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsToolbarTools";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="toolsToolbarPDF";
scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
 
//toolbar only items
scrActions->insert("toolsSelect", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/pointer.png"), loadIcon("22/pointer.png")), "", QKeySequence(Key_C), ScMW, "toolsSelect", modeNormal));
scrActions->insert("toolsInsertTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-text-frame.png"), loadIcon("22/insert-text-frame.png")), "", QKeySequence(Key_T), ScMW, "toolsInsertTextFrame", modeDrawText));
scrActions->insert("toolsInsertImageFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-image.png"), loadIcon("22/insert-image.png")), "", QKeySequence(Key_I), ScMW, "toolsInsertImageFrame", modeDrawPicture));
scrActions->insert("toolsInsertTableFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-table.png"), loadIcon("22/insert-table.png")), "", QKeySequence(Key_A), ScMW, "toolsInsertTableFrame", modeDrawTable));
scrActions->insert("toolsInsertShape", new ScrAction(ScrAction::DataInt,QIconSet(), "", QKeySequence(Key_S), ScMW, "toolsInsertShape", modeDrawShapes));
scrActions->insert("toolsInsertPolygon", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("spline16.png"), loadIcon("spline.png")), "", QKeySequence(Key_P), ScMW, "toolsInsertPolygon", modeDrawRegularPolygon));
scrActions->insert("toolsInsertLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stift16.xpm"), loadIcon("Stift.xpm")), "", QKeySequence(Key_L), ScMW, "toolsInsertLine", modeDrawLine));
scrActions->insert("toolsInsertBezier", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("beziertool16.png"), loadIcon("beziertool.png")), "", QKeySequence(Key_B), ScMW, "toolsInsertBezier", modeDrawBezierLine));
scrActions->insert("toolsInsertFreehandLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/draw-freehand.png"), loadIcon("22/draw-freehand.png")), "", QKeySequence(Key_F), ScMW, "toolsInsertFreehandLine", modeDrawFreehandLine));
name="toolsSelect";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/pointer.png"), loadIcon("22/pointer.png")), "", defKeys[name], mainWindow, "toolsSelect", modeNormal));
name="toolsInsertTextFrame";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-text-frame.png"), loadIcon("22/insert-text-frame.png")), "", defKeys[name], mainWindow, "toolsInsertTextFrame", modeDrawText));
name="toolsInsertImageFrame";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-image.png"), loadIcon("22/insert-image.png")), "", defKeys[name], mainWindow, "toolsInsertImageFrame", modeDrawPicture));
name="toolsInsertTableFrame";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-table.png"), loadIcon("22/insert-table.png")), "", defKeys[name], mainWindow, "toolsInsertTableFrame", modeDrawTable));
name="toolsInsertShape";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(), "", defKeys[name], mainWindow, "toolsInsertShape", modeDrawShapes));
name="toolsInsertPolygon";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("spline16.png"), loadIcon("spline.png")), "", defKeys[name], mainWindow, "toolsInsertPolygon", modeDrawRegularPolygon));
name="toolsInsertLine";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stift16.xpm"), loadIcon("Stift.xpm")), "", defKeys[name], mainWindow, "toolsInsertLine", modeDrawLine));
name="toolsInsertBezier";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("beziertool16.png"), loadIcon("beziertool.png")), "", defKeys[name], mainWindow, "toolsInsertBezier", modeDrawBezierLine));
name="toolsInsertFreehandLine";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/draw-freehand.png"), loadIcon("22/draw-freehand.png")), "", defKeys[name], mainWindow, "toolsInsertFreehandLine", modeDrawFreehandLine));
name="toolsRotate";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Rotieren.xpm"), loadIcon("Rotieren.xpm")), "", defKeys[name], mainWindow, "toolsRotate", modeRotation));
name="toolsZoom";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lupe.xpm"), loadIcon("Lupe.xpm")), "", defKeys[name], mainWindow, "toolsZoom", modeMagnifier));
name="toolsZoomIn";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("viewmagin.png"), loadIcon("viewmagin.png")), "", defKeys[name], mainWindow, name));
name="toolsZoomOut";
scrActions->insert(name, new ScrAction(QIconSet(loadIcon("viewmagout.png"), loadIcon("viewmagout.png")), "", defKeys[name], mainWindow, name));
name="toolsEditContents";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Editm.xpm"), loadIcon("Editm.xpm")), "", defKeys[name], mainWindow, "toolsEditContents", modeEdit));
name="toolsEditWithStoryEditor";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/story-editor.png"), loadIcon("22/story-editor.png")), "", defKeys[name], mainWindow, "toolsEditWithStoryEditor", modeStoryEditor));
name="toolsLinkTextFrame";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/text-frame-link.png"), loadIcon("22/text-frame-link.png")), "", defKeys[name], mainWindow, "toolsLinkTextFrame", modeLinkFrames));
name="toolsUnlinkTextFrame";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/text-frame-unlink.png"), loadIcon("22/text-frame-unlink.png")), "", defKeys[name], mainWindow, "toolsUnlinkTextFrame", modeUnlinkFrames));
name="toolsEyeDropper";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/color-picker.png"), loadIcon("22/color-picker.png")), "", defKeys[name], mainWindow, "toolsEyeDropper", modeEyeDropper));
name="toolsCopyProperties";
scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("wizard.png"), loadIcon("wizard.png")), "", defKeys[name], mainWindow, name, modeCopyProperties));
 
scrActions->insert("toolsRotate", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Rotieren.xpm"), loadIcon("Rotieren.xpm")), "", QKeySequence(Key_R), ScMW, "toolsRotate", modeRotation));
scrActions->insert("toolsZoom", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lupe.xpm"), loadIcon("Lupe.xpm")), "", QKeySequence(Key_Z), ScMW, "toolsZoom", modeMagnifier));
scrActions->insert("toolsZoomIn", new ScrAction(QIconSet(loadIcon("viewmagin.png"), loadIcon("viewmagin.png")), "", QKeySequence(CTRL+Key_Plus), ScMW, "toolsZoomIn"));
scrActions->insert("toolsZoomOut", new ScrAction(QIconSet(loadIcon("viewmagout.png"), loadIcon("viewmagout.png")), "", QKeySequence(CTRL+Key_Minus), ScMW, "toolsZoomOut"));
scrActions->insert("toolsEditContents", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Editm.xpm"), loadIcon("Editm.xpm")), "", QKeySequence(Key_E), ScMW, "toolsEditContents", modeEdit));
scrActions->insert("toolsEditWithStoryEditor", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/story-editor.png"), loadIcon("22/story-editor.png")), "", QKeySequence(CTRL+Key_Y), ScMW, "toolsEditWithStoryEditor", modeStoryEditor));
scrActions->insert("toolsLinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/text-frame-link.png"), loadIcon("22/text-frame-link.png")), "", QKeySequence(Key_N), ScMW, "toolsLinkTextFrame", modeLinkFrames));
scrActions->insert("toolsUnlinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/text-frame-unlink.png"), loadIcon("22/text-frame-unlink.png")), "", QKeySequence(Key_U), ScMW, "toolsUnlinkTextFrame", modeUnlinkFrames));
scrActions->insert("toolsEyeDropper", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/color-picker.png"), loadIcon("22/color-picker.png")), "", QKeySequence(Key_Y), ScMW, "toolsEyeDropper", modeEyeDropper));
scrActions->insert("toolsCopyProperties", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("wizard.png"), loadIcon("wizard.png")), "", QKeySequence(), ScMW, "toolsCopyProperties", modeCopyProperties));
 
(*scrActions)["toolsProperties"]->setToggleAction(true);
(*scrActions)["toolsOutline"]->setToggleAction(true);
(*scrActions)["toolsScrapbook"]->setToggleAction(true);
508,7 → 667,7
 
*nonEditActionNames << "itemLowerToBottom" << "itemRaiseToTop" << "itemRaise" << "itemLower";
 
connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), ScMW, SLOT(setUndoPalette(bool)) );
connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoPalette(bool)) );
 
connectModeActions();
}
515,20 → 674,28
 
void ActionManager::initExtrasMenuActions()
{
scrActions->insert("extrasManagePictures", new ScrAction(ScMW, "extrasManagePictures"));
scrActions->insert("extrasHyphenateText", new ScrAction(ScMW, "extrasHyphenateText"));
scrActions->insert("extrasDeHyphenateText", new ScrAction(ScMW, "extrasDeHyphenateText"));
scrActions->insert("extrasGenerateTableOfContents", new ScrAction(ScMW, "extrasGenerateTableOfContents"));
QString name;
name="extrasManagePictures";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="extrasHyphenateText";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="extrasDeHyphenateText";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="extrasGenerateTableOfContents";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
 
connect( (*scrActions)["extrasManagePictures"], SIGNAL(activated()), ScMW, SLOT(StatusPic()) );
connect( (*scrActions)["extrasGenerateTableOfContents"], SIGNAL(activated()), ScMW, SLOT(generateTableOfContents()) );
connect( (*scrActions)["extrasManagePictures"], SIGNAL(activated()), mainWindow, SLOT(StatusPic()) );
connect( (*scrActions)["extrasGenerateTableOfContents"], SIGNAL(activated()), mainWindow, SLOT(generateTableOfContents()) );
}
 
 
void ActionManager::initWindowsMenuActions()
{
scrActions->insert("windowsCascade", new ScrAction( QIconSet(noIcon),"", QKeySequence(), ScMW, "windowsCascade"));
scrActions->insert("windowsTile", new ScrAction( QIconSet(noIcon),"", QKeySequence(), ScMW, "windowstile"));
QString name;
name="windowsCascade";
scrActions->insert(name, new ScrAction( QIconSet(noIcon),"", defKeys[name], mainWindow, name));
name="windowsTile";
scrActions->insert(name, new ScrAction( QIconSet(noIcon),"", defKeys[name], mainWindow, name));
}
 
void ActionManager::initScriptMenuActions()
537,79 → 704,134
 
void ActionManager::initHelpMenuActions()
{
scrActions->insert("helpAboutScribus", new ScrAction(ScMW, "helpAboutScribus"));
scrActions->insert("helpAboutPlugins", new ScrAction(ScMW, "helpAboutPlugins"));
scrActions->insert("helpAboutQt", new ScrAction(ScMW, "helpAboutQt"));
scrActions->insert("helpTooltips", new ScrAction(ScMW, "helpTooltips"));
scrActions->insert("helpManual", new ScrAction("", Key_F1, ScMW, "helpManual"));
QString name;
name="helpAboutScribus";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="helpAboutPlugins";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="helpAboutQt";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="helpTooltips";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
name="helpManual";
scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
 
(*scrActions)["helpTooltips"]->setToggleAction(true);
(*scrActions)["helpTooltips"]->setOn(true);
 
connect( (*scrActions)["helpAboutScribus"], SIGNAL(activated()), ScMW, SLOT(slotHelpAbout()) );
connect( (*scrActions)["helpAboutPlugins"], SIGNAL(activated()), ScMW, SLOT(slotHelpAboutPlugins()) );
connect( (*scrActions)["helpAboutQt"], SIGNAL(activated()), ScMW, SLOT(slotHelpAboutQt()) );
connect( (*scrActions)["helpTooltips"], SIGNAL(activated()), ScMW, SLOT(ToggleTips()) );
connect( (*scrActions)["helpManual"], SIGNAL(activated()), ScMW, SLOT(slotOnlineHelp()) );
connect( (*scrActions)["helpAboutScribus"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAbout()) );
connect( (*scrActions)["helpAboutPlugins"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAboutPlugins()) );
connect( (*scrActions)["helpAboutQt"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAboutQt()) );
connect( (*scrActions)["helpTooltips"], SIGNAL(activated()), mainWindow, SLOT(ToggleTips()) );
connect( (*scrActions)["helpManual"], SIGNAL(activated()), mainWindow, SLOT(slotOnlineHelp()) );
}
 
void ActionManager::initUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap, QWidget *actionParent, QStringList *actionNamesList)
{
QString name;
//typography
actionMap->insert("unicodeSmartHyphen", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+SHIFT+Key_Minus, actionParent, "unicodeSmartHyphen",-1));
actionMap->insert("unicodeNonBreakingHyphen", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+ALT+Key_Minus, actionParent, "unicodeNonBreakingHyphen",24));
actionMap->insert("unicodeNonBreakingSpace", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+Key_Space, actionParent, "unicodeNonBreakingSpace",29));
actionMap->insert("unicodePageNumber", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+SHIFT+ALT+Key_P, actionParent, "unicodePageNumber",30));
name="unicodeSmartHyphen";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSmartHyphen",-1));
name="unicodeNonBreakingHyphen";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeNonBreakingHyphen",24));
name="unicodeNonBreakingSpace";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeNonBreakingSpace",29));
name="unicodePageNumber";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodePageNumber",30));
//Spaces
actionMap->insert("unicodeSpaceEN", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeSpaceEN",0x2002));
actionMap->insert("unicodeSpaceEM", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeSpaceEM",0x2003));
actionMap->insert("unicodeSpaceThin", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeSpaceThin",0x2009));
actionMap->insert("unicodeSpaceThick", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeSpaceThick",0x2004));
actionMap->insert("unicodeSpaceMid", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeSpaceMid",0x2005));
actionMap->insert("unicodeSpaceHair", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeSpaceHair",0x200A));
name="unicodeSpaceEN";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceEN",0x2002));
name="unicodeSpaceEM";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceEM",0x2003));
name="unicodeSpaceThin";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceThin",0x2009));
name="unicodeSpaceThick";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceThick",0x2004));
name="unicodeSpaceMid";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceMid",0x2005));
name="unicodeSpaceHair";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceHair",0x200A));
//Breaks
actionMap->insert("unicodeNewLine", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", SHIFT+Key_Return, actionParent, "unicodeNewLine",28));
actionMap->insert("unicodeFrameBreak", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+Key_Return, actionParent, "unicodeFrameBreak",27));
actionMap->insert("unicodeColumnBreak", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+SHIFT+Key_Return, actionParent, "unicodeColumnBreak",26));
name="unicodeNewLine";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeNewLine",28));
name="unicodeFrameBreak";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeFrameBreak",27));
name="unicodeColumnBreak";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeColumnBreak",26));
//Special
actionMap->insert("unicodeCopyRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeCopyRight",0x0A9));
actionMap->insert("unicodeRegdTM", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeRegdTM",0x00AE));
actionMap->insert("unicodeTM", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeTM",0x2122));
actionMap->insert("unicodeBullet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeBullet",0x2022));
actionMap->insert("unicodeMidpoint", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeMidpoint",0x00B7));
actionMap->insert("unicodeSolidus", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeSolidus",0x2044));
name="unicodeCopyRight";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeCopyRight",0x0A9));
name="unicodeRegdTM";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeRegdTM",0x00AE));
name="unicodeTM";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeTM",0x2122));
name="unicodeBullet";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeBullet",0x2022));
name="unicodeMidpoint";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeMidpoint",0x00B7));
name="unicodeSolidus";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSolidus",0x2044));
//Dashes
actionMap->insert("unicodeDashEm", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeDashEm",0x2014));
actionMap->insert("unicodeDashEn", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeDashEn",0x2013));
actionMap->insert("unicodeDashFigure", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeDashFigure",0x2012));
actionMap->insert("unicodeDashQuotation", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeDashQuotation",0x2015));
name="unicodeDashEm";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashEm",0x2014));
name="unicodeDashEn";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashEn",0x2013));
name="unicodeDashFigure";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashFigure",0x2012));
name="unicodeDashQuotation";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashQuotation",0x2015));
//Quotes
actionMap->insert("unicodeQuoteApostrophe", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteApostrophe",0x0027));
actionMap->insert("unicodeQuoteStraight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteStraight",0x0022));
actionMap->insert("unicodeQuoteSingleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteSingleLeft",0x2018));
actionMap->insert("unicodeQuoteSingleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteSingleRight",0x2019));
actionMap->insert("unicodeQuoteDoubleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteDoubleLeft",0x201C));
actionMap->insert("unicodeQuoteDoubleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteDoubleRight",0x201D));
actionMap->insert("unicodeQuoteSingleReversed", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteSingleReversed",0x201B));
actionMap->insert("unicodeQuoteDoubleReversed", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteDoubleReversed",0x201F));
actionMap->insert("unicodeQuoteSingleLeftGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteSingleLeftGuillemet",0x2039));
actionMap->insert("unicodeQuoteSingleRightGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteSingleRightGuillemet",0x203A));
actionMap->insert("unicodeQuoteDoubleLeftGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteDoubleLeftGuillemet",0x00AB));
actionMap->insert("unicodeQuoteDoubleRightGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteDoubleRightGuillemet",0x00BB));
actionMap->insert("unicodeQuoteLowSingleComma", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteLowSingleComma",0x201A));
actionMap->insert("unicodeQuoteLowDoubleComma", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteLowDoubleComma",0x201E));
actionMap->insert("unicodeQuoteCJKSingleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteCJKSingleLeft",0x300C));
actionMap->insert("unicodeQuoteCJKSingleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteCJKSingleRight",0x300D));
actionMap->insert("unicodeQuoteCJKDoubleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteCJKDoubleLeft",0x300E));
actionMap->insert("unicodeQuoteCJKDoubleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeQuoteCJKDoubleRight",0x300F));
name="unicodeQuoteApostrophe";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x0027));
name="unicodeQuoteStraight";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x0022));
name="unicodeQuoteSingleLeft";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x2018));
name="unicodeQuoteSingleRight";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x2019));
name="unicodeQuoteDoubleLeft";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201C));
name="unicodeQuoteDoubleRight";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201D));
name="unicodeQuoteSingleReversed";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201B));
name="unicodeQuoteDoubleReversed";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201F));
name="unicodeQuoteSingleLeftGuillemet";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x2039));
name="unicodeQuoteSingleRightGuillemet";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x203A));
name="unicodeQuoteDoubleLeftGuillemet";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteDoubleLeftGuillemet",0x00AB));
name="unicodeQuoteDoubleRightGuillemet";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteDoubleRightGuillemet",0x00BB));
name="unicodeQuoteLowSingleComma";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteLowSingleComma",0x201A));
name="unicodeQuoteLowDoubleComma";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteLowDoubleComma",0x201E));
name="unicodeQuoteCJKSingleLeft";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKSingleLeft",0x300C));
name="unicodeQuoteCJKSingleRight";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKSingleRight",0x300D));
name="unicodeQuoteCJKDoubleLeft";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKDoubleLeft",0x300E));
name="unicodeQuoteCJKDoubleRight";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKDoubleRight",0x300F));
//Ligatures
actionMap->insert("unicodeLigature_ff", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeLigature_ff",0xFB00));
actionMap->insert("unicodeLigature_fi", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeLigature_fi",0xFB01));
actionMap->insert("unicodeLigature_fl", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeLigature_fl",0xFB02));
actionMap->insert("unicodeLigature_ffi", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeLigature_ffi",0xFB03));
actionMap->insert("unicodeLigature_ffl", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeLigature_ffl",0xFB04));
actionMap->insert("unicodeLigature_ft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeLigature_ft",0xFB05));
actionMap->insert("unicodeLigature_st", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), actionParent, "unicodeLigature_st",0xFB06));
name="unicodeLigature_ff";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB00));
name="unicodeLigature_fi";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB01));
name="unicodeLigature_fl";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB02));
name="unicodeLigature_ffi";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB03));
name="unicodeLigature_ffl";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB04));
name="unicodeLigature_ft";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB05));
name="unicodeLigature_st";
actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB06));
//Spaces and special characters
*actionNamesList << "unicodeSmartHyphen" << "unicodeNonBreakingHyphen" << "unicodeNonBreakingSpace" << "unicodePageNumber";
645,24 → 867,27
 
void ActionManager::initSpecialActions()
{
QString name;
//GUI
scrActions->insert("specialToggleAllPalettes", new ScrAction(ScrAction::DataQString, QIconSet(), "", Key_F10, ScMW, "specialToggleAllPalettes",0,0.0,"specialToggleAllPalettes"));
scrActions->insert("specialToggleAllGuides", new ScrAction(ScrAction::DataQString, QIconSet(), "", Key_F11, ScMW, "specialToggleAllGuides",0,0.0,"specialToggleAllGuides"));
name="specialToggleAllPalettes";
scrActions->insert(name, new ScrAction(ScrAction::DataQString, QIconSet(), "", defKeys[name], mainWindow, name, 0,0.0,name));
name="specialToggleAllGuides";
scrActions->insert(name, new ScrAction(ScrAction::DataQString, QIconSet(), "", defKeys[name], mainWindow, name, 0,0.0,name));
 
connect( (*scrActions)["specialToggleAllPalettes"], SIGNAL(activated()), ScMW, SLOT(ToggleAllPalettes()) );
connect( (*scrActions)["specialToggleAllGuides"], SIGNAL(activated()), ScMW, SLOT(ToggleAllGuides()) );
connect( (*scrActions)["specialToggleAllPalettes"], SIGNAL(activated()), mainWindow, SLOT(ToggleAllPalettes()) );
connect( (*scrActions)["specialToggleAllGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleAllGuides()) );
}
 
void ActionManager::disconnectModeActions()
{
for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
disconnect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , ScMW, SLOT(setAppModeByToggle(bool, int)) );
disconnect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
}
 
void ActionManager::connectModeActions()
{
for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
connect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , ScMW, SLOT(setAppModeByToggle(bool, int)) );
connect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
}
 
void ActionManager::disconnectNewDocActions()
786,7 → 1011,7
else
{
//For UnicodeChar actions, only enable when the current font has that character.
if (ScMW->HaveDoc && (*actionMap)[*it]->actionType()==ScrAction::UnicodeChar)
if (mainWindow->HaveDoc && (*actionMap)[*it]->actionType()==ScrAction::UnicodeChar)
{
int charCode=(*actionMap)[*it]->actionInt();
if(charCode==-1 ||
796,8 → 1021,8
charCode==28 ||
charCode==29 ||
charCode==30 ||
((*ScMW->doc->AllFonts)[fontName]!=0 &&
(*ScMW->doc->AllFonts)[fontName]->CharWidth.contains(charCode)) )
((*mainWindow->doc->AllFonts)[fontName]!=0 &&
(*mainWindow->doc->AllFonts)[fontName]->CharWidth.contains(charCode)) )
(*actionMap)[*it]->setEnabled(true);
else
(*actionMap)[*it]->setEnabled(false);
815,7 → 1040,7
{
if (currView==NULL)
return;
PageItem* currItem = ScMW->doc->m_Selection->itemAt(0);
PageItem* currItem = mainWindow->doc->m_Selection->itemAt(0);
if (currItem==NULL)
return;
 
1141,3 → 1366,291
(*actionMap)["unicodeLigature_st"]->setTexts( tr("st"));
}
 
void ActionManager::createDefaultShortcuts()
{
defKeys.clear();
defKeys.insert("fileNew", CTRL+Key_N);
defKeys.insert("fileOpen", CTRL+Key_O);
defKeys.insert("fileClose", CTRL+Key_W);
defKeys.insert("fileSave", CTRL+Key_S);
defKeys.insert("fileSaveAs", CTRL+SHIFT+Key_S);
defKeys.insert("fileRevert", QKeySequence());
defKeys.insert("fileCollect", QKeySequence());
defKeys.insert("fileImportText", CTRL+Key_D);
defKeys.insert("fileImportAppendText", QKeySequence());
defKeys.insert("fileImportImage", CTRL+Key_D);
defKeys.insert("fileExportText", QKeySequence());
defKeys.insert("fileExportAsEPS", QKeySequence());
defKeys.insert("fileExportAsPDF", QKeySequence());
defKeys.insert("fileDocSetup", QKeySequence());
defKeys.insert("filePrint", CTRL+Key_P);
defKeys.insert("PrintPreview", CTRL+ALT+Key_P);
defKeys.insert("fileQuit", CTRL+Key_Q);
//Edit Menu
defKeys.insert("editUndoAction", CTRL+Key_Z);
defKeys.insert("editRedoAction", CTRL+SHIFT+Key_Z);
defKeys.insert("editActionMode", QKeySequence());
defKeys.insert("editCut", CTRL+Key_X);
defKeys.insert("editCopy", CTRL+Key_C);
defKeys.insert("editPaste", CTRL+Key_V);
defKeys.insert("editCopyContents", CTRL+SHIFT+Key_C);
defKeys.insert("editPasteContents", CTRL+SHIFT+Key_V);
defKeys.insert("editPasteContentsAbs", CTRL+ALT+SHIFT+Key_V);
defKeys.insert("editClearContents", QKeySequence());
defKeys.insert("editSelectAll", CTRL+Key_A);
defKeys.insert("editDeselectAll", CTRL+SHIFT+Key_A);
defKeys.insert("editSearchReplace", CTRL+Key_F);
defKeys.insert("editEditWithImageEditor", QKeySequence());
defKeys.insert("editColors", QKeySequence());
defKeys.insert("editStyles", QKeySequence());
defKeys.insert("editParaStyles", QKeySequence());
defKeys.insert("editLineStyles", QKeySequence());
defKeys.insert("editMasterPages", QKeySequence());
defKeys.insert("editJavascripts", QKeySequence());
defKeys.insert("editPreferences", QKeySequence());
 
int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
for (uint s = 0; s < f_size; ++s)
{
QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
defKeys.insert(fontSizeName, QKeySequence());
}
defKeys.insert("fontSizeOther", QKeySequence());
defKeys.insert("alignLeft", QKeySequence());
defKeys.insert("alignCenter", QKeySequence());
defKeys.insert("alignRight", QKeySequence());
defKeys.insert("alignBlock", QKeySequence());
defKeys.insert("alignForced", QKeySequence());
 
for (uint i=0; i<=100 ; i+=10)
{
QString shadeName=QString("shade%1").arg(i);
defKeys.insert(shadeName, QKeySequence());
}
 
defKeys.insert("shadeOther", QKeySequence());
defKeys.insert("typeEffectNormal", QKeySequence());
defKeys.insert("typeEffectUnderline", QKeySequence());
defKeys.insert("typeEffectUnderlineWords", QKeySequence());
defKeys.insert("typeEffectStrikeThrough", QKeySequence());
defKeys.insert("typeEffectAllCaps", QKeySequence());
defKeys.insert("typeEffectSmallCaps", QKeySequence());
defKeys.insert("typeEffectSuperscript", QKeySequence());
defKeys.insert("typeEffectSubscript", QKeySequence());
defKeys.insert("typeEffectOutline", QKeySequence());
defKeys.insert("typeEffectShadow", QKeySequence());
 
defKeys.insert("styleImageEffects", CTRL+Key_E);
defKeys.insert("styleTabulators", QKeySequence());
 
//Item Menu
defKeys.insert("itemDuplicate", CTRL+ALT+SHIFT+Key_D);
defKeys.insert("itemMulDuplicate", QKeySequence());
defKeys.insert("itemDelete", CTRL+Key_K);
defKeys.insert("itemGroup", CTRL+Key_G);
defKeys.insert("itemUngroup", CTRL+SHIFT+Key_G);
defKeys.insert("itemLock", CTRL+Key_L);
defKeys.insert("itemLockSize", CTRL+SHIFT+Key_L);
defKeys.insert("itemPrintingEnabled", QKeySequence());
defKeys.insert("itemFlipH", QKeySequence());
defKeys.insert("itemFlipV", QKeySequence());
defKeys.insert("itemLowerToBottom", Key_End);
defKeys.insert("itemRaiseToTop", Key_Home);
defKeys.insert("itemLower", CTRL+Key_End);
defKeys.insert("itemRaise", CTRL+Key_Home);
defKeys.insert("itemSendToScrapbook", QKeySequence());
defKeys.insert("itemAttributes", QKeySequence());
defKeys.insert("itemImageInfo", QKeySequence());
defKeys.insert("itemImageIsVisible", QKeySequence());
defKeys.insert("itemUpdateImage", QKeySequence());
defKeys.insert("itemAdjustFrameToImage", QKeySequence());
defKeys.insert("itemExtendedImageProperties", QKeySequence());
defKeys.insert("itemPreviewLow", QKeySequence());
defKeys.insert("itemPreviewNormal", QKeySequence());
defKeys.insert("itemPreviewFull", QKeySequence());
defKeys.insert("itemPDFIsBookmark", QKeySequence());
defKeys.insert("itemPDFIsAnnotation", QKeySequence());
defKeys.insert("itemPDFAnnotationProps", QKeySequence());
defKeys.insert("itemPDFFieldProps", QKeySequence());
defKeys.insert("itemShapeEdit", QKeySequence());
defKeys.insert("itemAttachTextToPath", QKeySequence());
defKeys.insert("itemDetachTextFromPath", QKeySequence());
defKeys.insert("itemCombinePolygons", QKeySequence());
defKeys.insert("itemSplitPolygons", QKeySequence());
defKeys.insert("itemConvertToBezierCurve", QKeySequence());
defKeys.insert("itemConvertToImageFrame", QKeySequence());
defKeys.insert("itemConvertToOutlines", QKeySequence());
defKeys.insert("itemConvertToPolygon", QKeySequence());
defKeys.insert("itemConvertToTextFrame", QKeySequence());
 
//Insert Menu
defKeys.insert("insertGlyph", QKeySequence());
defKeys.insert("insertSampleText", QKeySequence());
 
//Page menu
defKeys.insert("pageInsert", QKeySequence());
defKeys.insert("pageImport", QKeySequence());
defKeys.insert("pageDelete", QKeySequence());
defKeys.insert("pageCopy", QKeySequence());
defKeys.insert("pageMove", QKeySequence());
defKeys.insert("pageApplyMasterPage", QKeySequence());
defKeys.insert("pageCopyToMasterPage", QKeySequence());
defKeys.insert("pageManageGuides", QKeySequence());
defKeys.insert("pageManageMargins", QKeySequence());
 
//View Menu
defKeys.insert("viewFitInWindow", CTRL+Key_0);
defKeys.insert("viewFit50", QKeySequence());
defKeys.insert("viewFit75", QKeySequence());
defKeys.insert("viewFit100", CTRL+Key_1);
defKeys.insert("viewFit200", QKeySequence());
defKeys.insert("viewFit20", QKeySequence());
defKeys.insert("viewShowMargins", QKeySequence());
defKeys.insert("viewShowFrames", QKeySequence());
defKeys.insert("viewShowImages", QKeySequence());
defKeys.insert("viewShowGrid", QKeySequence());
defKeys.insert("viewShowGuides", QKeySequence());
defKeys.insert("viewShowBaseline", QKeySequence());
defKeys.insert("viewShowTextChain", QKeySequence());
defKeys.insert("viewShowTextControls", QKeySequence());
defKeys.insert("viewShowRulers", CTRL+SHIFT+Key_R);
defKeys.insert("viewRulerMode", QKeySequence());
defKeys.insert("viewSnapToGrid", QKeySequence());
defKeys.insert("viewSnapToGuides", QKeySequence());
// defKeys.insert("viewNewView", QKeySequence());
 
//Tool menu
defKeys.insert("toolsProperties", Key_F2);
defKeys.insert("toolsOutline", QKeySequence());
defKeys.insert("toolsScrapbook", QKeySequence());
defKeys.insert("toolsLayers", Key_F6);
defKeys.insert("toolsPages", QKeySequence());
defKeys.insert("toolsBookmarks", QKeySequence());
defKeys.insert("toolsMeasurements", QKeySequence());
defKeys.insert("toolsActionHistory", QKeySequence());
defKeys.insert("toolsPreflightVerifier", QKeySequence());
defKeys.insert("toolsAlignDistribute", QKeySequence());
defKeys.insert("toolsToolbarTools", QKeySequence());
defKeys.insert("toolsToolbarPDF", QKeySequence());
 
//toolbar only items
defKeys.insert("toolsSelect", Key_C);
defKeys.insert("toolsInsertTextFrame", Key_T);
defKeys.insert("toolsInsertImageFrame", Key_I);
defKeys.insert("toolsInsertTableFrame", Key_A);
defKeys.insert("toolsInsertShape", Key_S);
defKeys.insert("toolsInsertPolygon", Key_P);
defKeys.insert("toolsInsertLine", Key_L);
defKeys.insert("toolsInsertBezier", Key_B);
defKeys.insert("toolsInsertFreehandLine", Key_F);
defKeys.insert("toolsRotate", Key_R);
defKeys.insert("toolsZoom", Key_Z);
defKeys.insert("toolsZoomIn", Key_Plus);
defKeys.insert("toolsZoomOut", Key_Minus);
defKeys.insert("toolsEditContents", Key_E);
defKeys.insert("toolsEditWithStoryEditor", CTRL+Key_Y);
defKeys.insert("toolsLinkTextFrame", Key_N);
defKeys.insert("toolsUnlinkTextFrame", Key_U);
defKeys.insert("toolsEyeDropper", Key_Y);
defKeys.insert("toolsCopyProperties", QKeySequence());
 
defKeys.insert("toolsEditWithStoryEditor", QKeySequence());
 
defKeys.insert("toolsInsertTextFrame", QKeySequence());
defKeys.insert("toolsInsertImageFrame", QKeySequence());
defKeys.insert("toolsInsertTableFrame", QKeySequence());
defKeys.insert("toolsInsertShape", QKeySequence());
defKeys.insert("toolsInsertPolygon", QKeySequence());
defKeys.insert("toolsInsertLine", QKeySequence());
defKeys.insert("toolsInsertBezier", QKeySequence());
defKeys.insert("toolsInsertFreehandLine", QKeySequence());
 
//Extras Menu
defKeys.insert("extrasManagePictures", QKeySequence());
defKeys.insert("extrasHyphenateText", QKeySequence());
defKeys.insert("extrasDeHyphenateText", QKeySequence());
defKeys.insert("extrasGenerateTableOfContents", QKeySequence());
 
//Windows Menu
defKeys.insert("windowsCascade", QKeySequence());
defKeys.insert("windowsTile", QKeySequence());
 
//Help Menu
defKeys.insert("helpAboutScribus", QKeySequence());
defKeys.insert("helpAboutPlugins", QKeySequence());
defKeys.insert("helpAboutQt", QKeySequence());
defKeys.insert("helpTooltips", QKeySequence());
defKeys.insert("helpManual", Key_F1);
 
//GUI
defKeys.insert("specialToggleAllPalettes", Key_F10);
defKeys.insert("specialToggleAllGuides", Key_F11);
//typography
defKeys.insert("unicodeSmartHyphen", QKeySequence());
defKeys.insert("unicodeNonBreakingHyphen", QKeySequence());
defKeys.insert("unicodeNonBreakingSpace", QKeySequence());
defKeys.insert("unicodePageNumber", QKeySequence());
defKeys.insert("unicodeNewLine", QKeySequence());
defKeys.insert("unicodeFrameBreak", QKeySequence());
defKeys.insert("unicodeColumnBreak", CTRL+Key_Return);
defKeys.insert("unicodeCopyRight", QKeySequence());
defKeys.insert("unicodeRegdTM", QKeySequence());
defKeys.insert("unicodeTM", QKeySequence());
defKeys.insert("unicodeSolidus", QKeySequence());
defKeys.insert("unicodeBullet", QKeySequence());
defKeys.insert("unicodeMidpoint", QKeySequence());
defKeys.insert("unicodeDashEm", QKeySequence());
defKeys.insert("unicodeDashEn", QKeySequence());
defKeys.insert("unicodeDashFigure", QKeySequence());
defKeys.insert("unicodeDashQuotation", QKeySequence());
 
defKeys.insert("unicodeQuoteApostrophe", QKeySequence());
defKeys.insert("unicodeQuoteStraight", QKeySequence());
defKeys.insert("unicodeQuoteSingleLeft", QKeySequence());
defKeys.insert("unicodeQuoteSingleRight", QKeySequence());
defKeys.insert("unicodeQuoteDoubleLeft", QKeySequence());
defKeys.insert("unicodeQuoteDoubleRight", QKeySequence());
defKeys.insert("unicodeQuoteSingleReversed", QKeySequence());
defKeys.insert("unicodeQuoteDoubleReversed", QKeySequence());
defKeys.insert("unicodeQuoteSingleLeftGuillemet", QKeySequence());
defKeys.insert("unicodeQuoteSingleRightGuillemet", QKeySequence());
defKeys.insert("unicodeQuoteDoubleLeftGuillemet", QKeySequence());
defKeys.insert("unicodeQuoteDoubleRightGuillemet", QKeySequence());
defKeys.insert("unicodeQuoteLowSingleComma", QKeySequence());
defKeys.insert("unicodeQuoteLowDoubleComma", QKeySequence());
defKeys.insert("unicodeQuoteCJKSingleLeft", QKeySequence());
defKeys.insert("unicodeQuoteCJKSingleRight", QKeySequence());
defKeys.insert("unicodeQuoteCJKDoubleLeft", QKeySequence());
defKeys.insert("unicodeQuoteCJKDoubleRight", QKeySequence());
 
defKeys.insert("unicodeSpaceEN", QKeySequence());
defKeys.insert("unicodeSpaceEM", QKeySequence());
defKeys.insert("unicodeSpaceThin", QKeySequence());
defKeys.insert("unicodeSpaceThick", QKeySequence());
defKeys.insert("unicodeSpaceMid", QKeySequence());
defKeys.insert("unicodeSpaceHair", QKeySequence());
 
defKeys.insert("unicodeSmartHyphen", CTRL+SHIFT+Key_Minus);
defKeys.insert("unicodeNonBreakingHyphen", CTRL+ALT+Key_Minus);
defKeys.insert("unicodeNonBreakingSpace", CTRL+Key_Space);
defKeys.insert("unicodePageNumber", CTRL+SHIFT+ALT+Key_P);
defKeys.insert("unicodeNewLine", SHIFT+Key_Return);
defKeys.insert("unicodeFrameBreak", QKeySequence());
defKeys.insert("unicodeColumnBreak", QKeySequence());
defKeys.insert("unicodeLigature_ff", QKeySequence());
defKeys.insert("unicodeLigature_fi", QKeySequence());
defKeys.insert("unicodeLigature_fl", QKeySequence());
defKeys.insert("unicodeLigature_ffi", QKeySequence());
defKeys.insert("unicodeLigature_ffl", QKeySequence());
defKeys.insert("unicodeLigature_ft", QKeySequence());
defKeys.insert("unicodeLigature_st", QKeySequence());
//Plugins
defKeys.insert("ExportAsImage", CTRL+SHIFT+Key_E);
defKeys.insert("NewFromDocumentTemplate", CTRL+ALT+Key_N);
defKeys.insert("SaveAsDocumentTemplate", CTRL+ALT+Key_S);
}
/branches/Version13x/Scribus/scribus/scimage.cpp
6,6 → 6,7
*/
#include "scimage.h"
#include "scribus.h"
#include "scribuscore.h"
#include <qtextstream.h>
#include <cassert>
#ifdef HAVE_CMS
2873,7 → 2874,7
load(tmpFile);
unlink(tmpFile);
setAlphaBuffer(true);
if (ScMW->HavePngAlpha != 0)
if (ScCore->havePNGAlpha() != 0)
{
for( int yi=0; yi < height(); ++yi )
{
2941,7 → 2942,7
QImage image;
image.load(tmpFile);
image.setAlphaBuffer(true);
if (ScMW->HavePngAlpha != 0)
if (ScCore->havePNGAlpha() != 0)
{
int wi = image.width();
int hi = image.height();
3547,7 → 3548,7
load(tmpFile);
unlink(tmpFile);
setAlphaBuffer(true);
if (ScMW->HavePngAlpha != 0)
if (ScCore->havePNGAlpha() != 0)
{
for( int yi=0; yi < height(); ++yi )
{
3630,7 → 3631,7
QImage image;
image.load(tmpFile);
image.setAlphaBuffer(true);
if (ScMW->HavePngAlpha != 0)
if (ScCore->havePNGAlpha() != 0)
{
int wi = image.width();
int hi = image.height();
4233,19 → 4234,19
QCString profilePath;
if (isCMYK)
{
if (ScMW->InputProfilesCMYK.contains(Prof))
if (ScCore->InputProfilesCMYK.contains(Prof))
imgInfo.profileName = Prof;
else
imgInfo.profileName = ScMW->doc->CMSSettings.DefaultImageCMYKProfile;
profilePath = ScMW->InputProfilesCMYK[imgInfo.profileName].local8Bit();
profilePath = ScCore->InputProfilesCMYK[imgInfo.profileName].local8Bit();
}
else
{
if (ScMW->InputProfiles.contains(Prof))
if (ScCore->InputProfiles.contains(Prof))
imgInfo.profileName = Prof;
else
imgInfo.profileName = ScMW->doc->CMSSettings.DefaultImageRGBProfile;
profilePath = ScMW->InputProfiles[imgInfo.profileName].local8Bit();
profilePath = ScCore->InputProfiles[imgInfo.profileName].local8Bit();
}
inputProf = cmsOpenProfileFromFile(profilePath.data(), "r");
}
/branches/Version13x/Scribus/scribus/pageitem_imageframe.cpp
194,4 → 194,4
ScribusView* view = m_Doc->view();
view->updateContents(getRedrawBounding(view->scale()));
}
}
}
/branches/Version13x/Scribus/scribus/scribus.cpp
56,6 → 56,7
 
#include "sccombobox.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "scribus.h"
#include "scribus.moc"
#include "newfile.h"
180,40 → 181,40
using namespace std;
 
#ifdef HAVE_CMS
#include "cmserrorhandling.h"
cmsHPROFILE CMSoutputProf;
cmsHPROFILE CMSprinterProf;
cmsHTRANSFORM stdTransG;
cmsHTRANSFORM stdProofG;
cmsHTRANSFORM stdTransImgG;
cmsHTRANSFORM stdProofImgG;
cmsHTRANSFORM stdTransCMYKG;
cmsHTRANSFORM stdProofCMYKG;
cmsHTRANSFORM stdTransRGBG;
cmsHTRANSFORM stdProofGCG;
cmsHTRANSFORM stdProofCMYKGCG;
bool BlackPoint;
bool SoftProofing;
bool Gamut;
bool SCRIBUS_API CMSuse;
int IntentMonitor;
int IntentPrinter;
extern cmsHPROFILE CMSoutputProf;
extern cmsHPROFILE CMSprinterProf;
extern cmsHTRANSFORM stdTransG;
extern cmsHTRANSFORM stdProofG;
extern cmsHTRANSFORM stdTransImgG;
extern cmsHTRANSFORM stdProofImgG;
extern cmsHTRANSFORM stdTransCMYKG;
extern cmsHTRANSFORM stdProofCMYKG;
extern cmsHTRANSFORM stdTransRGBG;
extern cmsHTRANSFORM stdProofGCG;
extern cmsHTRANSFORM stdProofCMYKGCG;
extern bool BlackPoint;
extern bool SoftProofing;
extern bool Gamut;
extern bool SCRIBUS_API CMSuse;
extern int IntentMonitor;
extern int IntentPrinter;
#endif
bool CMSavail;
extern bool CMSavail;
 
 
bool previewDinUse;
bool printDinUse;
 
QString DocDir;
 
extern ScribusCore* ScCore;
extern ScribusQApp* ScQApp;
extern bool emergencyActivated;
 
ScribusMainWindow::ScribusMainWindow()
{
scribusInitialized=false;
actionManager=NULL;
scrMenuMgr=NULL;
undoManager=NULL;
prefsManager=NULL;
#ifdef Q_WS_MAC
noIcon = loadIcon("noicon.xpm");
223,15 → 224,15
/*
* retval 0 - ok, 1 - no fonts, ...
*/
int ScribusMainWindow::initScribus(bool showSplash, bool showFontInfo, const QString newGuiLanguage, const QString prefsUserFile)
int ScribusMainWindow::initScMW(bool primaryMainWindow)
{
CommonStrings::languageChange();
int retVal=0;
ExternalApp = 0;
 
// CommonStrings::languageChange();
previewDinUse = false;
printDinUse = false;
guiLanguage = newGuiLanguage;
initSplash(showSplash);
// guiLanguage = newGuiLanguage;
// initSplash(showSplash);
setUsesBigPixmaps(true);
CurrStED = NULL;
setCaption( tr("Scribus " VERSION));
244,107 → 245,82
scrWindowsActions.clear();
scrLayersActions.clear();
scrMenuMgr = new MenuManager(this->menuBar());
 
prefsManager = PrefsManager::instance();
prefsManager->setup();
PrefsPfad = prefsManager->preferencesLocation();
 
 
objectSpecificUndo = false;
undoManager = UndoManager::instance();
objectSpecificUndo = false;
pluginManager = new PluginManager();
tocGenerator = new TOCGenerator();
actionManager = new ActionManager(this, "actionManager");
 
initDefaultValues();
initMenuBar();
initStatusBar();
initToolBars();
qApp->processEvents();
 
BuFromApp = false;
actionManager = new ActionManager(this, "actionManager");
initMenuBar();
initToolBars();
buildFontMenu();
ScCore->pluginManager->setupPluginActions(this);
ScCore->pluginManager->languageChange();
//done in core: initKeyboardShortcuts();
if (primaryMainWindow)
ScCore->setSplashStatus( tr("Setting up Shortcuts") );
SetShortCut();
 
#ifdef QT_MAC
bool haveFonts=initFonts(true);
#else
bool haveFonts=initFonts(showFontInfo);
#endif
if (!haveFonts)
retVal=1;
else
{
buildFontMenu();
prefsManager->initDefaults();
prefsManager->initDefaultGUIFont(qApp->font());
prefsManager->initArrowStyles();
resize(610, 600);
QVBox* vb = new QVBox( this );
vb->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
wsp = new QWorkspace( vb );
setCentralWidget( vb );
connect(wsp, SIGNAL(windowActivated(QWidget *)), this, SLOT(newActWin(QWidget *)));
//Connect windows cascade and tile actions to the workspace after its created. Only depends on wsp created.
connect( scrActions["windowsCascade"], SIGNAL(activated()) , wsp, SLOT(cascade()) );
connect( scrActions["windowsTile"], SIGNAL(activated()) , wsp, SLOT(tile()) );
resize(610, 600);
QVBox* vb = new QVBox( this );
vb->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
wsp = new QWorkspace( vb );
setCentralWidget( vb );
connect(wsp, SIGNAL(windowActivated(QWidget *)), this, SLOT(newActWin(QWidget *)));
//Connect windows cascade and tile actions to the workspace after its created. Only depends on wsp created.
connect( scrActions["windowsCascade"], SIGNAL(activated()) , wsp, SLOT(cascade()) );
connect( scrActions["windowsTile"], SIGNAL(activated()) , wsp, SLOT(tile()) );
initPalettes();
prefsManager->setupMainWindow(this);
 
initPalettes();
if (primaryMainWindow)
ScCore->setSplashStatus( tr("Initializing Story Editor") );
storyEditor = new StoryEditor(this);
 
fileWatcher = new FileWatcher(this);
DocDir = prefsManager->documentDir();
 
setSplashStatus( tr("Initializing Plugins") );
pluginManager->initPlugs();
setSplashStatus( tr("Initializing Keyboard Shortcuts") );
initKeyboardShortcuts();
setSplashStatus( tr("Reading Preferences") );
if (prefsUserFile.isNull())
prefsManager->ReadPrefs();
else
prefsManager->ReadPrefs(prefsUserFile);
setSplashStatus( tr("Initializing Story Editor") );
storyEditor = new StoryEditor(this);
 
HaveGS = testGSAvailability();
HavePngAlpha = testGSDeviceAvailability("pngalpha");
HaveTiffSep = testGSDeviceAvailability("tiffsep");
DocDir = prefsManager->documentDir();
if (primaryMainWindow)
ScCore->setSplashStatus( tr("Initializing Hyphenator") );
QString preLang = prefsManager->appPrefs.Language;
initHyphenator();
if (Sprachen.contains(preLang))
prefsManager->appPrefs.Language = preLang;
if (primaryMainWindow)
ScCore->setSplashStatus( tr("Reading Scrapbook") );
initScrapbook();
 
setSplashStatus( tr("Reading ICC Profiles") );
CMSavail = false;
GetCMSProfiles();
initCMS();
scrActions["helpTooltips"]->setOn(prefsManager->appPrefs.showToolTips);
ToggleTips();
emit prefsChanged();
 
setSplashStatus( tr("Initializing Hyphenator") );
QString preLang = prefsManager->appPrefs.Language;
initHyphenator();
if (Sprachen.contains(preLang))
prefsManager->appPrefs.Language = preLang;
setSplashStatus( tr("Reading Scrapbook") );
initScrapbook();
setSplashStatus( tr("Setting up Shortcuts") );
SetShortCut();
scrActions["helpTooltips"]->setOn(prefsManager->appPrefs.showToolTips);
ToggleTips();
emit prefsChanged();
connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), this, SLOT(removeRecent(QString)));
connect(this, SIGNAL(TextIFont(QString)), this, SLOT(AdjustFontMenu(QString)));
connect(this, SIGNAL(TextIFont(QString)), propertiesPalette, SLOT(setFontFace(QString)));
connect(this, SIGNAL(TextISize(int)), this, SLOT(setFSizeMenu(int)));
connect(this, SIGNAL(TextISize(int)), propertiesPalette, SLOT(setSize(int)));
connect(this, SIGNAL(TextUSval(int)), propertiesPalette, SLOT(setExtra(int)));
connect(this, SIGNAL(TextStil(int)), propertiesPalette, SLOT(setStil(int)));
connect(this, SIGNAL(TextScale(int)), propertiesPalette, SLOT(setTScale(int)));
connect(this, SIGNAL(TextScaleV(int)), propertiesPalette, SLOT(setTScaleV(int)));
connect(this, SIGNAL(TextBase(int)), propertiesPalette, SLOT(setTBase(int)));
connect(this, SIGNAL(TextShadow(int, int )), propertiesPalette, SLOT(setShadowOffs(int, int )));
connect(this, SIGNAL(TextOutline(int)), propertiesPalette, SLOT(setOutlineW(int)));
connect(this, SIGNAL(TextUnderline(int, int)), propertiesPalette, SLOT(setUnderline(int, int)));
connect(this, SIGNAL(TextStrike(int, int)), propertiesPalette, SLOT(setStrike(int, int)));
connect(this, SIGNAL(TextFarben(QString, QString, int, int)), propertiesPalette, SLOT(setActFarben(QString, QString, int, int)));
 
connect(fileWatcher, SIGNAL(fileDeleted(QString )), this, SLOT(removeRecent(QString)));
connect(this, SIGNAL(TextIFont(QString)), this, SLOT(AdjustFontMenu(QString)));
connect(this, SIGNAL(TextIFont(QString)), propertiesPalette, SLOT(setFontFace(QString)));
connect(this, SIGNAL(TextISize(int)), this, SLOT(setFSizeMenu(int)));
connect(this, SIGNAL(TextISize(int)), propertiesPalette, SLOT(setSize(int)));
connect(this, SIGNAL(TextUSval(int)), propertiesPalette, SLOT(setExtra(int)));
connect(this, SIGNAL(TextStil(int)), propertiesPalette, SLOT(setStil(int)));
connect(this, SIGNAL(TextScale(int)), propertiesPalette, SLOT(setTScale(int)));
connect(this, SIGNAL(TextScaleV(int)), propertiesPalette, SLOT(setTScaleV(int)));
connect(this, SIGNAL(TextBase(int)), propertiesPalette, SLOT(setTBase(int)));
connect(this, SIGNAL(TextShadow(int, int )), propertiesPalette, SLOT(setShadowOffs(int, int )));
connect(this, SIGNAL(TextOutline(int)), propertiesPalette, SLOT(setOutlineW(int)));
connect(this, SIGNAL(TextUnderline(int, int)), propertiesPalette, SLOT(setUnderline(int, int)));
connect(this, SIGNAL(TextStrike(int, int)), propertiesPalette, SLOT(setStrike(int, int)));
connect(this, SIGNAL(TextFarben(QString, QString, int, int)), propertiesPalette, SLOT(setActFarben(QString, QString, int, int)));
}
closeSplash();
scribusInitialized=true;
//pluginManager->languageChange();
setAcceptDrops(true);
return retVal;
}
353,48 → 329,7
{
}
 
void ScribusMainWindow::initSplash(bool showSplash)
{
if (showSplash)
{
splashScreen = new SplashScreen();
if (splashScreen != NULL && splashScreen->isShown())
setSplashStatus(QObject::tr("Initializing..."));
}
else
splashScreen = NULL;
}
 
void ScribusMainWindow::setSplashStatus(const QString& newText)
{
if (splashScreen != NULL)
splashScreen->setStatus( newText );
qApp->processEvents();
}
 
void ScribusMainWindow::showSplash(bool shown)
{
if (splashScreen!=NULL && shown!=splashScreen->isShown())
splashScreen->setShown(shown);
}
 
bool ScribusMainWindow::splashShowing() const
{
if (splashScreen != NULL)
return splashScreen->isShown();
return false;
}
 
void ScribusMainWindow::closeSplash()
{
if (splashScreen!=NULL)
{
splashScreen->close();
delete splashScreen;
splashScreen = NULL;
}
}
 
void ScribusMainWindow::initToolBars()
{
fileToolBar = new ScToolBar(tr("File"), "File", this);
424,29 → 359,9
 
}
 
//Returns false when there are no fonts
const bool ScribusMainWindow::initFonts(bool showFontInfo)
{
setSplashStatus( tr("Searching for Fonts") );
bool haveFonts=prefsManager->GetAllFonts(showFontInfo);
if (!haveFonts)
{
if (splashScreen!=NULL)
splashScreen->close(); // 10/10/2004 pv fix #1200
QString mess = tr("There are no fonts found on your system.");
mess += "\n" + tr("Exiting now.");
QMessageBox::critical(this, tr("Fatal Error"), mess, 1, 0, 0);
}
else
setSplashStatus( tr("Font System Initialized") );
return haveFonts;
}
 
void ScribusMainWindow::initDefaultValues()
{
dirs = prefsManager->prefsFile->getContext("dirs");
HaveDoc = false;
singleClose = false;
ScriptRunning = false;
view = NULL;
doc = NULL;
574,15 → 489,15
 
void ScribusMainWindow::initScrapbook()
{
QString scrapbookFileO = QDir::convertSeparators(PrefsPfad+"/scrap13.scs");
QString scrapbookFileO = QDir::convertSeparators(prefsManager->preferencesLocation()+"/scrap13.scs");
QFileInfo scrapbookFileInfoO = QFileInfo(scrapbookFileO);
if (scrapbookFileInfoO.exists())
{
scrapbookPalette->readOldContents(scrapbookFileO, QDir::convertSeparators(PrefsPfad+"/scrapbook/main"));
scrapbookPalette->readOldContents(scrapbookFileO, QDir::convertSeparators(prefsManager->preferencesLocation()+"/scrapbook/main"));
QDir d = QDir();
d.rename(scrapbookFileO, QDir::convertSeparators(PrefsPfad+"/scrap13.backup"));
d.rename(scrapbookFileO, QDir::convertSeparators(prefsManager->preferencesLocation()+"/scrap13.backup"));
}
QString scrapbookFile = QDir::convertSeparators(PrefsPfad+"/scrapbook/main");
QString scrapbookFile = QDir::convertSeparators(prefsManager->preferencesLocation()+"/scrapbook/main");
QFileInfo scrapbookFileInfo = QFileInfo(scrapbookFile);
if (scrapbookFileInfo.exists())
scrapbookPalette->readContents(scrapbookFile);
590,11 → 505,6
scrapbookPalette->setOpenScrapbooks(prefsManager->appPrefs.RecentScrapbooks);
}
 
const QString ScribusMainWindow::getGuiLanguage()
{
return guiLanguage;
}
 
bool ScribusMainWindow::warningVersion(QWidget *parent)
{
bool retval = false;
1743,7 → 1653,6
disconnect(wsp, SIGNAL(windowActivated(QWidget *)), this, SLOT(newActWin(QWidget *)));
if (!windows.isEmpty())
{
singleClose = true;
uint windowCount=windows.count();
for ( uint i = 0; i < windowCount; ++i )
{
1753,7 → 1662,6
if (tw == ActWin)
{
ce->ignore();
singleClose = false;
connect(wsp, SIGNAL(windowActivated(QWidget *)), this, SLOT(newActWin(QWidget *)));
return;
}
1772,7 → 1680,7
guidePalette->hide();
 
// Clean up plugins, THEN save prefs to disk
pluginManager->cleanupPlugins();
ScCore->pluginManager->cleanupPlugins();
prefsManager->appPrefs.RecentScrapbooks.clear();
prefsManager->appPrefs.RecentScrapbooks = scrapbookPalette->getOpenScrapbooks();
if (!emergencyActivated)
1940,8 → 1848,8
view->show();
}
connect(w, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
connect(fileWatcher, SIGNAL(fileChanged(QString)), doc, SLOT(updatePict(QString)));
connect(fileWatcher, SIGNAL(fileDeleted(QString)), doc, SLOT(removePict(QString)));
connect(ScCore->fileWatcher, SIGNAL(fileChanged(QString)), doc, SLOT(updatePict(QString)));
connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString)), doc, SLOT(removePict(QString)));
scrActions["fileSave"]->setEnabled(false);
undoManager->switchStack(doc->DocName);
styleManager->currentDoc(doc);
2022,7 → 1930,7
{
actionManager->disconnectNewViewActions();
disconnect(view, SIGNAL(signalGuideInformation(int, double)), alignDistributePalette, SLOT(setGuide(int, double)));
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
{
disconnect(doc->m_Selection, SIGNAL(selectionIsMultiple(bool)), 0, 0);
//disconnect(doc->m_Selection, SIGNAL(empty()), 0, 0);
2035,7 → 1943,7
actionManager->connectNewDocActions(doc);
styleManager->currentDoc(doc);
connect(view, SIGNAL(signalGuideInformation(int, double)), alignDistributePalette, SLOT(setGuide(int, double)));
if (ScQApp->usingGUI())
if (ScCore->usingGUI())
{
connect(doc->m_Selection, SIGNAL(selectionIsMultiple(bool)), propertiesPalette, SLOT( setMultipleSelection(bool)));
//connect(doc->m_Selection, SIGNAL(empty()), propertiesPalette, SLOT( unsetItem()));
2248,7 → 2156,7
scrActions["pageImport"]->setEnabled(true);
//scrActions["toolsPreflightVerifier"]->setEnabled(true);
 
if ( HaveGS==0 || ScQApp->isWinGUI() )
if ( ScCore->haveGS()==0 || ScCore->isWinGUI() )
scrActions["PrintPreview"]->setEnabled(true);
 
if (scrActions["SaveAsDocumentTemplate"])
2884,7 → 2792,7
if (RecentDocs.findIndex(fn) == -1)
{
RecentDocs.prepend(fn);
fileWatcher->addFile(fn);
ScCore->fileWatcher->addFile(fn);
}
else
{
2899,8 → 2807,8
if (RecentDocs.findIndex(fn) != -1)
{
RecentDocs.remove(fn);
if (!fileWatcher->isActive())
fileWatcher->removeFile(fn);
if (!ScCore->fileWatcher->isActive())
ScCore->fileWatcher->removeFile(fn);
}
rebuildRecentFileMenu();
}
2911,7 → 2819,7
if (!fd.exists())
{
RecentDocs.remove(fn);
fileWatcher->removeFile(fn);
ScCore->fileWatcher->removeFile(fn);
rebuildRecentFileMenu();
return;
}
3129,7 → 3037,7
if (CMSavail && doc->CMSSettings.CMSinUse)
{
recalcColors();
doc->RecalcPictures(&InputProfiles, &InputProfilesCMYK);
doc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK);
}
uint docItemsCount=doc->Items->count();
for (uint i = oldItemsCount; i < docItemsCount; ++i)
3252,7 → 3160,7
bool loadSuccess=fileLoader->LoadFile();
//Do the font replacement check from here, when we have a GUI. TODO do this also somehow without the GUI
//This also gives the user the opportunity to cancel the load when finding theres a replacement required.
if (loadSuccess && ScQApp->usingGUI())
if (loadSuccess && ScCore->usingGUI())
loadSuccess=fileLoader->postLoad();
if(!loadSuccess)
{
3324,7 → 3232,7
bool cmsWarning = false;
QStringList missing;
QStringList replacement;
if (!InputProfiles.contains(doc->CMSSettings.DefaultImageRGBProfile))
if (!ScCore->InputProfiles.contains(doc->CMSSettings.DefaultImageRGBProfile))
{
cmsWarning = true;
missing.append(doc->CMSSettings.DefaultImageRGBProfile);
3331,7 → 3239,7
replacement.append(prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile);
doc->CMSSettings.DefaultImageRGBProfile = prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile;
}
if (!InputProfiles.contains(doc->CMSSettings.DefaultSolidColorProfile))
if (!ScCore->InputProfiles.contains(doc->CMSSettings.DefaultSolidColorProfile))
{
cmsWarning = true;
missing.append(doc->CMSSettings.DefaultSolidColorProfile);
3338,7 → 3246,7
replacement.append(prefsManager->appPrefs.DCMSset.DefaultSolidColorProfile);
doc->CMSSettings.DefaultSolidColorProfile = prefsManager->appPrefs.DCMSset.DefaultSolidColorProfile;
}
if (!MonitorProfiles.contains(doc->CMSSettings.DefaultMonitorProfile))
if (!ScCore->MonitorProfiles.contains(doc->CMSSettings.DefaultMonitorProfile))
{
cmsWarning = true;
missing.append(doc->CMSSettings.DefaultMonitorProfile);
3345,7 → 3253,7
replacement.append(prefsManager->appPrefs.DCMSset.DefaultMonitorProfile);
doc->CMSSettings.DefaultMonitorProfile = prefsManager->appPrefs.DCMSset.DefaultMonitorProfile;
}
if (!PrinterProfiles.contains(doc->CMSSettings.DefaultPrinterProfile))
if (!ScCore->PrinterProfiles.contains(doc->CMSSettings.DefaultPrinterProfile))
{
cmsWarning = true;
missing.append(doc->CMSSettings.DefaultPrinterProfile);
3352,7 → 3260,7
replacement.append(prefsManager->appPrefs.DCMSset.DefaultPrinterProfile);
doc->CMSSettings.DefaultPrinterProfile = prefsManager->appPrefs.DCMSset.DefaultPrinterProfile;
}
if (!PrinterProfiles.contains(doc->PDF_Options.PrintProf))
if (!ScCore->PrinterProfiles.contains(doc->PDF_Options.PrintProf))
{
cmsWarning = true;
missing.append(doc->PDF_Options.PrintProf);
3359,7 → 3267,7
replacement.append(prefsManager->appPrefs.DCMSset.DefaultPrinterProfile);
doc->PDF_Options.PrintProf = doc->CMSSettings.DefaultPrinterProfile;
}
if (!InputProfiles.contains(doc->PDF_Options.ImageProf))
if (!ScCore->InputProfiles.contains(doc->PDF_Options.ImageProf))
{
cmsWarning = true;
missing.append(doc->PDF_Options.ImageProf);
3366,7 → 3274,7
replacement.append(prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile);
doc->PDF_Options.ImageProf = doc->CMSSettings.DefaultImageRGBProfile;
}
if (!InputProfiles.contains(doc->PDF_Options.SolidProf))
if (!ScCore->InputProfiles.contains(doc->PDF_Options.SolidProf))
{
cmsWarning = true;
missing.append(doc->PDF_Options.SolidProf);
3393,7 → 3301,7
Gamut = doc->CMSSettings.GamutCheck;
IntentPrinter = doc->CMSSettings.DefaultIntentPrinter;
IntentMonitor = doc->CMSSettings.DefaultIntentMonitor;
if (doc->OpenCMSProfiles(InputProfiles, MonitorProfiles, PrinterProfiles))
if (doc->OpenCMSProfiles(ScCore->InputProfiles, ScCore->MonitorProfiles, ScCore->PrinterProfiles))
{
CMSuse = doc->CMSSettings.CMSinUse;
stdProofG = doc->stdProof;
3427,7 → 3335,7
if (doc->CMSSettings.CMSinUse)
{
recalcColors();
doc->RecalcPictures(&InputProfiles, &InputProfilesCMYK);
doc->RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK);
}
}
else
3595,8 → 3503,8
view->GotoPage(0);
connect(wsp, SIGNAL(windowActivated(QWidget *)), this, SLOT(newActWin(QWidget *)));
connect(w, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
connect(fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
connect(fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
connect(ScCore->fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
connect(undoManager, SIGNAL(undoRedoDone()), view, SLOT(DrawNew()));
actionManager->disconnectNewDocActions();
actionManager->connectNewDocActions(doc);
3623,7 → 3531,7
bool ScribusMainWindow::postLoadDoc()
{
//FIXME Just return for now, if we arent using the GUI
if (!ScQApp->usingGUI())
if (!ScCore->usingGUI())
return false;
return true;
}
3675,13 → 3583,13
QString docDir = ".";
QString prefsDocDir=prefsManager->documentDir();
if (!prefsDocDir.isEmpty())
docDir = dirs->get("images", prefsDocDir);
docDir = prefsManager->prefsFile->getContext("dirs")->get("images", prefsDocDir);
else
docDir = dirs->get("images", ".");
docDir = prefsManager->prefsFile->getContext("dirs")->get("images", ".");
QString fileName = CFileDialog( docDir, tr("Open"), formatD, "", true);
if (!fileName.isEmpty())
{
dirs->set("images", fileName.left(fileName.findRev("/")));
prefsManager->prefsFile->getContext("dirs")->set("images", fileName.left(fileName.findRev("/")));
currItem->EmProfile = "";
currItem->pixm.imgInfo.isRequest = false;
currItem->UseEmbedded = true;
3849,8 → 3757,8
 
bool ScribusMainWindow::DoFileSave(QString fn)
{
fileWatcher->forceScan();
fileWatcher->stop();
ScCore->fileWatcher->forceScan();
ScCore->fileWatcher->stop();
ReorgFonts();
mainWindowStatusLabel->setText( tr("Saving..."));
mainWindowProgressBar->reset();
3866,7 → 3774,7
}
mainWindowStatusLabel->setText("");
mainWindowProgressBar->reset();
fileWatcher->start();
ScCore->fileWatcher->start();
return ret;
}
 
3873,7 → 3781,6
bool ScribusMainWindow::slotFileClose()
{
ScribusWin* tw = ActWin;
singleClose = false;
ActWin->close();
if (tw == ActWin)
return false;
3894,8 → 3801,8
--doc->viewCount;
closeActiveWindowMasterPageEditor();
setAppMode(modeNormal);
disconnect(fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
disconnect(fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
disconnect(ScCore->fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
disconnect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
view->close();
delete view;
view = NULL;
3909,13 → 3816,13
doc->autoSaveTimer->stop();
disconnect(doc->autoSaveTimer, SIGNAL(timeout()), doc->WinHan, SLOT(slotAutoSave()));
disconnect(doc->WinHan, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
disconnect(fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
disconnect(fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
disconnect(ScCore->fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
disconnect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
for (uint a = 0; a < doc->Items->count(); ++a)
{
PageItem *currItem = doc->Items->at(a);
if (currItem->PicAvail)
fileWatcher->removeFile(currItem->Pfile);
ScCore->fileWatcher->removeFile(currItem->Pfile);
}
if (CMSavail)
doc->CloseCMSProfiles();
4007,7 → 3914,7
guidePalette->setEnabled(false);
layerPalette->ClearInhalt();
docCheckerPalette->buildErrorList(0);
fileWatcher->removeFile(fName);
ScCore->fileWatcher->removeFile(fName);
HaveDoc--;
view = NULL;
delete doc;
4182,13 → 4089,13
doc->getUsedFonts(&ReallyUsed);
ColorList usedColors;
doc->getUsedColors(usedColors);
fileWatcher->forceScan();
fileWatcher->stop();
ScCore->fileWatcher->forceScan();
ScCore->fileWatcher->stop();
PSLib *dd = new PSLib(true, prefsManager->appPrefs.AvailFonts, ReallyUsed, usedColors, false, options->useSpotColors);
if (dd != NULL)
{
if (!options->toFile)
filename = PrefsPfad+"/tmp.ps";
filename = prefsManager->preferencesLocation()+"/tmp.ps";
else
{
qApp->setOverrideCursor(QCursor(arrowCursor), true);
4195,7 → 4102,7
if (!overwrite(this, filename))
{
delete dd;
fileWatcher->start();
ScCore->fileWatcher->start();
return true;
}
qApp->setOverrideCursor(QCursor(waitCursor), true);
4254,7 → 4161,7
retw = false;
delete dd;
}
fileWatcher->start();
ScCore->fileWatcher->start();
return retw;
}
 
4261,7 → 4168,7
void ScribusMainWindow::slotFileQuit()
{
propertiesPalette->unsetDoc();
pluginManager->savePreferences();
ScCore->pluginManager->savePreferences();
close();
}
 
4788,7 → 4695,7
 
void ScribusMainWindow::slotOnlineHelp()
{
HelpBrowser *dia = new HelpBrowser(0, tr("Scribus Manual"), ScMW->guiLanguage);
HelpBrowser *dia = new HelpBrowser(0, tr("Scribus Manual"), ScCore->getGuiLanguage());
dia->show();
}
 
4804,13 → 4711,13
QString wdir = ".";
QString prefsDocDir=prefsManager->documentDir();
if (!prefsDocDir.isEmpty())
wdir = dirs->get("save_text", prefsDocDir);
wdir = prefsManager->prefsFile->getContext("dirs")->get("save_text", prefsDocDir);
else
wdir = dirs->get("save_text", ".");
wdir = prefsManager->prefsFile->getContext("dirs")->get("save_text", ".");
QString fn = CFileDialog( wdir, tr("Save as"), tr("Text Files (*.txt);;All Files(*)"), "", false, false, false, true);
if (!fn.isEmpty())
{
dirs->set("save_text", fn.left(fn.findRev("/")));
prefsManager->prefsFile->getContext("dirs")->set("save_text", fn.left(fn.findRev("/")));
Serializer *se = new Serializer(fn);
se->PutText(doc->m_Selection->itemAt(0));
se->Write(LoadEnc);
6930,7 → 6837,7
FontSub->RebuildList(0);
propertiesPalette->Fonts->RebuildList(0);
 
GetCMSProfiles();
ScCore->getCMSProfiles();
SetShortCut();
emit prefsChanged();
}
6940,7 → 6847,7
void ScribusMainWindow::ShowSubs()
{
QString mess;
if (HaveGS != 0)
if (ScCore->haveGS() != 0)
{
mess = tr("The following programs are missing:")+"\n\n";
#ifndef _WIN32
6986,13 → 6893,13
{
PrefsContext* prefs = PrefsManager::instance()->prefsFile->getContext("print_options");
QString currentPrinter = prefs->get("CurrentPrn");
if ( PPreview::usePostscriptPreview(currentPrinter) && ( HaveGS != 0 ) )
if ( PPreview::usePostscriptPreview(currentPrinter) && ( ScCore->haveGS() != 0 ) )
{
QString mess = tr("Ghostscript is missing : Postscript Print Preview is not available")+"\n\n";
QMessageBox::warning(this, CommonStrings::trWarning, mess, 1, 0, 0);
return;
}
PPreview *dia = new PPreview(this, view, doc, HavePngAlpha, HaveTiffSep, currentPrinter);
PPreview *dia = new PPreview(this, view, doc, ScCore->havePNGAlpha(), ScCore->haveTIFFSep(), currentPrinter);
previewDinUse = true;
connect(dia, SIGNAL(doPrint()), this, SLOT(slotReallyPrint()));
dia->exec();
7001,7 → 6908,7
prefsManager->appPrefs.PrPr_AlphaText = dia->AliasText->isChecked();
prefsManager->appPrefs.PrPr_AlphaGraphics = dia->AliasGr->isChecked();
prefsManager->appPrefs.PrPr_Transparency = dia->AliasTr->isChecked();
if ( HaveTiffSep != 0 || !dia->postscriptPreview )
if ( ScCore->haveTIFFSep() != 0 || !dia->postscriptPreview )
{
prefsManager->appPrefs.PrPr_C = dia->EnableCMYK_C->isChecked();
prefsManager->appPrefs.PrPr_M = dia->EnableCMYK_M->isChecked();
7019,14 → 6926,14
disconnect(dia, SIGNAL(doPrint()), this, SLOT(slotReallyPrint()));
previewDinUse = false;
delete dia;
QFile::remove(PrefsPfad+"/tmp.ps");
QFile::remove(PrefsPfad+"/sc.png");
QDir d(PrefsPfad+"/", "sc.tif*", QDir::Name, QDir::Files | QDir::NoSymLinks);
QFile::remove(prefsManager->preferencesLocation()+"/tmp.ps");
QFile::remove(prefsManager->preferencesLocation()+"/sc.png");
QDir d(prefsManager->preferencesLocation()+"/", "sc.tif*", QDir::Name, QDir::Files | QDir::NoSymLinks);
if ((d.exists()) && (d.count() != 0))
{
for (uint dc = 0; dc < d.count(); dc++)
{
QFile::remove(PrefsPfad +"/" + d[dc]);
QFile::remove(prefsManager->preferencesLocation() +"/" + d[dc]);
}
}
}
7075,8 → 6982,8
doc->getUsedFonts(&ReallyUsed);
ColorList usedColors;
doc->getUsedColors(usedColors);
fileWatcher->forceScan();
fileWatcher->stop();
ScCore->fileWatcher->forceScan();
ScCore->fileWatcher->stop();
PSLib *dd = new PSLib(false, prefsManager->appPrefs.AvailFonts, ReallyUsed, usedColors, false, true);
if (dd != NULL)
{
7087,7 → 6994,7
delete dd;
qApp->setOverrideCursor(QCursor(arrowCursor), true);
}
fileWatcher->start();
ScCore->fileWatcher->start();
return return_value;
}
 
7146,13 → 7053,13
QString wdir = ".";
QString prefsDocDir=prefsManager->documentDir();
if (!prefsDocDir.isEmpty())
wdir = dirs->get("eps", prefsDocDir);
wdir = prefsManager->prefsFile->getContext("dirs")->get("eps", prefsDocDir);
else
wdir = dirs->get("eps", ".");
wdir = prefsManager->prefsFile->getContext("dirs")->get("eps", ".");
QString fn = CFileDialog( wdir, tr("Save as"), tr("EPS Files (*.eps);;All Files (*)"), fna, false, false);
if (!fn.isEmpty())
{
dirs->set("eps", fn.left(fn.findRev("/")));
prefsManager->prefsFile->getContext("dirs")->set("eps", fn.left(fn.findRev("/")));
if (overwrite(this, fn))
{
if (!DoSaveAsEps(fn))
7164,10 → 7071,10
bool ScribusMainWindow::getPDFDriver(const QString & fn, const QString & nam, int Components,
const std::vector<int> & pageNs, const QMap<int,QPixmap> & thumbs)
{
fileWatcher->forceScan();
fileWatcher->stop();
ScCore->fileWatcher->forceScan();
ScCore->fileWatcher->stop();
bool ret = PDFlib(*doc).doExport(fn, nam, Components, pageNs, thumbs);
fileWatcher->start();
ScCore->fileWatcher->start();
return ret;
}
 
7238,7 → 7145,7
}
doc->PDF_Options.SubsetList = tmpEm;
}
PDFExportDialog dia(this, doc->DocName, ReallyUsed, view, doc->PDF_Options, doc->PDF_Options.PresentVals, PDFXProfiles, prefsManager->appPrefs.AvailFonts, doc->unitRatio(), ScMW->PrinterProfiles);
PDFExportDialog dia(this, doc->DocName, ReallyUsed, view, doc->PDF_Options, doc->PDF_Options.PresentVals, ScCore->PDFXProfiles, prefsManager->appPrefs.AvailFonts, doc->unitRatio(), ScCore->PrinterProfiles);
if (dia.exec())
{
qApp->setOverrideCursor(QCursor(waitCursor), true);
7521,7 → 7428,7
scrActions["fileRevert"]->setEnabled(true);
scrActions["fileDocSetup"]->setEnabled(true);
scrActions["filePrint"]->setEnabled(true);
if ( HaveGS==0 || ScQApp->isWinGUI() )
if ( ScCore->haveGS()==0 || ScCore->isWinGUI() )
scrActions["PrintPreview"]->setEnabled(true);
scrActions["pageInsert"]->setEnabled(true);
scrActions["pageCopy"]->setEnabled(true);
7892,164 → 7799,8
return retval;
}
 
void ScribusMainWindow::GetCMSProfiles()
{
QString profDir;
QStringList profDirs;
MonitorProfiles.clear();
PrinterProfiles.clear();
InputProfiles.clear();
InputProfilesCMYK.clear();
QString pfad = ScPaths::instance().libDir();
pfad += "profiles/";
profDirs = ScPaths::getSystemProfilesDirs();
profDirs.prepend( prefsManager->appPrefs.ProfileDir );
profDirs.prepend( pfad );
for(unsigned int i = 0; i < profDirs.count(); i++)
{
profDir = profDirs[i];
if(!profDir.isEmpty())
{
if(profDir.right(1) != "/")
profDir += "/";
GetCMSProfilesDir(profDir);
}
}
if ((!PrinterProfiles.isEmpty()) && (!InputProfiles.isEmpty()) && (!MonitorProfiles.isEmpty()))
CMSavail = true;
else
CMSavail = false;
}
 
void ScribusMainWindow::GetCMSProfilesDir(QString pfad)
{
#ifdef HAVE_CMS
QDir d(pfad, "*", QDir::Name, QDir::Files | QDir::Readable | QDir::Dirs | QDir::NoSymLinks);
if ((d.exists()) && (d.count() != 0))
{
QString nam = "";
const char *Descriptor;
cmsHPROFILE hIn = NULL;
 
for (uint dc = 0; dc < d.count(); ++dc)
{
QFileInfo fi(pfad + "/" + d[dc]);
if (fi.isDir() && d[dc][0] != '.')
{
GetCMSProfilesDir(fi.filePath()+"/");
continue;
}
 
#ifndef QT_MAC
QString ext = fi.extension(false).lower();
if ((ext != "icm") && (ext != "icc"))
continue;
#endif
 
QFile f(fi.filePath());
QByteArray bb(40);
if (!f.open(IO_ReadOnly)) {
sDebug(QString("couldn't open %1 as ICC").arg(fi.filePath()));
continue;
}
int len = f.readBlock(bb.data(), 40);
f.close();
if (len == 40 && bb[36] == 'a' && bb[37] == 'c' && bb[38] == 's' && bb[39] == 'p')
{
const QCString profilePath( QString(pfad + d[dc]).local8Bit() );
if (setjmp(cmsJumpBuffer))
{
// Reset to the default handler otherwise may enter a loop
// if an error occur in cmsCloseProfile()
cmsSetErrorHandler(NULL);
if (hIn)
{
cmsCloseProfile(hIn);
hIn = NULL;
}
continue;
}
cmsSetErrorHandler(&cmsErrorHandler);
hIn = cmsOpenProfileFromFile(profilePath.data(), "r");
if (hIn == NULL)
continue;
Descriptor = cmsTakeProductDesc(hIn);
nam = QString(Descriptor);
switch (static_cast<int>(cmsGetDeviceClass(hIn)))
{
case icSigInputClass:
case icSigColorSpaceClass:
if (static_cast<int>(cmsGetColorSpace(hIn)) == icSigRgbData)
InputProfiles[nam] = pfad + d[dc];
if (static_cast<int>(cmsGetColorSpace(hIn)) == icSigCmykData)
InputProfilesCMYK[nam] = pfad + d[dc];
break;
case icSigDisplayClass:
if (static_cast<int>(cmsGetColorSpace(hIn)) == icSigRgbData)
{
MonitorProfiles[nam] = pfad + d[dc];
InputProfiles[nam] = pfad + d[dc];
}
if (static_cast<int>(cmsGetColorSpace(hIn)) == icSigCmykData)
InputProfilesCMYK[nam] = pfad + d[dc];
break;
case icSigOutputClass:
PrinterProfiles[nam] = pfad + d[dc];
if (static_cast<int>(cmsGetColorSpace(hIn)) == icSigCmykData)
{
PDFXProfiles[nam] = pfad + d[dc];
InputProfilesCMYK[nam] = pfad + d[dc];
}
break;
}
cmsCloseProfile(hIn);
hIn = NULL;
}
}
cmsSetErrorHandler(NULL);
}
#endif
}
 
void ScribusMainWindow::initCMS()
{
if (CMSavail)
{
ProfilesL::Iterator ip;
if ((prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile.isEmpty()) || (!InputProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile)))
{
ip = InputProfiles.begin();
prefsManager->appPrefs.DCMSset.DefaultImageRGBProfile = ip.key();
}
if ((prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile.isEmpty()) || (!InputProfilesCMYK.contains(prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile)))
{
ip = InputProfilesCMYK.begin();
prefsManager->appPrefs.DCMSset.DefaultImageCMYKProfile = ip.key();
}
if ((prefsManager->appPrefs.DCMSset.DefaultSolidColorProfile.isEmpty()) || (!InputProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultSolidColorProfile)))
{
ip = InputProfiles.begin();
prefsManager->appPrefs.DCMSset.DefaultSolidColorProfile = ip.key();
}
if ((prefsManager->appPrefs.DCMSset.DefaultMonitorProfile.isEmpty()) || (!MonitorProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultMonitorProfile)))
{
ip = MonitorProfiles.begin();
prefsManager->appPrefs.DCMSset.DefaultMonitorProfile = ip.key();
}
if ((prefsManager->appPrefs.DCMSset.DefaultPrinterProfile.isEmpty()) || (!PrinterProfiles.contains(prefsManager->appPrefs.DCMSset.DefaultPrinterProfile)))
{
ip = PrinterProfiles.begin();
prefsManager->appPrefs.DCMSset.DefaultPrinterProfile = ip.key();
}
#ifdef HAVE_CMS
SoftProofing = prefsManager->appPrefs.DCMSset.SoftProofOn;
CMSuse = false;
IntentPrinter = prefsManager->appPrefs.DCMSset.DefaultIntentPrinter;
IntentMonitor = prefsManager->appPrefs.DCMSset.DefaultIntentMonitor;
#endif
}
}
 
void ScribusMainWindow::recalcColors(QProgressBar *dia)
{
if (HaveDoc)
8657,7 → 8408,7
 
void ScribusMainWindow::languageChange()
{
if (scribusInitialized)
if (ScCore->initialized())
{
CommonStrings::languageChange();
//Update actions
8664,7 → 8415,7
if (actionManager!=NULL)
{
actionManager->languageChange();
pluginManager->languageChange();
ScCore->pluginManager->languageChange();
initKeyboardShortcuts();
}
//Update menu texts
8730,8 → 8481,8
 
const bool ScribusMainWindow::fileWatcherActive()
{
if (fileWatcher!=NULL)
return fileWatcher->isActive();
if (ScCore->fileWatcher!=NULL)
return ScCore->fileWatcher->isActive();
return false;
}
 
8894,3 → 8645,4
}
}
}
 
/branches/Version13x/Scribus/scribus/scribusapp.h
25,6 → 25,7
#include <qstring.h>
 
#include "scribusapi.h"
class ScribusCore;
class ScribusMainWindow;
 
class SCRIBUS_API ScribusQApp : public QApplication
37,6 → 38,7
int init();
void initLang();
void parseCommandLine();
void changeGUILanguage(const QString & lang);
/*!
\author Franz Schmid
\author Alessandro Rimoldi
58,28 → 60,12
\param langs QString a two letter string describing the lang environement
*/
void installTranslators(const QStringList & langs);
void changeGUILanguage(const QString & lang);
bool usingGUI() const;
/**
* @brief Are we trying to adhere to Apple Mac HIG ?
* @retval bool true if we are on Qt/Mac
*/
bool isMacGUI() const;
/**
* @brief Are we executing Scribus on Windows ?
* @retval bool true if we are on Qt/Win
*/
bool isWinGUI() const;
/**
* @brief Are we swapping dialog button order?
* @retval bool if we are swapping
*/
bool reverseDialogButtons() const;
 
const ScribusCore* core() {return m_ScCore;}
static bool useGUI;
 
private:
ScribusMainWindow *scribus;
ScribusCore* m_ScCore;
void showHeader();
void showVersion();
/*!
103,9 → 89,6
//! \brief If is there user given prefs file...
QString prefsUserFile;
QString file;
 
signals:
void appStarted();
};
 
#endif
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptercore.h
13,6 → 13,7
#include "qguardedptr.h"
 
class ScrAction;
class ScribusMainWindow;
class MenuManager;
class PythonConsole;
 
23,6 → 24,7
public:
ScripterCore(QWidget* parent);
~ScripterCore();
void addToMainWindowMenu(ScribusMainWindow *);
 
/** @brief String representation of result returned by last python console command */
QString returnString;
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
39,9 → 39,6
: QWidget( parent, "PythonConsole", WType_TopLevel )
{
setIcon(loadIcon("AppIcon.png"));
QFont font = QFont("Fixed");
font.setStyleHint(QFont::TypeWriter);
font.setPointSize(PrefsManager::instance()->appPrefs.AppFontSize);
 
// setup the menu
menuBar = new QMenuBar(this, "menuBar");
67,7 → 64,6
editorsLayout->addWidget(splitter);
 
commandEdit = new QTextEdit(splitter, "commandEdit" );
commandEdit->setFont(font);
commandEdit->setTextFormat(Qt::PlainText);
commandEdit->setFocus();
commandEdit->setTabStopWidth(commandEdit->pointSize() * 4);
79,7 → 75,6
SyntaxHighlighter *sxHigh = new SyntaxHighlighter(commandEdit);
 
outputEdit = new QTextEdit(splitter, "outputEdit" );
outputEdit->setFont(font);
outputEdit->setTextFormat(Qt::PlainText);
outputEdit->setReadOnly(true);
QSizePolicy outputEditSize( outputEdit->sizePolicy() );
114,6 → 109,15
// no need to delete child widgets, Qt does it all for us
}
 
void PythonConsole::setFonts()
{
QFont font = QFont("Fixed");
font.setStyleHint(QFont::TypeWriter);
font.setPointSize(PrefsManager::instance()->appPrefs.AppFontSize);
commandEdit->setFont(font);
outputEdit->setFont(font);
}
 
void PythonConsole::closeEvent(QCloseEvent *)
{
emit paletteShown(false);
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptplugin.h
32,6 → 32,7
virtual void languageChange();
virtual bool newPrefsPanelWidget(QWidget* parent, PrefsPanel*& panel,
QString& caption, QPixmap& icon);
virtual void addToMainWindowMenu(ScribusMainWindow *);
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
9,6 → 9,7
#include "bookpalette.h"
#include "prefsmanager.h"
#include "scribusdoc.h"
#include "scribuscore.h"
 
#include <structmember.h>
#include <qfileinfo.h>
459,7 → 460,7
self->intents = ScMW->doc->PDF_Options.Intent; // int - 0 - 3
self->intenti = ScMW->doc->PDF_Options.Intent2; // int - 0 - 3
QString tp = ScMW->doc->PDF_Options.SolidProf;
if (!ScMW->InputProfiles.contains(tp))
if (!ScCore->InputProfiles.contains(tp))
tp = ScMW->view->Doc->CMSSettings.DefaultSolidColorProfile;
PyObject *solidpr = NULL;
solidpr = PyString_FromString(tp.ascii());
471,7 → 472,7
return -1;
}
QString tp2 = ScMW->doc->PDF_Options.ImageProf;
if (!ScMW->InputProfiles.contains(tp2))
if (!ScCore->InputProfiles.contains(tp2))
tp2 = ScMW->view->Doc->CMSSettings.DefaultSolidColorProfile;
PyObject *imagepr = NULL;
imagepr = PyString_FromString(tp2.ascii());
483,7 → 484,7
return -1;
}
QString tp3 = ScMW->doc->PDF_Options.PrintProf;
if (!ScMW->PDFXProfiles.contains(tp3))
if (!ScCore->PDFXProfiles.contains(tp3))
tp3 = ScMW->view->Doc->CMSSettings.DefaultPrinterProfile;
PyObject *printprofc = NULL;
printprofc = PyString_FromString(tp3.ascii());
1111,7 → 1112,7
// Where does compiler find cms function when I have not included header for it
const char *Descriptor;
cmsHPROFILE hIn;
hIn = cmsOpenProfileFromFile(ScMW->PrinterProfiles[ScMW->doc->PDF_Options.PrintProf], "r");
hIn = cmsOpenProfileFromFile(ScCore->PrinterProfiles[ScMW->doc->PDF_Options.PrintProf], "r");
Descriptor = cmsTakeProductDesc(hIn);
nam = QString(Descriptor);
if (static_cast<int>(cmsGetColorSpace(hIn)) == icSigRgbData)
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
26,6 → 26,7
#include "menumanager.h"
#include "pconsole.h"
#include "scraction.h"
#include "scribuscore.h"
#include "scpaths.h"
#include "selection.h"
#include "prefsfile.h"
38,7 → 39,6
ScripterCore::ScripterCore(QWidget* parent)
{
pcon = new PythonConsole(parent);
menuMgr = ScMW->scrMenuMgr;
scrScripterActions.clear();
scrRecentScriptActions.clear();
returnString = "init";
53,6 → 53,21
QObject::connect( scrScripterActions["scripterShowConsole"], SIGNAL(toggled(bool)) , this, SLOT(slotInteractiveScript(bool)) );
QObject::connect( scrScripterActions["scripterAboutScript"], SIGNAL(activated()) , this, SLOT(aboutScript()) );
 
SavedRecentScripts.clear();
ReadPlugPrefs();
 
QObject::connect(pcon, SIGNAL(runCommand()), this, SLOT(slotExecute()));
QObject::connect(pcon, SIGNAL(paletteShown(bool)), this, SLOT(slotInteractiveScript(bool)));
}
 
ScripterCore::~ScripterCore()
{
SavePlugPrefs();
}
 
void ScripterCore::addToMainWindowMenu(ScribusMainWindow *mw)
{
menuMgr = mw->scrMenuMgr;
menuMgr->createMenu("Scripter", QObject::tr("&Script"));
menuMgr->addMenuToMenuBarAfter("Scripter","Extras");
menuMgr->createMenu("ScribusScripts", QObject::tr("&Scribus Scripts"), "Scripter");
61,22 → 76,11
menuMgr->addMenuSeparator("Scripter");
menuMgr->addMenuItem(scrScripterActions["scripterShowConsole"], "Scripter");
menuMgr->addMenuItem(scrScripterActions["scripterAboutScript"], "Scripter");
 
SavedRecentScripts.clear();
ReadPlugPrefs();
buildScribusScriptsMenu();
buildRecentScriptsMenu();
 
QObject::connect(pcon, SIGNAL(runCommand()), this, SLOT(slotExecute()));
QObject::connect(pcon, SIGNAL(paletteShown(bool)), this, SLOT(slotInteractiveScript(bool)));
}
 
ScripterCore::~ScripterCore()
{
SavePlugPrefs();
}
 
 
void ScripterCore::buildScribusScriptsMenu()
{
QString pfad = ScPaths::instance().scriptDir();
348,7 → 352,7
// Display a dialog to the user with the exception
QClipboard *cp = QApplication::clipboard();
cp->setText(errorMsg);
ScMW->closeSplash();
ScCore->closeSplash();
QMessageBox::warning(ScMW,
tr("Script error"),
tr("If you are running an official script report it at <a href=\"http://bugs.scribus.net\">bugs.scribus.net</a> please.")
431,6 → 435,7
QObject::disconnect( scrScripterActions["scripterShowConsole"], SIGNAL(toggled(bool)) , this, SLOT(slotInteractiveScript(bool)) );
 
scrScripterActions["scripterShowConsole"]->setOn(visible);
pcon->setFonts();
pcon->setShown(visible);
 
QObject::connect( scrScripterActions["scripterShowConsole"], SIGNAL(toggled(bool)) , this, SLOT(slotInteractiveScript(bool)) );
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
124,6 → 124,12
scripterCore->languageChange();
}
 
void ScriptPlugin::addToMainWindowMenu(ScribusMainWindow* mw)
{
if (scripterCore)
scripterCore->addToMainWindowMenu(mw);
}
 
const QString ScriptPlugin::fullTrName() const
{
return QObject::tr("Scripter");
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/pconsole.h
41,6 → 41,8
public:
PythonConsole( QWidget* parent = 0);
~PythonConsole();
void setFonts();
 
/*! \brief The command string
\retval QString with prepared Python commands */
/branches/Version13x/Scribus/scribus/plugins/newfromtemplateplugin/nftemplate.h
26,6 → 26,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/short-words/shortwords.h
31,6 → 31,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
/*! \brief Preference widget */
virtual bool newPrefsPanelWidget(QWidget* parent, PrefsPanel*& panel,
QString& caption, QPixmap& icon);
/branches/Version13x/Scribus/scribus/plugins/saveastemplateplugin/satemplate.h
27,6 → 27,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/pixmapexport/export.h
28,6 → 28,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/colorwheel/colorwheel.h
32,6 → 32,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/myplugin/myplugin.h
28,6 → 28,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
64,10 → 64,13
// it in one place. This includes registering file format
// support.
languageChange();
}
 
void SVGImportPlugin::addToMainWindowMenu(ScribusMainWindow *mw)
{
importAction->setEnabled(true);
connect( importAction, SIGNAL(activated()), SLOT(import()) );
ScMW->scrMenuMgr->addMenuItem(importAction, "FileImport");
mw->scrMenuMgr->addMenuItem(importAction, "FileImport");
}
 
SVGImportPlugin::~SVGImportPlugin()
1295,7 → 1298,7
QString SVGPlug::parseColor( const QString &s )
{
QColor c;
QString ret = CommonStrings::None;
QString ret = CommonStrings::NoneColor;
if( s.startsWith( "rgb(" ) )
{
QString parse = s.stripWhiteSpace();
1370,7 → 1373,7
obj->FillCol = obj->CurCol;
else if (params == "none")
{
obj->FillCol = CommonStrings::None;
obj->FillCol = CommonStrings::NoneColor;
}
else if( params.startsWith( "url(" ) )
{
1415,7 → 1418,7
obj->GY2 = m_gradients[key].Y2;
if (m_gradients[key].matrixValid)
obj->matrixg = m_gradients[key].matrix;
obj->FillCol = CommonStrings::None;
obj->FillCol = CommonStrings::NoneColor;
}
else
obj->FillCol = parseColor(params);
1427,10 → 1430,10
else if( command == "color" )
{
if (params == "none")
obj->CurCol = CommonStrings::None;
obj->CurCol = CommonStrings::NoneColor;
else if( params.startsWith( "url(" ) )
{
obj->CurCol = CommonStrings::None;
obj->CurCol = CommonStrings::NoneColor;
}
else
{
1443,11 → 1446,11
obj->StrokeCol = obj->CurCol;
else if (params == "none")
{
obj->StrokeCol = CommonStrings::None;
obj->StrokeCol = CommonStrings::NoneColor;
}
else if( params.startsWith( "url(" ) )
{
obj->StrokeCol = CommonStrings::None;
obj->StrokeCol = CommonStrings::NoneColor;
}
else
obj->StrokeCol = parseColor(params);
/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.h
14,6 → 14,7
#include "vgradient.h"
 
class ScrAction;
class ScribusMainWindow;
 
/**
* \brief The ID for the SVG Import format. This must be a macro not a static const member
39,6 → 40,7
virtual void languageChange();
virtual bool fileSupported(QIODevice* file) const;
virtual bool loadFile(const QString & fileName, const FileFormat & fmt);
virtual void addToMainWindowMenu(ScribusMainWindow *);
 
public slots:
/*!
/branches/Version13x/Scribus/scribus/plugins/fileloader/oldscribusformat/oldscribusformat.h
26,6 → 26,7
 
virtual bool loadFile(const QString & fileName, const FileFormat & fmt);
virtual bool saveFile(const QString & fileName, const FileFormat & fmt);
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features - .sla page extraction support
bool loadPage(int pageNumber, bool Mpage);
/branches/Version13x/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp
72,7 → 72,10
// Set action info in languageChange, so we only have to do
// it in one place. This includes registering file formats.
languageChange();
}
 
void OODrawImportPlugin::addToMainWindowMenu(ScribusMainWindow *mw)
{
// Then hook up the action
importAction->setEnabled(true);
connect( importAction, SIGNAL(activated()), SLOT(import()) );
/branches/Version13x/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.h
35,6 → 35,7
virtual void languageChange();
virtual bool fileSupported(QIODevice* file) const;
virtual bool loadFile(const QString & fileName, const FileFormat & fmt);
virtual void addToMainWindowMenu(ScribusMainWindow *);
 
// Special features - File->Import slot
public slots:
/branches/Version13x/Scribus/scribus/plugins/barcodegenerator/barcode.h
29,6 → 29,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
};
 
extern "C" PLUGIN_API int barcodegenerator_getPluginAPIVersion();
/branches/Version13x/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.h
23,6 → 23,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/svgexplugin/svgexplugin.h
36,6 → 36,7
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
virtual void languageChange();
virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
// Special features (none)
};
/branches/Version13x/Scribus/scribus/plugins/psimport/importpsplugin.h
35,6 → 35,7
virtual void languageChange();
virtual bool fileSupported(QIODevice* file) const;
virtual bool loadFile(const QString & fileName, const FileFormat & fmt);
virtual void addToMainWindowMenu(ScribusMainWindow *);
 
public slots:
/*!
/branches/Version13x/Scribus/scribus/plugins/psimport/importpsplugin.cpp
42,7 → 42,10
// Set action info in languageChange, so we only have to do it in one
// place. This includes registering file format support.
languageChange();
}
 
void ImportPSPlugin::addToMainWindowMenu(ScribusMainWindow *mw)
{
importAction->setEnabled(true);
connect( importAction, SIGNAL(activated()), SLOT(import()) );
ScMW->scrMenuMgr->addMenuItem(importAction, "FileImport");
/branches/Version13x/Scribus/scribus/plugins/psimport/importps.cpp
9,12 → 9,13
 
#include "scconfig.h"
#include "scribus.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "commonstrings.h"
#include "customfdialog.h"
#include "mpalette.h"
#include "prefsfile.h"
#include "prefscontext.h"
#include "prefsmanager.h"
#include "prefstable.h"
#include "scribusXml.h"
#include <qfile.h>
45,7 → 46,7
CustColors.clear();
QFileInfo fi = QFileInfo(fName);
QString ext = fi.extension(false).lower();
if ( !ScQApp->usingGUI() ) {
if ( !ScCore->usingGUI() ) {
interactive = false;
showProgress = false;
}
60,7 → 61,7
progressDialog->setProgress("GI", 0);
progressDialog->show();
connect(progressDialog->buttonCancel, SIGNAL(clicked()), this, SLOT(cancelRequested()));
ScQApp->processEvents();
qApp->processEvents();
}
else {
progressDialog = NULL;
269,8 → 270,8
QString cmd, cmd1, cmd2, cmd3, tmp, tmp2, tmp3, tmp4;
// import.prolog do not cope with filenames containing blank spaces
// so take care that output filename does not (win32 compatibility)
QString tmpFile = getShortPathName(ScMW->PrefsPfad)+ "/ps.out";
QString errFile = getShortPathName(ScMW->PrefsPfad)+ "/ps.err";
QString tmpFile = getShortPathName(PrefsManager::instance()->preferencesLocation())+ "/ps.out";
QString errFile = getShortPathName(PrefsManager::instance()->preferencesLocation())+ "/ps.err";
QString pfad = ScPaths::instance().libDir();
QString pfad2 = QDir::convertSeparators(pfad + "import.prolog");
QFileInfo fi = QFileInfo(fn);
278,7 → 279,7
if (progressDialog) {
progressDialog->setOverallProgress(1);
ScQApp->processEvents();
qApp->processEvents();
}
args.append( getShortPathName(PrefsManager::instance()->ghostscriptExecutable()) );
args.append( "-q" );
353,7 → 354,7
if(progressDialog) {
progressDialog->setOverallProgress(2);
progressDialog->setLabel("GI", tr("Generating Items"));
ScQApp->processEvents();
qApp->processEvents();
}
if (!cancel) {
parseOutput(tmpFile, ext == "eps");
379,7 → 380,7
{
if (progressDialog) {
progressDialog->setTotalSteps("GI", (int) f.size());
ScQApp->processEvents();
qApp->processEvents();
}
lastPath = "";
currPath = "";
397,7 → 398,7
tmp = ts.readLine();
if (progressDialog && (++line_cnt % 100 == 0)) {
progressDialog->setProgress("GI", (int) f.at());
ScQApp->processEvents();
qApp->processEvents();
}
token = tmp.section(' ', 0, 0);
params = tmp.section(' ', 1, -1, QString::SectionIncludeTrailingSep);
/branches/Version13x/Scribus/scribus/scribusapp.cpp
35,7 → 35,7
 
#include "scribusapp.h"
#include "scribusapp.moc"
#include "scribus.h"
#include "scribuscore.h"
#include "scpaths.h"
#include "prefsfile.h"
#include "langmgr.h"
68,6 → 68,7
#define ARG_DISPLAY_QT "-display"
 
extern ScribusQApp* ScQApp;
extern ScribusCore* ScCore;
 
bool ScribusQApp::useGUI=false;
 
74,6 → 75,7
ScribusQApp::ScribusQApp( int & argc, char ** argv ) : QApplication(argc, argv)
{
ScQApp=this;
ScCore=NULL;
ScMW=NULL;
lang="";
}
192,39 → 194,17
 
int ScribusQApp::init()
{
m_ScCore=new ScribusCore();
Q_CHECK_PTR(m_ScCore);
if (!m_ScCore)
return EXIT_FAILURE;
ScCore=m_ScCore;
processEvents();
ScCore->init(useGUI, swapDialogButtonOrder, file);
int retVal=EXIT_SUCCESS;
if (useGUI)
{
scribus = new ScribusMainWindow();
ScMW=scribus;
if (!scribus)
exit(EXIT_FAILURE);
int scribusRetVal = scribus->initScribus(showSplash, showFontInfo, lang, prefsUserFile);
if (scribusRetVal == 1)
return(EXIT_FAILURE);
 
setMainWidget(scribus);
connect(this, SIGNAL(lastWindowClosed()), this, SLOT(quit()));
 
scribus->show();
scribus->ShowSubs();
 
if (!file.isEmpty())
scribus->loadDoc(file);
else
{
if (PrefsManager::instance()->appPrefs.showStartupDialog)
scribus->startUpDialog();
else
scribus->setFocus();
}
 
// A hook for plug-ins and scripts to trigger on. Some plugins and scripts
// require the app to be fully set up (in particular, the main window to be
// built and shown) before running their setup.
emit appStarted();
}
return EXIT_SUCCESS;
retVal=ScCore->startGUI(showSplash, showFontInfo, lang, prefsUserFile);
return retVal;
}
 
QStringList ScribusQApp::getLang(QString lang)
418,54 → 398,3
ts << QString("%1 %2").arg(tr("Issues")+":", descwidth).arg("http://bugs.scribus.net"); endl(ts);
endl(ts);
}
 
bool ScribusQApp::usingGUI() const
{
return useGUI;
}
 
bool ScribusQApp::isMacGUI() const
{
// Do it statically for now
#if defined(Q_WS_MAC)
return true;
#else
return false;
#endif
}
 
bool ScribusQApp::isWinGUI() const
{
// Do it statically for now
#if defined(_WIN32)
return true;
#else
return false;
#endif
}
 
bool ScribusQApp::reverseDialogButtons() const
{
if (swapDialogButtonOrder)
return true;
//Win32 - dont switch
#if defined(_WIN32)
return false;
//Mac Aqua - switch
#elif defined(Q_WS_MAC)
return true;
#else
//Gnome - switch
QString gnomesession= ::getenv("GNOME_DESKTOP_SESSION_ID");
if (!gnomesession.isEmpty())
return true;
 
//KDE/KDE Aqua - dont switch
//Best guess for now if we are running under KDE
QString kdesession= ::getenv("KDE_FULL_SESSION");
if (!kdesession.isEmpty())
return false;
#endif
return false;
}
 
/branches/Version13x/Scribus/scribus/scribus.h
68,7 → 68,7
class Biblio;
class BookPalette;
class CheckDocument;
class FileWatcher;
 
class FontCombo;
class GuideManager;
class ColorCombo;
80,17 → 80,16
class NodePalette;
class PageItem;
class PagePalette;
class PluginManager;
class PrefsManager;
class PrefsContext;
class PSLib;
class ScrAction;
class ScribusCore;
class ScribusMainWindow;
class ScribusQApp;
class ScribusWin;
class ScToolBar;
class SimpleState;
class SplashScreen;
class StilFormate;
class StoryEditor;
class StyleManager;
102,6 → 101,7
class WerkToolB;
class WerkToolBP;
 
extern SCRIBUS_API ScribusCore* ScCore;
extern SCRIBUS_API ScribusQApp* ScQApp;
extern SCRIBUS_API ScribusMainWindow* ScMW;
 
123,11 → 123,7
/*!
* \retval 0 - ok, 1 - no fonts, ...
*/
int initScribus(bool showSplash, bool showFontInfo, const QString newGuiLanguage, const QString prefsUserFile);
void showSplash(bool);
bool splashShowing() const;
void closeSplash();
void setSplashStatus(const QString&);
int initScMW(bool primaryMainwWindow);
const QString getGuiLanguage();
bool warningVersion(QWidget *parent);
void SetShortCut();
156,8 → 152,6
QString CFileDialog(QString wDir = ".", QString caption = "", QString filter = "", QString defNa = "",
bool Pre = false, bool mod = true, bool comp = false, bool cod = false,
bool onlyDirs = false, bool *docom = 0, bool *doFont = 0);
void GetCMSProfiles();
void GetCMSProfilesDir(QString pfad);
/*! \brief Recalculate the colors after changing CMS settings.
Call the appropriate document function and then update the GUI elements.
\param dia optional progress widget */
188,11 → 182,6
QString Buffer2;
QString Buffer3;
bool BuFromApp;
ProfilesL InputProfiles;
ProfilesL InputProfilesCMYK;
ProfilesL MonitorProfiles;
ProfilesL PrinterProfiles;
ProfilesL PDFXProfiles;
double DispX;
double DispY;
int HaveDoc;
208,7 → 197,7
*/
ScribusDoc *doc;
/** \brief the splash screen */
SplashScreen *splashScreen;
 
QLabel* mainWindowStatusLabel;
QProgressBar* mainWindowProgressBar;
QLabel* mainWindowXPosLabel;
235,18 → 224,15
QString PrefsPfad;
QClipboard *ClipB;
QString LoadEnc;
bool singleClose;
bool ScriptRunning;
Autoforms* SCustom;
WerkToolB* mainToolBar;
int HavePngAlpha;
int HaveTiffSep;
 
QMap<QString, QStringList> InstLang;
QMap<QString,QString> LangTransl;
FileWatcher* fileWatcher;
QProcess *ExternalApp;
 
QMap<QString, QGuardedPtr<ScrAction> > scrActions;
QMap<QString, QGuardedPtr<ScrAction> > scrRecentFileActions;
QMap<QString, QGuardedPtr<ScrAction> > scrWindowsActions;
254,7 → 240,6
QDict<QActionGroup> scrActionGroups;
MenuManager* scrMenuMgr;
ActionManager* actionManager;
PluginManager* pluginManager;
QStringList RecentDocs;
 
public slots:
555,20 → 540,17
void initStatusBar(); // setup the statusbar
void initToolBars(); // setup the toolbars
//Returns false when there are no fonts
const bool initFonts(const bool showFontInfo);
void initHyphenator();
void initDefaultValues();
void initKeyboardShortcuts();
void initPalettes();
void initScrapbook();
void initCMS();
void updateColorMenu(QProgressBar* progressBar=NULL);
 
QString guiLanguage;
QString recentFileMenuName;
QString layerMenuName;
QPixmap noIcon;
bool scribusInitialized;
ColorCombo *ColorMenC;
/** ShapeMenu enthaelt die Rahmenformen */
QPopupMenu *ShapeMenu;
607,11 → 589,9
 
void addNewPages(int wo, int where, int numPages, double height, double width, int orient, QString siz, bool mov, QStringList* basedOn = 0);
QMap<int,QString> FontID;
int HaveGS;
void *PSDriver;
int DocNr;
UndoManager *undoManager;
PrefsManager *prefsManager;
bool PrinterUsed;
struct PDe {
QString Pname;
625,6 → 605,8
int storedViewYCoor;
double storedViewScale;
StyleManager *styleManager;
UndoManager *undoManager;
PrefsManager *prefsManager;
};
 
#endif
/branches/Version13x/Scribus/scribus/scpreview.cpp
22,6 → 22,7
#include "missing.h"
#include "sccolor.h"
#include "scribus.h"
#include "scribuscore.h"
#include "splash.h"
#include "util.h"
#include "prefsmanager.h"
115,14 → 116,12
{
if ((!prefsManager->appPrefs.GFontSub.contains(tmpf)) || (!prefsManager->appPrefs.AvailFonts[prefsManager->appPrefs.GFontSub[tmpf]]->UseFont))
{
if (ScMW->splashScreen != NULL)
ScMW->splashScreen->hide();
ScCore->showSplash(false);
MissingFont *dia = new MissingFont(0, tmpf, 0);
dia->exec();
tmpf = dia->getReplacementFont();
delete dia;
if (ScMW->splashScreen != NULL)
ScMW->splashScreen->show();
ScCore->showSplash(true);
prefsManager->appPrefs.GFontSub[pg.attribute("NAME")] = tmpf;
}
else
/branches/Version13x/Scribus/scribus/pslib.cpp
39,6 → 39,7
#include "prefsmanager.h"
#include "scribusdoc.h"
#include "scribus.h"
#include "scribuscore.h"
#include "scfonts.h"
#include "scfontmetrics.h"
#include "selection.h"
51,7 → 52,7
 
PSLib::PSLib(bool psart, SCFonts &AllFonts, QMap<QString,int> DocFonts, ColorList DocColors, bool pdf, bool spot)
{
usingGUI=ScQApp->usingGUI();
usingGUI=ScCore->usingGUI();
abortExport=false;
QString tmp, tmp2, tmp3, tmp4, CHset;
QStringList wt;
/branches/Version13x/Scribus/scribus/pluginmanager.cpp
14,7 → 14,7
#include "scconfig.h"
 
#include "scribus.h"
#include "scribusapp.h"
#include "scribuscore.h"
#include "menumanager.h"
#include "scraction.h"
#include "splash.h"
154,7 → 154,6
 
if ((dirList.exists()) && (dirList.count() != 0))
{
ScMW->scrMenuMgr->addMenuSeparator("Extras");
for (uint dc = 0; dc < dirList.count(); ++dc)
{
PluginData pda;
168,7 → 167,7
pda.pluginDLL = 0;
pda.enabled = false;
pda.enableOnStartup = prefs->getBool(pda.pluginName, true);
ScMW->setSplashStatus(tr("Plugin: loading %1", "plugin manager").arg(pda.pluginName));
ScCore->setSplashStatus(tr("Plugin: loading %1", "plugin manager").arg(pda.pluginName));
if (loadPlugin(pda))
{
if (pda.enableOnStartup)
185,13 → 184,17
{
Q_ASSERT(pda.enabled == false);
QString failReason;
bool isActionPlugin=false;
if (pda.plugin->inherits("ScActionPlugin"))
{
ScActionPlugin* plugin = dynamic_cast<ScActionPlugin*>(pda.plugin);
Q_ASSERT(plugin);
isActionPlugin=true;
/*
pda.enabled = setupPluginActions(plugin);
if (!pda.enabled)
failReason = tr("init failed", "plugin load error");
*/
}
else if (pda.plugin->inherits("ScPersistentPlugin"))
{
206,45 → 209,61
pda.enabled = true;
else
failReason = tr("unknown plugin type", "plugin load error");
if (ScMW->splashScreen != NULL)
if (pda.enabled || isActionPlugin)
ScCore->setSplashStatus(
tr("Plugin: %1 loaded", "plugin manager")
.arg(pda.plugin->fullTrName()));
else
ScCore->setSplashStatus(
tr("Plugin: %1 failed to load: %2", "plugin manager")
.arg(pda.plugin->fullTrName()).arg(failReason));
}
 
bool PluginManager::setupPluginActions(ScribusMainWindow *mw)
{
Q_CHECK_PTR(mw);
mw->scrMenuMgr->addMenuSeparator("Extras");
for (PluginMap::Iterator it = pluginMap.begin(); it != pluginMap.end(); ++it)
{
if (pda.enabled)
ScMW->splashScreen->setStatus(
tr("Plugin: %1 loaded", "plugin manager")
.arg(pda.plugin->fullTrName()));
if (it.data().plugin->inherits("ScActionPlugin"))
{
//Add in ScrAction based plugin linkage
//Insert DLL Action into Dictionary with values from plugin interface
ScActionPlugin* plugin = dynamic_cast<ScActionPlugin*>(it.data().plugin);
Q_ASSERT(plugin);
ScActionPlugin::ActionInfo ai(plugin->actionInfo());
ScrAction* action = new ScrAction(
ScrAction::DLL, ai.iconSet, ai.text, ai.keySequence,
mw, ai.name);
Q_CHECK_PTR(action);
mw->scrActions.insert(ai.name, action);
// then enable and connect up the action
mw->scrActions[ai.name]->setEnabled(ai.enabledOnStartup);
// Connect action's activated signal with the plugin's run method
it.data().enabled = connect( mw->scrActions[ai.name], SIGNAL(activated()),
plugin, SLOT(run()) );
//Get the menu manager to add the DLL's menu item to the right menu, after the chosen existing item
if ( ai.menuAfterName.isEmpty() )
mw->scrMenuMgr->addMenuItem(mw->scrActions[ai.name], ai.menu);
else
mw->scrMenuMgr->addMenuItemAfter(mw->scrActions[ai.name], ai.menu, ai.menuAfterName);
if (it.data().enabled)
ScCore->setSplashStatus(tr("Plugin: %1 initialized ok ", "plugin manager")
.arg(plugin->fullTrName()));
else
ScCore->setSplashStatus(tr("Plugin: %1 failed post initialization", "plugin manager")
.arg(plugin->fullTrName()));
}
else
ScMW->splashScreen->setStatus(
tr("Plugin: %1 failed to load: %2", "plugin manager")
.arg(pda.plugin->fullTrName()).arg(failReason));
{
it.data().plugin->addToMainWindowMenu(mw);
}
}
return true;
}
 
bool PluginManager::setupPluginActions(ScActionPlugin* plugin)
{
bool result = true;
//Add in ScrAction based plugin linkage
//Insert DLL Action into Dictionary with values from plugin interface
ScActionPlugin::ActionInfo ai(plugin->actionInfo());
ScrAction* action = new ScrAction(
ScrAction::DLL, ai.iconSet, ai.text, ai.keySequence,
ScMW, ai.name);
Q_CHECK_PTR(action);
ScMW->scrActions.insert(ai.name, action);
 
// then enable and connect up the action
ScMW->scrActions[ai.name]->setEnabled(ai.enabledOnStartup);
// Connect action's activated signal with the plugin's run method
result = connect( ScMW->scrActions[ai.name], SIGNAL(activated()),
plugin, SLOT(run()) );
//Get the menu manager to add the DLL's menu item to the right menu, after the chosen existing item
if ( ai.menuAfterName.isEmpty() )
ScMW->scrMenuMgr->addMenuItem(ScMW->scrActions[ai.name], ai.menu);
else
ScMW->scrMenuMgr->addMenuItemAfter(ScMW->scrActions[ai.name], ai.menu, ai.menuAfterName);
 
return result;
}
 
bool PluginManager::DLLexists(QCString name, bool includeDisabled) const
{
// the plugin name must be known
437,7 → 456,7
 
PluginManager & PluginManager::instance()
{
return (*ScMW->pluginManager);
return (*ScCore->pluginManager);
}
 
const QString & PluginManager::getPluginPath(const QCString pluginName) const
/branches/Version13x/Scribus/scribus/gsutil.cpp
30,27 → 30,15
#include <qpainter.h>
#include <qprocess.h>
 
/* CB old includes from util.cpp.
#include <algorithm>
#include <cstdlib>
#include <cmath>
*/
#include "scconfig.h"
 
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
/*
#include <setjmp.h>
#include "pagestructs.h"
*/
#include "prefsfile.h"
/*
#include "prefscontext.h"
#include "prefstable.h"
*/
#include "prefsmanager.h"
#include "scpaths.h"
#include "scribuscore.h"
 
/*
extern "C"
112,7 → 100,7
// Choose rendering device
if (!device.isEmpty())
args.append( QString("-sDEVICE=%1").arg(device) ); // user specified device
else if (ScMW->HavePngAlpha != 0)
else if (ScCore->havePNGAlpha() != 0)
args.append( "-sDEVICE=png16m" );
else
args.append( "-sDEVICE=pngalpha" );
149,7 → 137,7
if (!device.isEmpty())
// user specified device
cmd1 += " -sDEVICE="+device;
else if (ScMW->HavePngAlpha != 0)
else if (ScCore->havePNGAlpha() != 0)
cmd1 += " -sDEVICE=png16m";
else
cmd1 += " -sDEVICE=pngalpha";
/branches/Version13x/Scribus/Scribus.pot
8,7 → 8,7
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-03-10 01:02+0100\n"
"POT-Creation-Date: 2006-03-11 18:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
8936,14 → 8936,14
msgid "Variable number of digits and any of the symbols -$:/.+ABCD."
msgstr ""
 
msgid "Variable number of digits"
msgstr ""
 
msgid ""
"Variable number of digits. An ITF-14 is 14 characters and does not have a "
"check digit"
msgstr ""
 
msgid "Variable number of digits"
msgstr ""
 
msgid "Variable number of digits and capital letters"
msgstr ""
 
/branches/Version13x/Scribus/Scribus.pro
1,9 → 1,11
######################################################################
# Automatically generated by qmake (1.07a) Mon Mar 13 11:35:13 2006
# Automatically generated by qmake (2.00a) Fri Apr 14 00:29:42 2006
######################################################################
 
TEMPLATE = app
DEPENDPATH += scribus \
TARGET +=
DEPENDPATH += . \
scribus \
scribus/libart \
scribus/pixbuf \
scribus/po \
63,6 → 65,7
HEADERS += config.h \
scribus/about.h \
scribus/aboutplugins.h \
scribus/aboutpluginsbase.h \
scribus/actionmanager.h \
scribus/aligndistribute.h \
scribus/alignselect.h \
78,6 → 81,7
scribus/buttonicon.h \
scribus/charselect.h \
scribus/checkDocument.h \
scribus/cmserrorhandling.h \
scribus/cmsprefs.h \
scribus/cmykfw.h \
scribus/collect4output.h \
96,7 → 100,9
scribus/delpages.h \
scribus/docinfo.h \
scribus/docitemattrprefs.h \
scribus/docitemattrprefsbase.h \
scribus/docsections.h \
scribus/docsectionsbase.h \
scribus/documentchecker.h \
scribus/documentinformation.h \
scribus/druck.h \
133,6 → 139,7
scribus/gtstyle.h \
scribus/gtwriter.h \
scribus/guidemanager.h \
scribus/guidemanagerbase.h \
scribus/guidemanagercore.h \
scribus/helpbrowser.h \
scribus/hnjalloc.h \
169,6 → 176,7
scribus/mspinbox.h \
scribus/multiline.h \
scribus/multiprogressdialog.h \
scribus/multiprogressdialogbase.h \
scribus/muster.h \
scribus/navigator.h \
scribus/newfile.h \
182,6 → 190,7
scribus/pageitem_polyline.h \
scribus/pageitem_textframe.h \
scribus/pageitemattributes.h \
scribus/pageitemattributesbase.h \
scribus/pagelayout.h \
scribus/pageselector.h \
scribus/pagesize.h \
237,6 → 246,7
scribus/scribus.h \
scribus/scribusapi.h \
scribus/scribusapp.h \
scribus/scribuscore.h \
scribus/scribusdoc.h \
scribus/scribusstructs.h \
scribus/scribusview.h \
253,6 → 263,9
scribus/serializer.h \
scribus/shadebutton.h \
scribus/smlinestyle.h \
scribus/smlinestylewbase.h \
scribus/smreplacedia.h \
scribus/smreplacediabase.h \
scribus/spalette.h \
scribus/splash.h \
scribus/stencilreader.h \
259,6 → 272,7
scribus/story.h \
scribus/styleitem.h \
scribus/stylemanager.h \
scribus/stylemanagerbase.h \
scribus/styleoptions.h \
scribus/styleselect.h \
scribus/tabcheckdoc.h \
269,15 → 283,19
scribus/tabtools.h \
scribus/tabtypography.h \
scribus/tocgenerator.h \
scribus/tocindexprefs.h \
scribus/tocindexprefs.ui.h \
scribus/tocindexprefsbase.h \
scribus/tree.h \
scribus/undogui.h \
scribus/undomanager.h \
scribus/undoobject.h \
scribus/undostack.h \
scribus/undostate.h \
scribus/units.h \
scribus/unzip.h \
scribus/useprintermarginsdialog.h \
scribus/useprintermarginsdialogbase.h \
scribus/util.h \
scribus/vgradient.h \
scribus/vgradientex.h \
293,9 → 311,11
scribus/pixbuf/gdk-pixbuf-xlib-private.h \
scribus/pixbuf/gdk-pixbuf-xlib.h \
scribus/pixbuf/gdk-pixbuf-xlibrgb.h \
scribus/text/nlsconfig.h \
scribus/text/storytext.h \
scribus/plugins/barcodegenerator/barcode.h \
scribus/plugins/barcodegenerator/barcodegenerator.h \
scribus/plugins/barcodegenerator/barcodegeneratorbase.h \
scribus/plugins/colorwheel/colorblind.h \
scribus/plugins/colorwheel/colorwheel.h \
scribus/plugins/colorwheel/colorwheelwidget.h \
302,6 → 322,7
scribus/plugins/colorwheel/cwdialog.h \
scribus/plugins/colorwheel/cwsetcolor.h \
scribus/plugins/fontpreview/fontpreview.h \
scribus/plugins/fontpreview/fontpreviewbase.h \
scribus/plugins/fontpreview/fontpreviewplugin.h \
scribus/plugins/myplugin/myplugin.h \
scribus/plugins/myplugin/mypluginimpl.h \
371,23 → 392,209
scribus/plugins/gettext/textfilter/textfilter.h \
scribus/plugins/gettext/textfilter/tfdia.h \
scribus/plugins/gettext/textfilter/tffilter.h \
scribus/plugins/gettext/txtim/txtim.h
INTERFACES += scribus/aboutpluginsbase.ui \
scribus/docitemattrprefsbase.ui \
scribus/docsectionsbase.ui \
scribus/guidemanagerbase.ui \
scribus/multiprogressdialogbase.ui \
scribus/pageitemattributesbase.ui \
scribus/smlinestylewbase.ui \
scribus/stylemanagerbase.ui \
scribus/tocindexprefs.ui \
scribus/tocindexprefsbase.ui \
scribus/useprintermarginsdialogbase.ui \
scribus/plugins/barcodegenerator/barcodegeneratorbase.ui \
scribus/plugins/fontpreview/fontpreviewbase.ui
scribus/plugins/gettext/txtim/txtim.h \
scribus/about.moc \
scribus/aboutplugins.moc \
scribus/actionmanager.moc \
scribus/aligndistribute.moc \
scribus/alignselect.moc \
scribus/annot.moc \
scribus/annota.moc \
scribus/applytemplatedialog.moc \
scribus/arrowchooser.moc \
scribus/autoform.moc \
scribus/autoformbuttongroup.moc \
scribus/bookmwin.moc \
scribus/bookpalette.moc \
scribus/buttonicon.moc \
scribus/charselect.moc \
scribus/checkDocument.moc \
scribus/cmsprefs.moc \
scribus/cmykfw.moc \
scribus/collect4output.moc \
scribus/colorchart.moc \
scribus/colorcombo.moc \
scribus/colorm.moc \
scribus/commonstrings.moc \
scribus/cpalette.moc \
scribus/cupsoptions.moc \
scribus/customfdialog.moc \
scribus/dcolor.moc \
scribus/deferredtask.moc \
scribus/delpages.moc \
scribus/docinfo.moc \
scribus/docitemattrprefs.moc \
scribus/docsections.moc \
scribus/druck.moc \
scribus/edit1format.moc \
scribus/editformats.moc \
scribus/editor.moc \
scribus/effectsdialog.moc \
scribus/extimageprops.moc \
scribus/fileloader.moc \
scribus/filesearch.moc \
scribus/filewatcher.moc \
scribus/fontcombo.moc \
scribus/fontprefs.moc \
scribus/fontreplacedialog.moc \
scribus/frameedit.moc \
scribus/gradienteditor.moc \
scribus/gtdialogs.moc \
scribus/guidemanager.moc \
scribus/helpbrowser.moc \
scribus/hruler.moc \
scribus/hyask.moc \
scribus/hyphenator.moc \
scribus/hysettings.moc \
scribus/imageinfodialog.moc \
scribus/insertTable.moc \
scribus/inspage.moc \
scribus/javadocs.moc \
scribus/keymanager.moc \
scribus/layers.moc \
scribus/lineformats.moc \
scribus/loadsaveplugin.moc \
scribus/loremipsum.moc \
scribus/main_nix.cpp \
scribus/main_win32.cpp \
scribus/margindialog.moc \
scribus/marginWidget.moc \
scribus/mdup.moc \
scribus/measurements.moc \
scribus/menumanager.moc \
scribus/mergedoc.moc \
scribus/missing.moc \
scribus/movepage.moc \
scribus/mpalette.moc \
scribus/mspinbox.moc \
scribus/multiline.moc \
scribus/multiprogressdialog.moc \
scribus/muster.moc \
scribus/navigator.moc \
scribus/newfile.moc \
scribus/newtemp.moc \
scribus/pageitem.moc \
scribus/pageitem_imageframe.moc \
scribus/pageitem_line.moc \
scribus/pageitem_pathtext.moc \
scribus/pageitem_polygon.moc \
scribus/pageitem_polyline.moc \
scribus/pageitem_textframe.moc \
scribus/pageitemattributes.moc \
scribus/pagelayout.moc \
scribus/pageselector.moc \
scribus/pdflib.moc \
scribus/pdfopts.moc \
scribus/picsearch.moc \
scribus/picstatus.moc \
scribus/pluginmanager.moc \
scribus/pluginmanagerprefsgui.moc \
scribus/polygonwidget.moc \
scribus/polyprops.moc \
scribus/prefs.moc \
scribus/prefsdialogbase.moc \
scribus/prefsmanager.moc \
scribus/prefspanel.moc \
scribus/preview.moc \
scribus/pslib.moc \
scribus/query.moc \
scribus/reformdoc.moc \
scribus/rulermover.moc \
scribus/sampleitem.moc \
scribus/scmenu.moc \
scribus/scmessagebox.moc \
scribus/scplugin.moc \
scribus/scraction.moc \
scribus/scrap.moc \
scribus/scribus.moc \
scribus/scribusapp.moc \
scribus/scribusdoc.moc \
scribus/scribusview.moc \
scribus/scribuswin.moc \
scribus/scribusXml.moc \
scribus/scrpalettebase.moc \
scribus/sctoolbar.moc \
scribus/search.moc \
scribus/seiten.moc \
scribus/selection.moc \
scribus/selfield.moc \
scribus/shadebutton.moc \
scribus/smlinestyle.moc \
scribus/smreplacedia.moc \
scribus/spalette.moc \
scribus/story.moc \
scribus/styleitem.moc \
scribus/stylemanager.moc \
scribus/styleselect.moc \
scribus/tabcheckdoc.moc \
scribus/tabguides.moc \
scribus/tabmanager.moc \
scribus/tabpdfoptions.moc \
scribus/tabruler.moc \
scribus/tabtools.moc \
scribus/tabtypography.moc \
scribus/tocgenerator.moc \
scribus/tree.moc \
scribus/undogui.moc \
scribus/undomanager.moc \
scribus/useprintermarginsdialog.moc \
scribus/vruler.moc \
scribus/werktoolb.moc \
scribus/plugins/barcodegenerator/barcode.moc \
scribus/plugins/barcodegenerator/barcodegenerator.moc \
scribus/plugins/colorwheel/colorblind.moc \
scribus/plugins/colorwheel/colorwheel.moc \
scribus/plugins/colorwheel/colorwheelwidget.moc \
scribus/plugins/colorwheel/cwdialog.moc \
scribus/plugins/colorwheel/cwsetcolor.moc \
scribus/plugins/fontpreview/fontpreview.moc \
scribus/plugins/fontpreview/fontpreviewplugin.moc \
scribus/plugins/newfromtemplateplugin/nftdialog.moc \
scribus/plugins/newfromtemplateplugin/nftemplate.moc \
scribus/plugins/pixmapexport/dialog.moc \
scribus/plugins/pixmapexport/export.moc \
scribus/plugins/psimport/importps.moc \
scribus/plugins/psimport/importpsplugin.moc \
scribus/plugins/saveastemplateplugin/satdialog.moc \
scribus/plugins/saveastemplateplugin/satemplate.moc \
scribus/plugins/scriptplugin/pconsole.moc \
scribus/plugins/scriptplugin/runscriptdialog.moc \
scribus/plugins/scriptplugin/scriptercore.moc \
scribus/plugins/scriptplugin/scripterprefsgui.moc \
scribus/plugins/scriptplugin/scriptplugin.moc \
scribus/plugins/scriptplugin/valuedialog.moc \
scribus/plugins/short-words/configuration.moc \
scribus/plugins/short-words/parse.moc \
scribus/plugins/short-words/shortwords.moc \
scribus/plugins/short-words/swprefsgui.moc \
scribus/plugins/short-words/vlnadialog.moc \
scribus/plugins/svgexplugin/svgexplugin.moc \
scribus/plugins/svgimplugin/svgplugin.moc \
scribus/plugins/fileloader/oldscribusformat/oldscribusformat.moc \
scribus/plugins/fileloader/oldscribusformat/oldscribusformatimpl.moc \
scribus/plugins/fileloader/oodraw/oodrawimp.moc \
scribus/plugins/gettext/csvim/csvdia.moc \
scribus/plugins/gettext/docim/docim.moc \
scribus/plugins/gettext/odtim/odtdia.moc \
scribus/plugins/gettext/sxwim/sxwdia.moc \
scribus/plugins/gettext/textfilter/tfdia.moc \
scribus/plugins/gettext/textfilter/tffilter.moc
FORMS += scribus/aboutpluginsbase.ui \
scribus/docitemattrprefsbase.ui \
scribus/docsectionsbase.ui \
scribus/guidemanagerbase.ui \
scribus/multiprogressdialogbase.ui \
scribus/pageitemattributesbase.ui \
scribus/smlinestylewbase.ui \
scribus/smreplacediabase.ui \
scribus/stylemanagerbase.ui \
scribus/tocindexprefs.ui \
scribus/tocindexprefsbase.ui \
scribus/useprintermarginsdialogbase.ui \
scribus/plugins/barcodegenerator/barcodegeneratorbase.ui \
scribus/plugins/fontpreview/fontpreviewbase.ui
SOURCES += scribus/about.cpp \
scribus/aboutplugins.cpp \
scribus/aboutplugins.moc.cpp \
scribus/actionmanager.cpp \
scribus/aligndistribute.cpp \
scribus/alignselect.cpp \
402,6 → 609,7
scribus/buttonicon.cpp \
scribus/charselect.cpp \
scribus/checkDocument.cpp \
scribus/cmserrorhandling.cpp \
scribus/cmsprefs.cpp \
scribus/cmykfw.cpp \
scribus/collect4output.cpp \
523,6 → 731,7
scribus/prefsdialogbase.cpp \
scribus/prefsfile.cpp \
scribus/prefsmanager.cpp \
scribus/prefspanel.cpp \
scribus/prefspanel.moc.cpp \
scribus/prefsreader.cpp \
scribus/prefstable.cpp \
534,7 → 743,6
scribus/reformdoc.cpp \
scribus/rulermover.cpp \
scribus/sampleitem.cpp \
scribus/sampleitem.moc.cpp \
scribus/sccolor.cpp \
scribus/sccolorshade.cpp \
scribus/sccombobox.cpp \
554,11 → 762,13
scribus/scrap.cpp \
scribus/scribus.cpp \
scribus/scribusapp.cpp \
scribus/scribuscore.cpp \
scribus/scribusdoc.cpp \
scribus/scribusview.cpp \
scribus/scribuswin.cpp \
scribus/scribusXml.cpp \
scribus/scrpalettebase.cpp \
scribus/sctextstruct.cpp \
scribus/sctoolbar.cpp \
scribus/scwinprint.cpp \
scribus/search.cpp \
568,10 → 778,12
scribus/serializer.cpp \
scribus/shadebutton.cpp \
scribus/smlinestyle.cpp \
scribus/smreplacedia.cpp \
scribus/spalette.cpp \
scribus/splash.cpp \
scribus/stencilreader.cpp \
scribus/story.cpp \
scribus/styleitem.cpp \
scribus/styleitem.moc.cpp \
scribus/stylemanager.cpp \
scribus/styleselect.cpp \
588,6 → 800,7
scribus/undogui.cpp \
scribus/undomanager.cpp \
scribus/undoobject.cpp \
scribus/undostack.cpp \
scribus/undostate.cpp \
scribus/units.cpp \
scribus/unzip.c \
610,8 → 823,8
scribus/pixbuf/gdk-pixbuf-xlibrgb.c \
scribus/text/storytext.cpp \
scribus/plugins/barcodegenerator/barcode.cpp \
scribus/plugins/barcodegenerator/barcode.moc.cpp \
scribus/plugins/barcodegenerator/barcodegenerator.cpp \
scribus/plugins/barcodegenerator/barcodegenerator.moc.cpp \
scribus/plugins/barcodegenerator/barcodegeneratorbase.moc.cpp \
scribus/plugins/colorwheel/colorblind.cpp \
scribus/plugins/colorwheel/colorwheel.cpp \
620,9 → 833,8
scribus/plugins/colorwheel/cwdialog.cpp \
scribus/plugins/colorwheel/cwsetcolor.cpp \
scribus/plugins/fontpreview/fontpreview.cpp \
scribus/plugins/fontpreview/fontpreviewbase.moc.cpp \
scribus/plugins/fontpreview/fontpreview.moc.cpp \
scribus/plugins/fontpreview/fontpreviewplugin.cpp \
scribus/plugins/fontpreview/fontpreviewplugin.moc.cpp \
scribus/plugins/myplugin/myplugin.cpp \
scribus/plugins/myplugin/myplugin.moc.cpp \
scribus/plugins/myplugin/mypluginimpl.cpp \
709,7 → 921,21
scribus/plugins/scriptplugin/scripter2/scripter2_scribus_scribusview.cpp \
scribus/plugins/scriptplugin/scripter2/scripter2_scribus_scribuswin.cpp \
scribus/plugins/scriptplugin/scripter2/scripter2_scribusstructs.cpp \
scribus/plugins/scriptplugin/scripter2/scripter2_styles.cpp
scribus/plugins/scriptplugin/scripter2/scripter2_styles.cpp \
scribus/aboutpluginsbase.cpp \
scribus/docitemattrprefsbase.cpp \
scribus/docsectionsbase.cpp \
scribus/guidemanagerbase.cpp \
scribus/useprintermarginsdialogbase.cpp \
scribus/multiprogressdialogbase.cpp \
scribus/pageitemattributesbase.cpp \
scribus/tocindexprefs.cpp \
scribus/tocindexprefsbase.cpp \
scribus/stylemanagerbase.cpp \
scribus/smlinestylewbase.cpp \
scribus/smreplacediabase.cpp \
scribus/plugins/barcodegenerator/barcodegeneratorbase.cpp \
scribus/plugins/fontpreview/fontpreviewbase.cpp
TRANSLATIONS += scribus/po/scribus.af.ts \
scribus/po/scribus.bg.ts \
scribus/po/scribus.ca.ts \
717,14 → 943,18
scribus/po/scribus.cy.ts \
scribus/po/scribus.da_DK.ts \
scribus/po/scribus.de.ts \
scribus/po/scribus.de_ol.ts \
scribus/po/scribus.en_GB.ts \
scribus/po/scribus.es_ES.ts \
scribus/po/scribus.eu.ts \
scribus/po/scribus.fi.ts \
scribus/po/scribus.fr.ts \
scribus/po/scribus.gl.ts \
scribus/po/scribus.hu.ts \
scribus/po/scribus.id.ts \
scribus/po/scribus.ja.ts \
scribus/po/scribus.lt_LT.ts \
scribus/po/scribus.lu.ts \
scribus/po/scribus.nb_NO.ts \
scribus/po/scribus.nl.ts \
scribus/po/scribus.pl_PL.ts \