45 #include <kstandarddirs.h>
49 #include <kstatusbar.h>
51 #include <kmessagebox.h>
52 #include <knotification.h>
53 #include <kapplication.h>
56 #include <kio/netaccess.h>
58 #include <kactioncollection.h>
59 #include <kactioncategory.h>
60 #include <kstandardaction.h>
61 #include <kstandardshortcut.h>
62 #include <krecentfilesaction.h>
63 #include <kxmlguifactory.h>
66 #include <kfiledialog.h>
68 #include <kross/core/action.h>
70 #include <threadweaver/ThreadWeaver.h>
73 #include <QActionGroup>
75 #include <QMdiSubWindow>
83 , m_mdiArea(new QMdiArea)
85 , m_projectSubWindow(0)
86 , m_translationMemorySubWindow(0)
87 , m_editorActions(new QActionGroup(this))
88 , m_managerActions(new QActionGroup(this))
89 , m_spareEditor(new
EditorTab(this,false))
91 , m_projectScriptingPlugin(0)
93 m_spareEditor->hide();
94 m_mdiArea->setViewMode(QMdiArea::TabbedView);
95 m_mdiArea->setActivationOrder(QMdiArea::ActivationHistoryOrder);
96 m_mdiArea->setDocumentMode(
true);
97 #if QT_VERSION >= 0x040800
98 m_mdiArea->setTabsMovable(
true);
101 setCentralWidget(m_mdiArea);
102 connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
this,SLOT(slotSubWindowActivated(QMdiSubWindow*)));
106 m_mdiArea->setOption(QMdiArea::DontMaximizeSubWindowOnActivation,
true);
108 connect(
Project::instance(), SIGNAL(configChanged()),
this, SLOT(projectSettingsChanged()));
121 setAttribute(Qt::WA_DeleteOnClose,
true);
124 if (!qApp->isSessionRestored())
127 KConfigGroup stateGroup(&config,
"State");
133 QTimer::singleShot(0,
this,SLOT(initLater()));
135 void LokalizeMainWindow::initLater()
137 if(!m_prevSubWindow && m_projectSubWindow)
138 slotSubWindowActivated(m_projectSubWindow);
142 KNotification* notification=
new KNotification(
"NoSqlModulesAvailable",
this);
143 notification->setText( i18nc(
"@info",
"No Qt Sql modules were found. Translation memory will not work.") );
144 notification->sendEvent();
151 KConfigGroup stateGroup(&config,
"State");
153 m_multiEditorAdaptor->deleteLater();
156 void LokalizeMainWindow::slotSubWindowActivated(QMdiSubWindow* w)
159 if (!w || m_prevSubWindow==w)
162 w->setUpdatesEnabled(
true);
166 m_prevSubWindow->setUpdatesEnabled(
false);
169 guiFactory()->removeClient( prevEditor->
guiClient() );
172 if (qobject_cast<EditorTab*>(prevEditor))
196 if (qobject_cast<EditorTab*>(editor))
220 QTabBar* tw = m_mdiArea->findChild<QTabBar*>();
221 if(tw) tw->setTabToolTip(tw->currentIndex(), w->
currentUrl().toLocalFile());
225 else if (w==m_projectSubWindow && m_projectSubWindow)
227 QTabBar* tw = m_mdiArea->findChild<QTabBar*>();
233 guiFactory()->addClient( editor->
guiClient() );
243 QList<QMdiSubWindow*> editors=m_mdiArea->subWindowList();
244 int i=editors.size();
248 if (!qobject_cast<EditorTab*>(editors.at(i)->widget()))
250 if (!static_cast<EditorTab*>( editors.at(i)->widget() )->
queryClose())
266 if (!url.isEmpty()&&m_fileToEditor.contains(url)&&m_fileToEditor.value(url))
268 kWarning()<<
"already opened";
269 QMdiSubWindow* sw=m_fileToEditor.value(url);
270 m_mdiArea->setActiveSubWindow(sw);
271 return static_cast<EditorTab*
>(sw->widget());
274 QByteArray state=m_lastEditorState;
278 sw=m_mdiArea->addSubWindow(w);
281 QMdiSubWindow* activeSW=m_mdiArea->currentSubWindow();
282 if (activeSW && qobject_cast<LokalizeSubwindowBase*>(activeSW->widget()))
285 if (!w->
fileOpen(url,baseUrl,silent))
289 m_mdiArea->removeSubWindow(sw);
297 sw=m_mdiArea->addSubWindow(w);
301 if (!state.isEmpty())
302 w->restoreState(QByteArray::fromBase64(state));
308 m_toBeActiveSubWindow=sw;
309 QTimer::singleShot(0,
this,SLOT(applyToBeActiveSubWindow()));
312 sw->setUpdatesEnabled(
false);
314 if (!mergeFile.isEmpty())
317 m_openRecentFileAction->addUrl(w->
currentUrl());
318 connect(sw, SIGNAL(destroyed(
QObject*)),
this,SLOT(editorClosed(
QObject*)));
319 connect(w, SIGNAL(aboutToBeClosed()),
this,SLOT(resetMultiEditorAdaptor()));
320 connect(w, SIGNAL(fileOpenRequested(KUrl,QString,QString)),
this,SLOT(
fileOpen(KUrl,QString,QString)));
323 QString fn=url.fileName();
324 FileToEditor::const_iterator i = m_fileToEditor.constBegin();
325 while (i != m_fileToEditor.constEnd())
327 if (i.key().fileName()==fn)
329 static_cast<EditorTab*
>(i.value()->widget())->setFullPathShown(
true);
336 sw->setAttribute(Qt::WA_DeleteOnClose,
true);
341 void LokalizeMainWindow::resetMultiEditorAdaptor()
346 void LokalizeMainWindow::editorClosed(
QObject* obj)
348 m_fileToEditor.remove(m_fileToEditor.key(static_cast<QMdiSubWindow*>(obj)));
371 if (!m_projectSubWindow)
374 m_projectSubWindow=m_mdiArea->addSubWindow(w);
376 m_projectSubWindow->showMaximized();
377 connect(w, SIGNAL(fileOpenRequested(KUrl)),
this,SLOT(
fileOpen(KUrl)));
378 connect(w, SIGNAL(projectOpenRequested(QString)),
this,SLOT(openProject(QString)));
379 connect(w, SIGNAL(searchRequested(QStringList)),
this,SLOT(
addFilesToSearch(QStringList)));
381 if (m_mdiArea->currentSubWindow()==m_projectSubWindow)
382 return m_projectSubWindow->widget();
389 m_mdiArea->setActiveSubWindow(m_projectSubWindow);
396 KMessageBox::information(0, i18n(
"TM facility requires SQLite Qt module."), i18n(
"No SQLite module available"));
400 if (!m_translationMemorySubWindow)
403 m_translationMemorySubWindow=m_mdiArea->addSubWindow(w);
405 m_translationMemorySubWindow->showMaximized();
406 connect(w, SIGNAL(fileOpenRequested(KUrl,QString,QString)),
this,SLOT(
fileOpen(KUrl,QString,QString)));
409 m_mdiArea->setActiveSubWindow(m_translationMemorySubWindow);
410 return static_cast<TM::TMTab*
>(m_translationMemorySubWindow->widget());
415 if (!m_fileSearchSubWindow)
418 m_fileSearchSubWindow=m_mdiArea->addSubWindow(w);
420 m_fileSearchSubWindow->showMaximized();
425 m_mdiArea->setActiveSubWindow(m_fileSearchSubWindow);
426 return static_cast<FileSearchTab*
>(m_fileSearchSubWindow->widget());
443 void LokalizeMainWindow::applyToBeActiveSubWindow()
445 m_mdiArea->setActiveSubWindow(m_toBeActiveSubWindow);
454 QTime aaa;aaa.start();
456 setStandardToolBarMenuEnabled(
true);
459 KActionCollection* ac=actionCollection();
460 KActionCategory* actionCategory;
461 KActionCategory* file=
new KActionCategory(i18nc(
"@title actions category",
"File"), ac);
463 KActionCategory* glossary=
new KActionCategory(i18nc(
"@title actions category",
"Glossary"), ac);
464 KActionCategory* tm=
new KActionCategory(i18nc(
"@title actions category",
"Translation Memory"), ac);
465 KActionCategory* proj=
new KActionCategory(i18nc(
"@title actions category",
"Project"), ac);
471 file->addAction(KStandardAction::Open,
this, SLOT(
fileOpen()));
472 m_openRecentFileAction = KStandardAction::openRecent(
this,SLOT(
fileOpen(KUrl)),ac);
474 file->addAction(KStandardAction::Quit,KApplication::kApplication(), SLOT(closeAllWindows()));
479 KStandardAction::preferences(sc, SLOT(showSettingsDialog()),ac);
481 #define ADD_ACTION_ICON(_name,_text,_shortcut,_icon)\
482 action = actionCategory->addAction(_name);\
483 action->setText(_text);\
484 action->setShortcuts(KStandardShortcut::shortcut(KStandardShortcut::_shortcut));\
485 action->setIcon(KIcon(_icon));
487 #define ADD_ACTION_SHORTCUT_ICON(_name,_text,_shortcut,_icon)\
488 action = actionCategory->addAction(_name);\
489 action->setText(_text);\
490 action->setShortcut(QKeySequence( _shortcut ));\
491 action->setIcon(KIcon(_icon));
493 #define ADD_ACTION_SHORTCUT(_name,_text,_shortcut)\
494 action = actionCategory->addAction(_name);\
495 action->setShortcut(QKeySequence( _shortcut ));\
496 action->setText(_text);
505 connect(action,SIGNAL(triggered()),m_mdiArea,SLOT(activateNextSubWindow()));
508 connect(action,SIGNAL(triggered()),m_mdiArea,SLOT(activatePreviousSubWindow()));
511 actionCategory=glossary;
513 ADD_ACTION_SHORTCUT(
"tools_glossary",i18nc(
"@action:inmenu",
"Glossary"),Qt::CTRL+Qt::ALT+Qt::Key_G)
514 connect(action,SIGNAL(triggered()),project,SLOT(showGlossary()));
518 connect(action,SIGNAL(triggered()),
this,SLOT(
showTM()));
520 action = tm->addAction(
"tools_tm_manage",project,SLOT(showTMManager()));
521 action->setText(i18nc(
"@action:inmenu",
"Manage translation memories"));
525 ADD_ACTION_SHORTCUT(
"project_overview",i18nc(
"@action:inmenu",
"Project overview"),Qt::Key_F4)
528 action = proj->addAction(
"project_configure",sc,SLOT(projectConfigure()));
529 action->setText(i18nc(
"@action:inmenu",
"Configure project"));
531 action = proj->addAction(
"project_create",sc,SLOT(projectCreate()));
532 action->setText(i18nc(
"@action:inmenu",
"Create new project"));
534 action = proj->addAction(
"project_open",
this,SLOT(openProject()));
535 action->setText(i18nc(
"@action:inmenu",
"Open project"));
536 action->setIcon(KIcon(
"project-open"));
538 m_openRecentProjectAction=
new KRecentFilesAction(i18nc(
"@action:inmenu",
"Open recent project"),
this);
539 action = proj->addAction(
"project_open_recent",m_openRecentProjectAction);
540 connect(m_openRecentProjectAction,SIGNAL(urlSelected(KUrl)),
this,SLOT(openProject(KUrl)));
543 connect(
Project::instance(),SIGNAL(loaded()),
this,SLOT(projectLoaded()), Qt::QueuedConnection);
546 ADD_ACTION_SHORTCUT(
"tools_filesearch",i18nc(
"@action:inmenu",
"Search and replace in files"),Qt::Key_F6)
549 ADD_ACTION_SHORTCUT(
"tools_filesearch_next",i18nc(
"@action:inmenu",
"Find next in files"),Qt::META+Qt::Key_F3)
552 action = ac->addAction(
"tools_widgettextcapture",
this,SLOT(
widgetTextCapture()));
553 action->setText(i18nc(
"@action:inmenu",
"Widget text capture"));
555 setupGUI(Default,
"lokalizemainwindowui.rc");
557 kWarning()<<
"finished"<<aaa.elapsed();
565 KConfigGroup emptyGroup;
568 foreach (QMdiSubWindow* subwindow, m_mdiArea->subWindowList())
570 if (subwindow==m_translationMemorySubWindow && m_translationMemorySubWindow)
571 subwindow->deleteLater();
572 else if (qobject_cast<EditorTab*>(subwindow->widget()))
574 m_fileToEditor.remove(static_cast<EditorTab*>(subwindow->widget())->currentUrl());
575 m_mdiArea->removeSubWindow(subwindow);
576 subwindow->deleteLater();
584 void LokalizeMainWindow::openProject(QString path)
602 QList<QMdiSubWindow*> editors=m_mdiArea->subWindowList();
605 QStringList mergeFiles;
606 QList<QByteArray> dockWidgets;
609 QMdiSubWindow* activeSW=m_mdiArea->currentSubWindow();
610 int activeSWIndex=-1;
611 int i=editors.size();
615 if (!editors.at(i) || !qobject_cast<
EditorTab*>(editors.at(i)->widget()))
617 if (editors.at(i)==activeSW)
618 activeSWIndex=files.size();
620 files.append(state.
url.pathOrUrl());
621 mergeFiles.append(state.
mergeUrl.pathOrUrl());
623 entries.append(state.
entry);
629 if (files.size() == 0 && !m_lastEditorState.isEmpty())
630 dockWidgets.append(m_lastEditorState);
632 if (stateGroup.isValid())
638 projectStateGroup.writeEntry(
"Active",activeSWIndex);
639 projectStateGroup.writeEntry(
"Files",files);
640 projectStateGroup.writeEntry(
"MergeFiles",mergeFiles);
641 projectStateGroup.writeEntry(
"DockWidgets",dockWidgets);
643 projectStateGroup.writeEntry(
"Entries",entries);
644 if (m_projectSubWindow)
648 projectStateGroup.writeEntry(
"UnitsCount", w->
unitsCount());
653 if (!nameSpecifier.isEmpty()) nameSpecifier.prepend(
'-');
654 KConfig* c=stateGroup.isValid()?stateGroup.config():&config;
655 m_openRecentFileAction->saveEntries(KConfigGroup(c,
"RecentFiles"+nameSpecifier));
657 m_openRecentProjectAction->saveEntries(KConfigGroup(&config,
"RecentProjects"));
663 const KConfig* c=stateGroup.isValid()?stateGroup.config():&config;
664 m_openRecentProjectAction->loadEntries(KConfigGroup(c,
"RecentProjects"));
666 QString path=stateGroup.readEntry(
"Project",QString());
671 QTimer::singleShot(0,
this, SLOT(projectLoaded()));
677 void LokalizeMainWindow::projectLoaded()
680 kDebug()<<projectPath;
681 m_openRecentProjectAction->addUrl( KUrl::fromPath(projectPath) );
685 QString nameSpecifier=projectPath;
686 if (!nameSpecifier.isEmpty()) nameSpecifier.prepend(
'-');
687 m_openRecentFileAction->loadEntries(KConfigGroup(&config,
"RecentFiles"+nameSpecifier));
691 KConfigGroup projectStateGroup(&config,
"State-"+projectPath);
694 QStringList mergeFiles;
695 QList<QByteArray> dockWidgets;
699 if (m_projectSubWindow)
704 QTabBar* tw = m_mdiArea->findChild<QTabBar*>();
705 if(tw)
for(
int i=0;i<tw->count();i++)
706 if (tw->tabText(i)==w->windowTitle())
710 entries=projectStateGroup.readEntry(
"Entries",entries);
712 files=projectStateGroup.readEntry(
"Files",files);
713 mergeFiles=projectStateGroup.readEntry(
"MergeFiles",mergeFiles);
714 dockWidgets=projectStateGroup.readEntry(
"DockWidgets",dockWidgets);
716 int activeSWIndex=projectStateGroup.readEntry(
"Active",-1);
717 QStringList failedFiles;
720 if (i<dockWidgets.size())
721 m_lastEditorState=dockWidgets.at(i);
722 if (!
fileOpen(files.at(i), entries.at(i),activeSWIndex==i,mergeFiles.at(i),
true))
723 failedFiles.append(files.at(i));
725 if (!failedFiles.isEmpty())
727 kDebug()<<
"failedFiles"<<failedFiles;
730 KNotification* notification=
new KNotification(
"FilesOpenError",
this);
731 notification->setText( i18nc(
"@info",
"Error opening the following files:\n\n")%
"<filename>"%failedFiles.join(
"</filename><br><filename>")%
"</filename>" );
732 notification->sendEvent();
735 if (files.isEmpty() && dockWidgets.size() > 0)
736 m_lastEditorState=dockWidgets.first();
738 if (activeSWIndex==-1)
740 m_toBeActiveSubWindow=m_projectSubWindow;
741 QTimer::singleShot(0,
this,SLOT(applyToBeActiveSubWindow()));
744 projectSettingsChanged();
746 QTimer::singleShot(0,
this,SLOT(loadProjectScripts()));
749 void LokalizeMainWindow::projectSettingsChanged()
765 #include "mainwindowadaptor.h"
766 #include <kross/core/actioncollection.h>
767 #include <kross/core/manager.h>
769 using namespace Kross;
771 class MyScriptingPlugin:
public Kross::ScriptingPlugin
775 : Kross::ScriptingPlugin(lokalize)
777 addObject(lokalize,
"Lokalize");
779 addObject(editor,
"Editor");
780 setXMLFile(
"scriptsui.rc",
true);
782 ~MyScriptingPlugin(){}
785 #define PROJECTRCFILE "scripts.rc"
786 #define PROJECTRCFILEDIR Project::instance()->projectDir()+"/lokalize-scripts"
787 #define PROJECTRCFILEPATH Project::instance()->projectDir()+"/lokalize-scripts" "/" PROJECTRCFILE
790 : Kross::ScriptingPlugin(
Project::instance()->kind(),
792 Project::instance()->kind(), lokalize)
798 if (!QFile::exists(filepath))
800 KUrl dir = KUrl(filepath).directory();
801 KIO::NetAccess::mkdir(dir, 0);
803 f.open(QIODevice::WriteOnly);
805 out <<
"<!-- see help for the syntax -->";
810 addObject(lokalize,
"Lokalize",ChildrenInterface::AutoConnectSignals);
812 addObject(editor,
"Editor",ChildrenInterface::AutoConnectSignals);
813 setXMLFile(
"scriptsui.rc",
true);
818 Kross::ScriptingPlugin::setDOMDocument(document, merge);
819 QTimer::singleShot(0,
this, SLOT(doAutoruns()));
822 void ProjectScriptingPlugin::doAutoruns()
824 Kross::ActionCollection* collection=Kross::Manager::self().actionCollection()->collection(
Project::instance()->kind());
825 if (!collection)
return;
826 foreach(
const QString &collectionname, collection->collections())
828 Kross::ActionCollection* c = collection->collection(collectionname);
829 if(!c->isEnabled())
continue;
831 foreach(Kross::Action* action, c->actions())
833 if (action->property(
"autorun").toBool())
843 Kross::ActionCollection* collection=Kross::Manager::self().actionCollection()->collection(
Project::instance()->kind());
844 if (!collection)
return;
848 kWarning()<<rcdir.entryList(QStringList(
"*.rc"),QDir::Files);
849 foreach(
const QString& rc, QDir(
PROJECTRCFILEDIR).entryList(QStringList(
"*.rc"),QDir::Files))
851 kWarning()<<rc<<collection->readXmlFile(rcdir.absoluteFilePath(rc));
873 new MainWindowAdaptor(
this);
874 QDBusConnection::sessionBus().registerObject(
"/ThisIsWhatYouWant",
this);
875 QDBusConnection::sessionBus().unregisterObject(
"/KDebug",QDBusConnection::UnregisterTree);
880 guiFactory()->addClient(
new MyScriptingPlugin(
this,m_multiEditorAdaptor));
892 void LokalizeMainWindow::loadProjectScripts()
895 if (m_projectScriptingPlugin)
897 qWarning()<<
"loadProjectScripts() 222";
898 guiFactory()->removeClient(m_projectScriptingPlugin);
899 delete m_projectScriptingPlugin;
902 qWarning()<<
"loadProjectScripts() 333";
909 delete m_projectScriptingPlugin;
910 qWarning()<<
"loadProjectScripts() 444";
912 qWarning()<<
"loadProjectScripts() 555";
913 guiFactory()->addClient(m_projectScriptingPlugin);
914 qWarning()<<
"loadProjectScripts() 666";
928 w->
lookup(source, target);
955 QList<QMdiSubWindow*> editors=m_mdiArea->subWindowList();
956 QMdiSubWindow* activeSW=m_mdiArea->currentSubWindow();
957 if (!activeSW || !qobject_cast<EditorTab*>(activeSW->widget()))
959 return activeSW->widget();
964 if (!m_fileToEditor.contains(KUrl(path)))
return 0;
965 QMdiSubWindow* w=m_fileToEditor.value(KUrl(path));
967 return static_cast<EditorTab*
>(w->widget());
973 if (!editor)
return -1;
990 setObjectName(
"MultiEditorAdaptor");
991 connect(parent,SIGNAL(destroyed(
QObject*)),
this,SLOT(handleParentDestroy(
QObject*)));
997 disconnect(parent(),SIGNAL(destroyed(
QObject*)),
this,SLOT(handleParentDestroy(
QObject*)));
999 connect(e,SIGNAL(destroyed(
QObject*)),
this,SLOT(handleParentDestroy(
QObject*)));
1001 setAutoRelaySignals(
false);
1002 setAutoRelaySignals(
true);
1005 void MultiEditorAdaptor::handleParentDestroy(
QObject* p)
1008 kWarning()<<
"avoiding destroying m_multiEditorAdaptor";
1023 QTimer::singleShot(1,
this,SLOT(doOpen()));
1026 void DelayedFileOpener::doOpen()
1028 int lastIndex=m_urls.count()-1;
1029 for (
int i=0;i<=lastIndex;i++)
1030 m_lmw->
fileOpen(m_urls.at(i), 0, i==lastIndex);
1035 #include "lokalizemainwindow.moc"
1037 #include "lokalizesubwindowbase.moc"
1038 #include "multieditoradaptor.moc"
#define PROJECTRCFILEPATH
ThreadWeaver::Weaver * weaver()
void mergeOpen(KUrl url=KUrl())
void registerStatusBar(KStatusBar *)
static Project * instance()
void setLegacyUnitsCount(int to)
Q_SCRIPTABLE void showProjectOverview()
Q_SCRIPTABLE int editorIndexForFile(const QString &path)
part of editor DBus path: /ThisIsWhatYouWant/Editor/
Q_SCRIPTABLE bool findEntryBySourceContext(const QString &source, const QString &ctxt)
void setEditorTab(EditorTab *e)
static ProjectLocal * local()
virtual void showDocks()=0
#define ID_STATUS_CURRENT
Q_SCRIPTABLE int openFileInEditor(const QString &path)
Adds new editor with.
void readProperties(const KConfigGroup &stateGroup)
This struct represents a position in a catalog.
int lookupInTranslationMemory(DocPosition::Part part, const QString &text)
ProjectScriptingPlugin(QObject *lokalize, QObject *editor)
Hack over QDBusAbstractAdaptor to get kross active-editor-adaptor for free.
Singleton object that represents project.
Global file search/repalce tab.
Q_SCRIPTABLE QString dbusName()
virtual KXMLGUIClient * guiClient()=0
void registerDBusAdaptor()
Q_SCRIPTABLE void busyCursor(bool busy)
bool queryCloseForAuxiliaryWindows()
Q_SCRIPTABLE void addFilesToSearch(const QStringList &)
Q_SCRIPTABLE void editorActivated()
virtual void hideDocks()=0
void saveProjectState(KConfigGroup &)
Q_SCRIPTABLE int openFileInEditorAt(const QString &path, const QString &source, const QString &ctxt)
MultiEditorAdaptor(EditorTab *parent)
Interface for LokalizeMainWindow.
Q_SCRIPTABLE QObject * editorForFile(const QString &path)
void setFullPathShown(bool)
static SettingsController * instance()
void load(const QString &file)
QString projectOpen(QString path=QString(), bool doOpen=true)
Lokalize MDI (tabbed) window.
#define ID_STATUS_ISFUZZY
Q_SCRIPTABLE QObject * activeEditor()
Q_SCRIPTABLE bool closeProject()
StatusBarProxy statusBarItems
void gotoEntry(DocPosition pos, int selection=0)
Q_SCRIPTABLE void lookup(QString source, QString target)
Singleton that manages cfgs for Lokalize and projects.
~ProjectScriptingPlugin()
FileSearchTab * showFileSearch(bool activate=true)
void unregisterStatusBar()
void addFilesToSearch(const QStringList &)
bool firstRun() const
Get FirstRun.
Q_SCRIPTABLE QObject * projectOverview()
DelayedFileOpener(const KUrl::List &urls, LokalizeMainWindow *lmw)
Q_SCRIPTABLE void editorAdded()
#define ADD_ACTION_SHORTCUT(_name, _text, _shortcut)
void saveProperties(KConfigGroup &stateGroup)
Q_SCRIPTABLE QString currentProject()
EditorTab * fileOpen(KUrl url=KUrl(), int entry=0, bool setAsActive=true, const QString &mergeFile=QString(), bool silent=false)
Q_SCRIPTABLE int showTranslationMemory()
void setDOMDocument(const QDomDocument &document, bool merge=false)
bool fileOpen(KUrl url=KUrl(), KUrl baseUrl=KUrl(), bool silent=false)
#define ID_STATUS_UNTRANS