summaryrefslogtreecommitdiffstats
path: root/kommander/editor/mainwindowactions.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/editor/mainwindowactions.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/mainwindowactions.cpp')
-rw-r--r--kommander/editor/mainwindowactions.cpp288
1 files changed, 146 insertions, 142 deletions
diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp
index a4d4c430..f57afd72 100644
--- a/kommander/editor/mainwindowactions.cpp
+++ b/kommander/editor/mainwindowactions.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -19,6 +19,10 @@
#include "mainwindow.h"
+#ifdef QT_NO_SQL
+#define TQT_NO_SQL
+#endif // QT_NO_SQL
+
#include <tqapplication.h>
#include <tqclipboard.h>
#include <tqfileinfo.h>
@@ -26,7 +30,7 @@
#include <tqlistbox.h>
#include <tqsignalmapper.h>
#include <tqspinbox.h>
-#include <tqstatusbar.h>
+#include <statusbar.h>
#include <tqstylefactory.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
@@ -47,7 +51,7 @@
#include "connectioneditorimpl.h"
#include "actioneditorimpl.h"
#include "formfile.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "dbconnectionsimpl.h"
#include "dbconnectionimpl.h"
#endif
@@ -92,81 +96,81 @@ int forms = 0;
void MainWindow::setupEditActions()
{
- actionEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
+ actionEditUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(editUndo()), actionCollection());
actionEditUndo->setText(i18n("&Undo: Not Available"));
actionEditUndo->setToolTip(i18n("Undoes the last action"));
actionEditUndo->setWhatsThis(whatsThisFrom("Edit|Undo"));
actionEditUndo->setEnabled(false);
- actionEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
+ actionEditRedo = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(editRedo()), actionCollection());
actionEditRedo->setText(i18n("&Redo: Not Available"));
actionEditRedo->setToolTip(i18n("Redoes the last undone operation"));
actionEditRedo->setWhatsThis(whatsThisFrom("Edit|Redo"));
actionEditRedo->setEnabled(false);
- actionEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
+ actionEditCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(editCut()), actionCollection());
actionEditCut->setToolTip(i18n("Cuts the selected widgets and puts them on the clipboard"));
actionEditCut->setWhatsThis(whatsThisFrom("Edit|Cut"));
actionEditCut->setEnabled(false);
- actionEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
+ actionEditCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(editCopy()), actionCollection());
actionEditCopy->setToolTip(i18n("Copies the selected widgets to the clipboard"));
actionEditCopy->setWhatsThis(whatsThisFrom("Edit|Copy"));
actionEditCopy->setEnabled(false);
- actionEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
+ actionEditPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(editPaste()), actionCollection());
actionEditPaste->setToolTip(i18n("Pastes the clipboard's contents"));
actionEditPaste->setWhatsThis(whatsThisFrom("Edit|Paste"));
actionEditPaste->setEnabled(false);
- actionEditDelete = new KAction(i18n("Delete"), Key_Delete, this, TQT_SLOT(editDelete()),
+ actionEditDelete = new KAction(i18n("Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(editDelete()),
actionCollection(), "edit_delete");
actionEditDelete->setToolTip(i18n("Deletes the selected widgets"));
actionEditDelete->setWhatsThis(whatsThisFrom("Edit|Delete"));
actionEditDelete->setEnabled(false);
- actionEditSelectAll = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
+ actionEditSelectAll = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(editSelectAll()), actionCollection());
actionEditSelectAll->setToolTip(i18n("Selects all widgets"));
actionEditSelectAll->setWhatsThis(whatsThisFrom("Edit|Select All"));
actionEditRaise = new KAction(i18n("Bring to Front"), createIconSet("editraise.xpm"),
- KShortcut::null(), this, TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
actionEditRaise->setToolTip(i18n("Raises the selected widgets"));
actionEditRaise->setEnabled(false);
actionEditLower = new KAction(i18n("Send to Back"), createIconSet("editlower.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLower()), actionCollection(), "edit_lower");
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLower()), actionCollection(), "edit_lower");
actionEditLower->setToolTip(i18n("Lowers the selected widgets"));
actionEditLower->setWhatsThis(i18n("Lowers the selected widgets"));
actionEditLower->setEnabled(false);
- actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
+ actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, TQT_TQOBJECT(this), TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
actionEditFindGlobal->setToolTip(i18n("Search for a text in the whole form."));
actionEditFindGlobal->setWhatsThis(whatsThisFrom("Edit|Find in Form"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, TQT_SLOT(setEnabled(bool)));
- actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()),
+ actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, TQT_TQOBJECT(this), TQT_SLOT(editAccels()),
actionCollection(), "edit_check_accel");
actionEditAccels->setToolTip(i18n("Checks if the accelerators used in the form are unique"));
actionEditAccels->setWhatsThis(whatsThisFrom("Edit|Check Accelerator"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditAccels, TQT_SLOT(setEnabled(bool)));
actionEditConnections = new KAction(i18n("Connections"), createIconSet("connecttool.xpm"),
- KShortcut::null(), this, TQT_SLOT(editConnections()), actionCollection(),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editConnections()), actionCollection(),
"edit_connections");
actionEditConnections->setToolTip(i18n("Opens a dialog for editing connections"));
actionEditConnections->setWhatsThis(whatsThisFrom("Edit|Connections"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditConnections, TQT_SLOT(setEnabled(bool)));
actionEditFormSettings = new KAction(i18n("Form Settings..."), KShortcut::null(),
- this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
+ TQT_TQOBJECT(this), TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
actionEditFormSettings->setToolTip(i18n("Opens a dialog to change the form's settings"));
actionEditFormSettings->setWhatsThis(whatsThisFrom("Edit|Form Settings"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFormSettings, TQT_SLOT(setEnabled(bool)));
KToolBar *tb = new KToolBar(this, "Edit");
tb->setFullSize(false);
- TQWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%1").tqarg(toolbarHelp));
addToolBar(tb, i18n("Edit"));
actionEditUndo->plug(tb);
actionEditRedo->plug(tb);
@@ -198,70 +202,70 @@ void MainWindow::setupEditActions()
void MainWindow::setupLayoutActions()
{
actionEditAdjustSize = new KAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"),
- CTRL + Key_J, this, TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
+ CTRL + Key_J, TQT_TQOBJECT(this), TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
actionEditAdjustSize->setToolTip(i18n("Adjusts the size of the selected widget"));
actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size"));
actionEditAdjustSize->setEnabled(false);
- actionEditHLayout = new KAction(i18n("Lay Out Horizontally"), createIconSet("edithlayout.xpm"),
- CTRL + Key_H, this, TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
+ actionEditHLayout = new KAction(i18n("Lay OutQt::Horizontally"), createIconSet("edithtqlayout.xpm"),
+ CTRL + Key_H, TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally"));
- actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally"));
+ actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally"));
actionEditHLayout->setEnabled(false);
- actionEditVLayout = new KAction(i18n("Lay Out Vertically"), createIconSet("editvlayout.xpm"),
- CTRL + Key_L, this, TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
+ actionEditVLayout = new KAction(i18n("Lay OutQt::Vertically"), createIconSet("editvtqlayout.xpm"),
+ CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically"));
- actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically"));
+ actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically"));
actionEditVLayout->setEnabled(false);
actionEditGridLayout = new KAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"),
- CTRL + Key_G, this, TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
+ CTRL + Key_G, TQT_TQOBJECT(this), TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
actionEditGridLayout->setToolTip(i18n("Lays out the selected widgets in a grid"));
actionEditGridLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out in a Grid"));
actionEditGridLayout->setEnabled(false);
- actionEditSplitHorizontal = new KAction(i18n("Lay Out Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
+ actionEditSplitHorizontal = new KAction(i18n("Lay OutQt::Horizontally in Splitter"), createIconSet("editvtqlayoutsplit.xpm"),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
"edit_split_h");
actionEditSplitHorizontal->setToolTip(i18n("Lays out the selected widgets horizontally in a splitter"));
- actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally in Splitter"));
+ actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally in Splitter"));
actionEditSplitHorizontal->setEnabled(false);
- actionEditSplitVertical = new KAction(i18n("Lay Out Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
+ actionEditSplitVertical = new KAction(i18n("Lay OutQt::Vertically in Splitter"), createIconSet("edithtqlayoutsplit.xpm"),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
"edit_split_v");
actionEditSplitVertical->setToolTip(i18n("Lays out the selected widgets vertically in a splitter"));
- actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically (in Splitter)"));
+ actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically (in Splitter)"));
actionEditSplitVertical->setEnabled(false);
actionEditBreakLayout = new KAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"),
- CTRL + Key_B, this, TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
- actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout"));
+ CTRL + Key_B, TQT_TQOBJECT(this), TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
+ actionEditBreakLayout->setToolTip(i18n("Breaks the selected tqlayout"));
actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout"));
int id = WidgetDatabase::idFromClassName("Spacer");
- KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), this, TQT_SLOT(toolSelected()),
+ KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(toolSelected()),
actionCollection(), TQString::number(id).latin1());
a->setExclusiveGroup("tool");
a->setText(i18n("Add ") + WidgetDatabase::className(id));
- a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::toolTip(id)));
+ a->setToolTip(i18n("Insert a %1").tqarg(WidgetDatabase::toolTip(id)));
a->setWhatsThis(i18n("<b>A %1</b><p>%2</p>"
"<p>Click to insert a single %3,"
- "or double click to keep the tool selected.").arg(WidgetDatabase::toolTip(id)).
- arg(WidgetDatabase::whatsThis(id)).arg(WidgetDatabase::toolTip(id)));
-
- TQWhatsThis::add(layoutToolBar, i18n("<b>The Layout toolbar</b>%1").arg(toolbarHelp));
- actionEditAdjustSize->plug(layoutToolBar);
- layoutToolBar->addSeparator();
- actionEditHLayout->plug(layoutToolBar);
- actionEditVLayout->plug(layoutToolBar);
- actionEditGridLayout->plug(layoutToolBar);
- actionEditSplitHorizontal->plug(layoutToolBar);
- actionEditSplitVertical->plug(layoutToolBar);
- actionEditBreakLayout->plug(layoutToolBar);
- layoutToolBar->addSeparator();
- a->plug(layoutToolBar);
+ "or double click to keep the tool selected.").tqarg(WidgetDatabase::toolTip(id)).
+ tqarg(WidgetDatabase::whatsThis(id)).tqarg(WidgetDatabase::toolTip(id)));
+
+ TQWhatsThis::add(tqlayoutToolBar, i18n("<b>The Layout toolbar</b>%1").tqarg(toolbarHelp));
+ actionEditAdjustSize->plug(tqlayoutToolBar);
+ tqlayoutToolBar->addSeparator();
+ actionEditHLayout->plug(tqlayoutToolBar);
+ actionEditVLayout->plug(tqlayoutToolBar);
+ actionEditGridLayout->plug(tqlayoutToolBar);
+ actionEditSplitHorizontal->plug(tqlayoutToolBar);
+ actionEditSplitVertical->plug(tqlayoutToolBar);
+ actionEditBreakLayout->plug(tqlayoutToolBar);
+ tqlayoutToolBar->addSeparator();
+ a->plug(tqlayoutToolBar);
TQPopupMenu *menu = new TQPopupMenu(this, "Layout");
menuBar()->insertItem(i18n("&Layout"), menu);
@@ -280,21 +284,21 @@ void MainWindow::setupLayoutActions()
void MainWindow::setupToolActions()
{
actionPointerTool = new KToggleAction(i18n("Pointer"), "arrow", Key_F2,
- this, TQT_SLOT(toolSelected()), actionCollection(),
+ TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(POINTER_TOOL).latin1());
actionPointerTool->setToolTip(i18n("Selects the pointer tool"));
actionPointerTool->setWhatsThis(whatsThisFrom("Tools|Pointer"));
actionPointerTool->setExclusiveGroup("tool");
actionConnectTool = new KToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"),
- Key_F3, this, TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F3, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(CONNECT_TOOL).latin1());
actionConnectTool->setToolTip(i18n("Selects the connection tool"));
actionConnectTool->setWhatsThis(whatsThisFrom("Tools|Connect Signals and Slots"));
actionConnectTool->setExclusiveGroup("tool");
actionOrderTool = new KToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"),
- Key_F4, this, TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F4, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(ORDER_TOOL).latin1());
actionOrderTool->setToolTip(i18n("Selects the tab order tool"));
actionOrderTool->setWhatsThis(whatsThisFrom("Tools|Tab Order"));
@@ -302,7 +306,7 @@ void MainWindow::setupToolActions()
KToolBar *tb = new KToolBar(this, "Tools");
tb->setFullSize(false);
- TQWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%1").tqarg(toolbarHelp));
addToolBar(tb, i18n("Tools"), TQMainWindow::DockTop, true);
actionPointerTool->plug(tb);
@@ -326,14 +330,14 @@ void MainWindow::setupToolActions()
bool plural = grp[(int) grp.length() - 1] == 's';
if (plural)
{
- TQWhatsThis::add(tb, i18n("<b>The %1</b>%2").arg(grp).arg(toolbarHelp).
- arg(i18n(" Click on a button to insert a single widget, "
- "or double click to insert multiple %1.")).arg(grp));
+ TQWhatsThis::add(tb, i18n("<b>The %1</b>%2").tqarg(grp).tqarg(toolbarHelp).
+ tqarg(i18n(" Click on a button to insert a single widget, "
+ "or double click to insert multiple %1.")).tqarg(grp));
} else
{
- TQWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").arg(grp).arg(toolbarHelp).
- arg(i18n(" Click on a button to insert a single %1 widget, "
- "or double click to insert multiple widgets.")).arg(grp));
+ TQWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").tqarg(grp).tqarg(toolbarHelp).
+ tqarg(i18n(" Click on a button to insert a single %1 widget, "
+ "or double click to insert multiple widgets.")).tqarg(grp));
}
addToolBar(tb, grp);
TQPopupMenu *menu = new TQPopupMenu(this, grp.latin1());
@@ -344,7 +348,7 @@ void MainWindow::setupToolActions()
if (WidgetDatabase::group(i) != grp)
continue; // only widgets, i.e. not forms and temp stuff
KToggleAction *a = new KToggleAction(WidgetDatabase::className(i), KShortcut::null(),
- this, TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
+ TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
a->setExclusiveGroup("tool");
TQString atext = WidgetDatabase::className(i);
if (atext[0] == 'Q')
@@ -359,11 +363,11 @@ void MainWindow::setupToolActions()
a->setToolTip(ttip);
if (!WidgetDatabase::isWhatsThisLoaded())
WidgetDatabase::loadWhatsThis(documentationPath());
- a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::className(i)));
+ a->setToolTip(i18n("Insert a %1").tqarg(WidgetDatabase::className(i)));
- TQString whats = i18n("<b>A %1</b>").arg(WidgetDatabase::className(i));
+ TQString whats = i18n("<b>A %1</b>").tqarg(WidgetDatabase::className(i));
if (!WidgetDatabase::whatsThis(i).isEmpty())
- whats += TQString("<p>%1</p>").arg(WidgetDatabase::whatsThis(i));
+ whats += TQString("<p>%1</p>").tqarg(WidgetDatabase::whatsThis(i));
a->setWhatsThis(whats + i18n("<p>Double click on this tool to keep it selected.</p>"));
if (grp != "KDE")
@@ -381,16 +385,16 @@ void MainWindow::setupToolActions()
if (!TQFile::exists(*it))
continue;
TQDir dir(*it);
- const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
+ const TQFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
if (fileList)
- for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
+ for (TQFileInfoListIterator fit(*fileList); fit.current(); ++fit)
{
TQFileInfo* fi = fit.current();
if (!fi->isFile() || fi->extension() != "kmdr")
continue;
TQString name = fi->baseName();
- name = name.replace("_", " ");
- editMenu->insertItem(name, this, TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
+ name = name.tqreplace("_", " ");
+ editMenu->insertItem(name, TQT_TQOBJECT(this), TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
m_editorTools.append(fi->filePath());
}
}
@@ -405,29 +409,29 @@ void MainWindow::setupFileActions()
fileTb = new KToolBar(this, "File");
fileTb->setFullSize(false);
- TQWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%1").tqarg(toolbarHelp));
addToolBar(fileTb, i18n("File"));
fileMenu = new TQPopupMenu(this, "File");
menuBar()->insertItem(i18n("&File"), fileMenu);
- KAction *a = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection());
a->setToolTip(i18n("Creates a new dialog"));
a->setWhatsThis(whatsThisFrom("File|New"));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ a = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());
a->setToolTip(i18n("Opens an existing dialog"));
a->setWhatsThis(whatsThisFrom("File|Open"));
a->plug(fileTb);
a->plug(fileMenu);
- actionRecent = KStdAction::openRecent(this, TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
+ actionRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
actionRecent->setToolTip(i18n("Opens recently open file"));
actionRecent->plug(fileMenu);
fileMenu->insertSeparator();
- a = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
+ a = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(fileClose()), actionCollection());
a->setToolTip(i18n("Closes the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Close"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -435,20 +439,20 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ a = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(fileSave()), actionCollection());
a->setToolTip(i18n("Saves the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Save"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ a = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(fileSaveAs()), actionCollection());
a->setToolTip(i18n("Saves the current dialog with a new filename"));
a->setWhatsThis(whatsThisFrom("File|Save As"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileMenu);
- a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, TQT_SLOT(fileSaveAll()),
+ a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(fileSaveAll()),
actionCollection(), "file_close_all");
a->setToolTip(i18n("Saves all open dialogs"));
a->setWhatsThis(whatsThisFrom("File|Save All"));
@@ -457,7 +461,7 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
+ a = KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection());
a->setToolTip(i18n("Quits the application and prompts to save any changed dialogs"));
a->setWhatsThis(whatsThisFrom("File|Exit"));
a->plug(fileMenu);
@@ -470,7 +474,7 @@ void MainWindow::setupRunActions()
menuBar()->insertItem(i18n("&Run"), menu);
KAction* a = new KAction(i18n("Run Dialog"), "run", CTRL + Key_R,
- this, TQT_SLOT(runForm()), actionCollection(), "run");
+ TQT_TQOBJECT(this), TQT_SLOT(runForm()), actionCollection(), "run");
a->setToolTip(i18n("Executes dialog"));
a->setWhatsThis(whatsThisFrom("Run|Run dialog"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -478,8 +482,8 @@ void MainWindow::setupRunActions()
a->plug(menu);
// add KDE4 executor
- KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + Qt::Key_R,
- this, TQT_SLOT(runForm4()), actionCollection(), "run4");
+ KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + TQt::Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT(runForm4()), actionCollection(), "run4");
b->setToolTip(i18n("Executes dialog in KDE4"));
b->setWhatsThis(whatsThisFrom("Run|Run dialog"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), b, TQT_SLOT(setEnabled(bool)));
@@ -493,39 +497,39 @@ void MainWindow::setupWindowActions()
{
windowActionsSetup = true;
- KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, TQT_SLOT(tile()),
+ KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(tile()),
actionCollection(), "window_tile");
actionWindowTile->setToolTip(i18n("Tiles the windows so that they are all visible"));
actionWindowTile->setWhatsThis(whatsThisFrom("Window|Tile"));
- KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(cascade()),
+ KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(cascade()),
actionCollection(), "window_cascade");
actionWindowCascade->setToolTip(i18n("Cascades the windows so that all their title bars are visible"));
actionWindowCascade->setWhatsThis(whatsThisFrom("Window|Cascade"));
- KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(closeActiveWindow()),
+ KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(closeActiveWindow()),
actionCollection(), "window_close");
actionWindowClose->setToolTip(i18n("Closes the active window"));
actionWindowClose->setWhatsThis(whatsThisFrom("Window|Close"));
- KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), qworkspace,
+ KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), TQT_TQOBJECT(qworkspace),
TQT_SLOT(closeAllWindows()), actionCollection(), "window_close_all");
actionWindowCloseAll->setToolTip(i18n("Closes all form windows"));
actionWindowCloseAll->setWhatsThis(whatsThisFrom("Window|Close All"));
- KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, qworkspace,
+ KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, TQT_TQOBJECT(qworkspace),
TQT_SLOT(activateNextWindow()), actionCollection(), "window_next");
actionWindowNext->setToolTip(i18n("Activates the next window"));
actionWindowNext->setWhatsThis(whatsThisFrom("Window|Next"));
- KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, qworkspace,
+ KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(qworkspace),
TQT_SLOT(activatePreviousWindow()), actionCollection(), "window_prev");
actionWindowPrevious->setToolTip(i18n("Activates the previous window"));
actionWindowPrevious->setWhatsThis(whatsThisFrom("Window|Previous"));
windowMenu = new KPopupMenu(this, "Window");
menuBar()->insertItem(i18n("&Window"), windowMenu);
- connect(windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(setupWindowActions()));
+ connect(windowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(setupWindowActions()));
actionWindowClose->plug(windowMenu);
actionWindowCloseAll->plug(windowMenu);
@@ -556,13 +560,13 @@ void MainWindow::setupWindowActions()
j++;
TQString itemText;
if (j < 10)
- itemText = TQString("&%1 ").arg(j);
+ itemText = TQString("&%1 ").tqarg(j);
if (w->inherits("FormWindow"))
itemText += w->name();
else
itemText += w->caption();
- int id = windowMenu->insertItem(itemText, this, TQT_SLOT(windowsMenuActivated(int)));
+ int id = windowMenu->insertItem(itemText, TQT_TQOBJECT(this), TQT_SLOT(windowsMenuActivated(int)));
windowMenu->setItemParameter(id, i);
windowMenu->setItemChecked(id, qworkspace->activeWindow() == windows.at(i));
}
@@ -572,21 +576,21 @@ void MainWindow::setupWindowActions()
void MainWindow::setupSettingsActions()
{
KPopupMenu *settings = new KPopupMenu(this, "Settings");
- KAction* a = KStdAction::keyBindings(this, TQT_SLOT(editShortcuts()), actionCollection());
+ KAction* a = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(editShortcuts()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change shortcuts"));
a->plug(settings);
- a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), this, TQT_SLOT(editPlugins()),
+ a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editPlugins()),
actionCollection(), "configure_plugins");
a->setToolTip(i18n("Opens a dialog to configure plugins"));
a->plug(settings);
- a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), this, TQT_SLOT(configureEditor()),
+ a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(configureEditor()),
actionCollection(), "configure_editor");
a->setToolTip(i18n("Configure various aspects of this editor."));
a->plug(settings);
- a = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
+ a = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(editPreferences()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change preferences"));
a->setWhatsThis(whatsThisFrom("Edit|Preferences"));
a->plug(settings);
@@ -604,7 +608,7 @@ void MainWindow::setupHelpActions()
void MainWindow::fileNew()
{
statusBar()->message(i18n("Create a new dialog..."));
- NewForm dlg(this, TQString::null);
+ NewForm dlg(this, TQString());
dlg.exec();
statusBar()->clear();
}
@@ -631,7 +635,7 @@ void MainWindow::fileOpen(const TQString & fn)
TQStringList filenames;
if (fn.isEmpty())
- filenames = KFileDialog::getOpenFileNames(TQString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
+ filenames = KFileDialog::getOpenFileNames(TQString(), i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
else
filenames << fn;
for (TQStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit)
@@ -667,7 +671,7 @@ FormWindow *MainWindow::openFormWindow(const TQString &filename, bool validFileN
}
if (!makeNew)
{
- statusBar()->message(i18n("Reading file '%1'...").arg(filename));
+ statusBar()->message(i18n("Reading file '%1'...").tqarg(filename));
if (TQFile::exists(filename))
{
TQApplication::setOverrideCursor(WaitCursor);
@@ -676,18 +680,18 @@ FormWindow *MainWindow::openFormWindow(const TQString &filename, bool validFileN
ff = new FormFile(filename, false);
bool b = resource.load(ff) && (FormWindow *) resource.widget();
if (!validFileName && resource.widget())
- ((FormWindow *) resource.widget())->setFileName(TQString::null);
+ ((FormWindow *) resource.widget())->setFileName(TQString());
TQApplication::restoreOverrideCursor();
if (b)
{
- statusBar()->message(i18n("Loaded file '%1'").arg(filename), 3000);
+ statusBar()->message(i18n("Loaded file '%1'").tqarg(filename), 3000);
} else
{
emit removedFormFile(ff);
ff->close();
delete ff;
- statusBar()->message(i18n("Could not load file '%1'").arg(filename), 5000);
- KMessageBox::information(this, i18n("Could not load file '%1'").arg(filename), i18n("Load File"));
+ statusBar()->message(i18n("Could not load file '%1'").tqarg(filename), 5000);
+ KMessageBox::information(this, i18n("Could not load file '%1'").tqarg(filename), i18n("Load File"));
}
return (FormWindow *) resource.widget();
} else
@@ -750,7 +754,7 @@ void MainWindow::saveAllTemp()
if (inSaveAllTemp)
return;
inSaveAllTemp = true;
- statusBar()->message(i18n("Qt Designer is crashing. Attempting to save files..."));
+ statusBar()->message(i18n("TQt Designer is crashing. Attempting to save files..."));
TQWidgetList windows = qWorkspace()->windowList();
TQString baseName = TQDir::homeDirPath() + "/.designer/saved-form-";
int i = 1;
@@ -781,20 +785,20 @@ void MainWindow::fileCreateTemplate()
for (i = 0; i < WidgetDatabase::count(); ++i)
{
if (WidgetDatabase::isContainer(i) && !WidgetDatabase::isForm(i) &&
- WidgetDatabase::className(i) != "TQTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp")
+ WidgetDatabase::className(i) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::widgetGroup(i) != "Temp")
{
dia.listClass->insertItem(WidgetDatabase::className(i));
}
}
dia.editName->setText(i18n("NewTemplate"));
- connect(dia.buttonCreate, TQT_SIGNAL(clicked()), this, TQT_SLOT(createNewTemplate()));
+ connect(dia.buttonCreate, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(createNewTemplate()));
dia.exec();
}
void MainWindow::createNewTemplate()
{
- CreateTemplate *dia = (CreateTemplate *) sender()->parent();
+ CreateTemplate *dia = (CreateTemplate *) TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->tqparent();
TQString fn = dia->editName->text();
TQString cn = dia->listClass->currentText();
if (fn.isEmpty() || cn.isEmpty())
@@ -804,14 +808,14 @@ void MainWindow::createNewTemplate()
}
TQStringList templRoots;
- const char *qtdir = getenv("QTDIR");
+ const char *qtdir = getenv("TQTDIR");
if (qtdir)
templRoots << qtdir;
-#ifdef QT_INSTALL_PREFIX
- templRoots << QT_INSTALL_PREFIX;
+#ifdef TQT_INSTALL_PREFIX
+ templRoots << TQT_INSTALL_PREFIX;
#endif
-#ifdef QT_INSTALL_DATA
- templRoots << QT_INSTALL_DATA;
+#ifdef TQT_INSTALL_DATA
+ templRoots << TQT_INSTALL_DATA;
#endif
if (qtdir) //try the tools/designer directory last!
templRoots << TQString(qtdir) + "/tools/designer";
@@ -841,7 +845,7 @@ void MainWindow::createNewTemplate()
ts << " <cstring>" << cn << "Form</cstring>" << endl;
ts << "</property>" << endl;
ts << "<property stdset=\"1\">" << endl;
- ts << " <name>geometry</name>" << endl;
+ ts << " <name>tqgeometry</name>" << endl;
ts << " <rect>" << endl;
ts << " <width>300</width>" << endl;
ts << " <height>400</height>" << endl;
@@ -876,7 +880,7 @@ void MainWindow::editCut()
void MainWindow::editCopy()
{
if (formWindow())
- qApp->clipboard()->setText(formWindow()->copy());
+ tqApp->clipboard()->setText(formWindow()->copy());
}
void MainWindow::editPaste()
@@ -889,21 +893,21 @@ void MainWindow::editPaste()
if (l.count() == 1)
{
w = l.first();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
(!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::
- classNameOf(w))) && w != formWindow()->mainContainer()))
+ classNameOf(TQT_TQOBJECT(w)))) && w != formWindow()->mainContainer()))
w = formWindow()->mainContainer();
}
- if (w && WidgetFactory::layoutType(w) == WidgetFactory::NoLayout)
+ if (w && WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout)
{
- formWindow()->paste(qApp->clipboard()->text(), WidgetFactory::containerOfWidget(w));
+ formWindow()->paste(tqApp->clipboard()->text(), WidgetFactory::containerOfWidget(w));
hierarchyView->widgetInserted(0);
formWindow()->commandHistory()->setModified(true);
} else
{
KMessageBox::information(this, i18n("Cannot paste widgets. Designer could not find a container\n"
- "to paste into which does not contain a layout. Break the layout\n"
+ "to paste into which does not contain a tqlayout. Break the tqlayout\n"
"of the container you want to paste into and select this container\n"
"and then paste again."), i18n("Paste Error"));
}
@@ -941,42 +945,42 @@ void MainWindow::editAdjustSize()
void MainWindow::editLayoutHorizontal()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerHorizontal();
- else if (layoutSelected && formWindow())
- formWindow()->layoutHorizontal();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutHorizontal();
}
void MainWindow::editLayoutVertical()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerVertical();
- else if (layoutSelected && formWindow())
- formWindow()->layoutVertical();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutVertical();
}
void MainWindow::editLayoutHorizontalSplit()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
; // no way to do that
- else if (layoutSelected && formWindow())
- formWindow()->layoutHorizontalSplit();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutHorizontalSplit();
}
void MainWindow::editLayoutVerticalSplit()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
; // no way to do that
- else if (layoutSelected && formWindow())
- formWindow()->layoutVerticalSplit();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutVerticalSplit();
}
void MainWindow::editLayoutGrid()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerGrid();
- else if (layoutSelected && formWindow())
- formWindow()->layoutGrid();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutGrid();
}
void MainWindow::editLayoutContainerVertical()
@@ -988,7 +992,7 @@ void MainWindow::editLayoutContainerVertical()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutVerticalContainer(w);
+ formWindow()->tqlayoutVerticalContainer(w);
}
void MainWindow::editLayoutContainerHorizontal()
@@ -1000,7 +1004,7 @@ void MainWindow::editLayoutContainerHorizontal()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutHorizontalContainer(w);
+ formWindow()->tqlayoutHorizontalContainer(w);
}
void MainWindow::editLayoutContainerGrid()
@@ -1012,7 +1016,7 @@ void MainWindow::editLayoutContainerGrid()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutGridContainer(w);
+ formWindow()->tqlayoutGridContainer(w);
}
@@ -1025,8 +1029,8 @@ void MainWindow::editBreakLayout()
TQWidget *w = formWindow()->mainContainer();
if (formWindow()->currentWidget())
w = formWindow()->currentWidget();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
{
formWindow()->breakLayout(w);
return;
@@ -1036,9 +1040,9 @@ void MainWindow::editBreakLayout()
TQWidgetList widgets = formWindow()->selectedWidgets();
for (w = widgets.first(); w; w = widgets.next())
{
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget()
- && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget()
+ && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
break;
}
if (w)
@@ -1049,8 +1053,8 @@ void MainWindow::editBreakLayout()
}
w = formWindow()->mainContainer();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
{
formWindow()->breakLayout(w);
}
@@ -1119,7 +1123,7 @@ void MainWindow::editPreferences()
dia->checkBoxSplash->setChecked(splashScreen);
dia->editDocPath->setText(docPath);
dia->checkAutoEdit->setChecked(!databaseAutoEdit);
- connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseDocPath()));
+ connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(chooseDocPath()));
if (dia->exec() == TQDialog::Accepted)
{
@@ -1193,7 +1197,7 @@ void MainWindow::chooseDocPath()
{
if (!prefDia)
return;
- TQString fn = KFileDialog::getExistingDirectory(TQString::null, this);
+ TQString fn = KFileDialog::getExistingDirectory(TQString(), this);
if (!fn.isEmpty())
prefDia->editDocPath->setText(fn);
}