lokalize
lokalizemainwindow.cpp
Go to the documentation of this file.
102 connect(m_mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),this,SLOT(slotSubWindowActivated(QMdiSubWindow*)));
143 notification->setText( i18nc("@info","No Qt Sql modules were found. Translation memory will not work.") );
167 LokalizeSubwindowBase* prevEditor=static_cast<LokalizeSubwindowBase2*>( m_prevSubWindow->widget() );
189 //static_cast<Kross::Action*>(actionz.at(i))->addObject(static_cast<EditorWindow*>( editor )->adaptor(),"Editor",Kross::ChildrenInterface::AutoConnectSignals);
216 //static_cast<Kross::Action*>(actionz.at(i))->addObject(static_cast<EditorWindow*>( editor )->adaptor(),"Editor",Kross::ChildrenInterface::AutoConnectSignals);
264 EditorTab* LokalizeMainWindow::fileOpen(KUrl url, int entry, bool setAsActive, const QString& mergeFile, bool silent)
277 if (!url.isEmpty())//create QMdiSubWindow BEFORE fileOpen() because it causes some strange QMdiArea behaviour otherwise
320 connect(w, SIGNAL(fileOpenRequested(KUrl,QString,QString)),this,SLOT(fileOpen(KUrl,QString,QString)));
321 connect(w, SIGNAL(tmLookupRequested(QString,QString)),this,SLOT(lookupInTranslationMemory(QString,QString)));
343 m_multiEditorAdaptor->setEditorTab(m_spareEditor); //it will be reparented shortly if there are other editors
351 EditorTab* LokalizeMainWindow::fileOpen(const KUrl& url, const QString& source, const QString& ctxt)
396 KMessageBox::information(0, i18n("TM facility requires SQLite Qt module."), i18n("No SQLite module available"));
406 connect(w, SIGNAL(fileOpenRequested(KUrl,QString,QString)),this,SLOT(fileOpen(KUrl,QString,QString)));
421 connect(w, SIGNAL(fileOpenRequested(KUrl,DocPosition,int)),this,SLOT(fileOpen(KUrl,DocPosition,int)));
462 //KActionCategory* config=new KActionCategory(i18nc("@title actions category","Configuration"), ac);
464 KActionCategory* tm=new KActionCategory(i18nc("@title actions category","Translation Memory"), ac);
513 ADD_ACTION_SHORTCUT("tools_glossary",i18nc("@action:inmenu","Glossary"),Qt::CTRL+Qt::ALT+Qt::Key_G)
538 m_openRecentProjectAction=new KRecentFilesAction(i18nc("@action:inmenu","Open recent project"),this);
542 //Qt::QueuedConnection: defer until event loop is running to eliminate QWidgetPrivate::showChildren(bool) startup crash
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)
670 //2. defer until event loop is running to eliminate QWidgetPrivate::showChildren(bool) startup crash
722 if (!fileOpen(files.at(i), entries.at(i)/*, offsets.at(i)*//*,&activeSW11*/,activeSWIndex==i,mergeFiles.at(i),/*silent*/true))
729 // "<br><il><li><filename>"+failedFiles.join("</filename></li><li><filename>")+"</filename></li></il>" );
731 notification->setText( i18nc("@info","Error opening the following files:\n\n")%"<filename>"%failedFiles.join("</filename><br><filename>")%"</filename>" );
787 #define PROJECTRCFILEPATH Project::instance()->projectDir()+"/lokalize-scripts" "/" PROJECTRCFILE
824 Kross::ActionCollection* collection=Kross::Manager::self().actionCollection()->collection(Project::instance()->kind());
843 Kross::ActionCollection* collection=Kross::Manager::self().actionCollection()->collection(Project::instance()->kind());
858 QStringList services=QDBusConnection::sessionBus().interface()->registeredServiceNames().value();
864 QDBusConnection::callWithCallback(QDBusMessage::createMethodCall(services.at(i),"/ThisIsWhatYouWant","org.kde.Lokalize.MainWindow","currentProject"),
941 int LokalizeMainWindow::openFileInEditorAt(const QString& path, const QString& source, const QString& ctxt)
983 void LokalizeMainWindow::busyCursor(bool busy){busy?QApplication::setOverrideCursor(Qt::WaitCursor):QApplication::restoreOverrideCursor();}
bool contains(const Key &key) const
void registerStatusBar(KStatusBar *)
Definition: actionproxy.cpp:104
Definition: pos.h:44
QString & prepend(QChar ch)
Definition: lokalizemainwindow.h:173
const_iterator constBegin() const
const T & at(int i) const
Q_SCRIPTABLE void showProjectOverview()
Definition: lokalizemainwindow.cpp:386
bool registerObject(const QString &path, QObject *object, QFlags< QDBusConnection::RegisterOption > options)
bool isEmpty() const
Q_SCRIPTABLE int editorIndexForFile(const QString &path)
part of editor DBus path: /ThisIsWhatYouWant/Editor/
Definition: lokalizemainwindow.cpp:970
void setAttribute(Qt::WidgetAttribute attribute, bool on)
Q_SCRIPTABLE bool findEntryBySourceContext(const QString &source, const QString &ctxt)
Definition: editortab_findreplace.cpp:672
QWidget * widget() const
void setEditorTab(EditorTab *e)
Definition: lokalizemainwindow.cpp:994
QDBusConnection sessionBus()
virtual void showDocks()=0
Q_SCRIPTABLE int openFileInEditor(const QString &path)
Adds new editor with.
Definition: lokalizemainwindow.cpp:948
QString join(const QString &separator) const
bool exists() const
void readProperties(const KConfigGroup &stateGroup)
Definition: lokalizemainwindow.cpp:660
void setViewMode(ViewMode mode)
void setActiveSubWindow(QMdiSubWindow *window)
int size() const
QMdiSubWindow * currentSubWindow() const
count
int lookupInTranslationMemory(DocPosition::Part part, const QString &text)
Definition: lokalizemainwindow.cpp:917
ProjectScriptingPlugin(QObject *lokalize, QObject *editor)
Definition: lokalizemainwindow.cpp:789
int elapsed() const
Hack over QDBusAbstractAdaptor to get kross active-editor-adaptor for free.
Definition: multieditoradaptor.h:37
void append(const T &value)
void showMaximized()
virtual KXMLGUIClient * guiClient()=0
void setUpdatesEnabled(bool enable)
bool isEmpty() const
bool isEmpty() const
void removeSubWindow(QWidget *widget)
const_iterator constEnd() const
QString tabText(int index) const
void registerDBusAdaptor()
Definition: lokalizemainwindow.cpp:871
void setTabsMovable(bool movable)
Q_SCRIPTABLE void busyCursor(bool busy)
Definition: lokalizemainwindow.cpp:983
bool queryCloseForAuxiliaryWindows()
Definition: project.cpp:226
void setOverrideCursor(const QCursor &cursor)
void restoreOverrideCursor()
QMdiSubWindow * addSubWindow(QWidget *widget, QFlags< Qt::WindowType > windowFlags)
Q_SCRIPTABLE void addFilesToSearch(const QStringList &)
Definition: filesearchtab.cpp:763
Q_SCRIPTABLE void editorActivated()
virtual void hideDocks()=0
void deleteLater()
T & first()
currentIndex
void unregisterObject(const QString &path, UnregisterMode mode)
QList< QMdiSubWindow * > subWindowList(WindowOrder order) const
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
void saveProjectState(KConfigGroup &)
Definition: lokalizemainwindow.cpp:600
Q_SCRIPTABLE int openFileInEditorAt(const QString &path, const QString &source, const QString &ctxt)
Definition: lokalizemainwindow.cpp:941
MultiEditorAdaptor(EditorTab *parent)
Definition: lokalizemainwindow.cpp:987
Q_SCRIPTABLE QObject * editorForFile(const QString &path)
Definition: lokalizemainwindow.cpp:962
virtual void close()
const Key key(const T &value) const
QString projectOpen(QString path=QString(), bool doOpen=true)
Definition: prefs.cpp:196
Q_SCRIPTABLE QObject * activeEditor()
Definition: lokalizemainwindow.cpp:953
Q_SCRIPTABLE bool closeProject()
Definition: lokalizemainwindow.cpp:560
StatusBarProxy statusBarItems
Definition: lokalizesubwindowbase.h:63
Definition: editortab.h:60
QByteArray fromBase64(const QByteArray &base64)
~ProjectScriptingPlugin()
Definition: lokalizemainwindow.cpp:841
FileSearchTab * showFileSearch(bool activate=true)
Definition: lokalizemainwindow.cpp:413
QStringList entryList(QFlags< QDir::Filter > filters, QFlags< QDir::SortFlag > sort) const
Definition: pos.h:43
void setOption(AreaOption option, bool on)
void addFilesToSearch(const QStringList &)
Definition: lokalizemainwindow.cpp:436
QString absoluteFilePath(const QString &fileName) const
Q_SCRIPTABLE QObject * projectOverview()
Definition: lokalizemainwindow.cpp:369
DelayedFileOpener(const KUrl::List &urls, LokalizeMainWindow *lmw)
Definition: lokalizemainwindow.cpp:1016
Q_SCRIPTABLE void editorAdded()
void start()
iterator insert(const Key &key, const T &value)
QByteArray toBase64() const
#define ADD_ACTION_SHORTCUT(_name, _text, _shortcut)
void setDocumentMode(bool enabled)
void setTabToolTip(int index, const QString &tip)
void saveProperties(KConfigGroup &stateGroup)
Definition: lokalizemainwindow.cpp:595
Q_SCRIPTABLE QString currentProject()
Definition: lokalizemainwindow.cpp:978
EditorTab * fileOpen(KUrl url=KUrl(), int entry=0, bool setAsActive=true, const QString &mergeFile=QString(), bool silent=false)
Definition: lokalizemainwindow.cpp:264
Definition: pos.h:42
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
Q_SCRIPTABLE int showTranslationMemory()
Definition: lokalizemainwindow.cpp:933
void setDOMDocument(const QDomDocument &document, bool merge=false)
Definition: lokalizemainwindow.cpp:816
bool fileOpen(KUrl url=KUrl(), KUrl baseUrl=KUrl(), bool silent=false)
Definition: editortab.cpp:789
const T value(const Key &key) const
void setActivationOrder(WindowOrder order)
int remove(const Key &key)
singleShot
T findChild(const QString &name) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.