summaryrefslogtreecommitdiffstats
path: root/kandy/src/kandy.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kandy/src/kandy.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kandy/src/kandy.cpp')
-rw-r--r--kandy/src/kandy.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kandy/src/kandy.cpp b/kandy/src/kandy.cpp
index 860aff5bb..d7da32e86 100644
--- a/kandy/src/kandy.cpp
+++ b/kandy/src/kandy.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlineedit.h>
-#include <qprinter.h>
-#include <qprintdialog.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqlineedit.h>
+#include <tqprinter.h>
+#include <tqprintdialog.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kglobal.h>
#include <klocale.h>
@@ -81,16 +81,16 @@ Kandy::Kandy(CommandScheduler *scheduler)
setAutoSaveSettings();
// allow the view to change the statusbar and caption
- connect(mView, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(mView, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
+ connect(mView, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(mView, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
- connect(mView,SIGNAL(modifiedChanged(bool)),SLOT(setTitle()));
+ connect(mView,TQT_SIGNAL(modifiedChanged(bool)),TQT_SLOT(setTitle()));
KConfig *config = KGlobal::config();
config->setGroup("General");
- QString currentProfile = config->readEntry("CurrentProfile",
+ TQString currentProfile = config->readEntry("CurrentProfile",
locate("appdata","default.kandy"));
if (!currentProfile.isEmpty()) load(currentProfile);
}
@@ -99,7 +99,7 @@ Kandy::~Kandy()
{
}
-void Kandy::load(const QString& filename)
+void Kandy::load(const TQString& filename)
{
if (!mView->loadFile(filename)) {
KMessageBox::error(this,i18n("Could not load file %1").arg(filename));
@@ -109,7 +109,7 @@ void Kandy::load(const QString& filename)
setTitle();
}
-void Kandy::save(const QString & filename)
+void Kandy::save(const TQString & filename)
{
if (!filename.isEmpty()) {
if (!mView->saveFile(filename)) {
@@ -123,26 +123,26 @@ void Kandy::save(const QString & filename)
void Kandy::setupActions()
{
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::save(this, SLOT(fileSave()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
-// KStdAction::print(this, SLOT(filePrint()), actionCollection());
- KStdAction::quit(this, SLOT(close()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+// KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
- new KAction(i18n("Mobile GUI"),0,this,SLOT(showMobileGui()),
+ new KAction(i18n("Mobile GUI"),0,this,TQT_SLOT(showMobileGui()),
actionCollection(),"show_mobilegui");
- mConnectAction = new KAction(i18n("Connect"),0,this,SLOT(modemConnect()),
+ mConnectAction = new KAction(i18n("Connect"),0,this,TQT_SLOT(modemConnect()),
actionCollection(),"modem_connect");
mDisconnectAction = new KAction(i18n("Disconnect"),0,this,
- SLOT(modemDisconnect()),actionCollection(),
+ TQT_SLOT(modemDisconnect()),actionCollection(),
"modem_disconnect");
createGUI();
@@ -163,7 +163,7 @@ void Kandy::readProperties(KConfig */*config*/)
// in 'saveProperties'
}
-void Kandy::dragEnterEvent(QDragEnterEvent *event)
+void Kandy::dragEnterEvent(TQDragEnterEvent *event)
{
// do nothing
KMainWindow::dragEnterEvent(event);
@@ -172,7 +172,7 @@ void Kandy::dragEnterEvent(QDragEnterEvent *event)
// event->accept(KURLDrag::canDecode(event));
}
-void Kandy::dropEvent(QDropEvent *event)
+void Kandy::dropEvent(TQDropEvent *event)
{
// this is a very simplistic implementation of a drop event. we
// will only accept a dropped URL. the Qt dnd code can do *much*
@@ -203,7 +203,7 @@ void Kandy::fileOpen()
// this slot is called whenever the File->Open menu is selected,
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
- QString filename = KFileDialog::getOpenFileName();
+ TQString filename = KFileDialog::getOpenFileName();
if (!filename.isEmpty()) load(filename);
}
@@ -215,7 +215,7 @@ void Kandy::fileSave()
void Kandy::fileSaveAs()
{
- QString filename = KFileDialog::getSaveFileName();
+ TQString filename = KFileDialog::getSaveFileName();
save(filename);
}
@@ -225,16 +225,16 @@ void Kandy::filePrint()
// the Print shortcut is pressed (usually CTRL+P) or the Print toolbar
// button is clicked
if (!mPrinter) mPrinter = new QPrinter;
- if (QPrintDialog::getPrinterSetup(mPrinter))
+ if (TQPrintDialog::getPrinterSetup(mPrinter))
{
// setup the printer. with Qt, you always "print" to a
- // QPainter.. whether the output medium is a pixmap, a screen,
+ // TQPainter.. whether the output medium is a pixmap, a screen,
// or paper
- QPainter p;
+ TQPainter p;
p.begin(mPrinter);
// we let our view do the actual printing
- QPaintDeviceMetrics metrics(mPrinter);
+ TQPaintDeviceMetrics metrics(mPrinter);
mView->print(&p, metrics.height(), metrics.width());
// and send the result to the printer
@@ -252,7 +252,7 @@ void Kandy::optionsConfigureToolbars()
// use the standard toolbar editor
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -275,13 +275,13 @@ void Kandy::optionsPreferences()
mPreferencesDialog->raise();
}
-void Kandy::changeStatusbar(const QString& text)
+void Kandy::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
}
-void Kandy::changeCaption(const QString& text)
+void Kandy::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
@@ -300,7 +300,7 @@ bool Kandy::queryClose()
{
if (mView->isModified()) {
switch (KMessageBox::warningYesNoCancel(this,
- i18n("Save changes to profile %1?").arg(mFilename), QString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
+ i18n("Save changes to profile %1?").arg(mFilename), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
case KMessageBox::Yes :
fileSave();
return true;
@@ -342,7 +342,7 @@ void Kandy::showMobileGui()
emit showMobileWin();
}
-void Kandy::showErrorMessage( const QString &text )
+void Kandy::showErrorMessage( const TQString &text )
{
KMessageBox::error( 0, text );
}