TQt4 port keep

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/keep@1239292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 21ce97d63b
commit e573b522d4

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ActionView</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>ActionView</cstring>
</property>
@ -27,15 +27,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout22</cstring>
<cstring>tqlayout22</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>m_grpSystem</cstring>
</property>
@ -54,17 +54,17 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout21</cstring>
<cstring>tqlayout21</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout15</cstring>
<cstring>tqlayout15</cstring>
</property>
<hbox>
<property name="name">
@ -82,13 +82,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>35</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>35</width>
<height>32767</height>
@ -116,9 +116,9 @@
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout16</cstring>
<cstring>tqlayout16</cstring>
</property>
<hbox>
<property name="name">
@ -136,13 +136,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>35</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>35</width>
<height>35</height>
@ -170,9 +170,9 @@
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout17</cstring>
<cstring>tqlayout17</cstring>
</property>
<hbox>
<property name="name">
@ -190,13 +190,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>35</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>35</width>
<height>32767</height>
@ -224,9 +224,9 @@
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout15</cstring>
<cstring>tqlayout15</cstring>
</property>
<hbox>
<property name="name">
@ -244,13 +244,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>35</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>35</width>
<height>32767</height>
@ -278,9 +278,9 @@
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout15_4</cstring>
<cstring>tqlayout15_4</cstring>
</property>
<hbox>
<property name="name">
@ -298,13 +298,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>35</width>
<height>35</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>35</width>
<height>32767</height>
@ -336,7 +336,7 @@
</widget>
</grid>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>m_grpDaemon</cstring>
</property>
@ -355,17 +355,17 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout13</cstring>
<cstring>tqlayout13</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
<cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@ -445,9 +445,9 @@
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout4</cstring>
<cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@ -493,7 +493,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>85</height>
@ -506,7 +506,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kactivelabel.h</includehint>

@ -18,17 +18,17 @@
#include "addbackupwizard.h"
#include <qpushbutton.h>
#include <tqpushbutton.h>
#include <kiconloader.h>
#include <qcheckbox.h>
#include <tqcheckbox.h>
#include <kurlrequester.h>
#include <knuminput.h>
#include <kdebug.h>
AddBackupWizard::AddBackupWizard(QWidget *parent,const char* name): KWizard( parent, name, true)
AddBackupWizard::AddBackupWizard(TQWidget *tqparent,const char* name): KWizard( tqparent, name, true)
{
initView();
resize( minimumSizeHint() );
resize( tqminimumSizeHint() );
setNextEnabled(page1,false);
setNextEnabled(page2,false);
@ -39,7 +39,7 @@ AddBackupWizard::AddBackupWizard(QWidget *parent,const char* name): KWizard( par
initConnections();
}
AddBackupWizard::AddBackupWizard(Backup backup,QWidget *parent,const char* name): KWizard( parent, name, true)
AddBackupWizard::AddBackupWizard(Backup backup,TQWidget *tqparent,const char* name): KWizard( tqparent, name, true)
{
initView();
@ -58,7 +58,7 @@ AddBackupWizard::AddBackupWizard(Backup backup,QWidget *parent,const char* name)
includeExcludeDialog->setIncludeExcludeList(backup.includeExcludeList());
advancedBackupConfigDialog->setOptionList(backup.optionList());
resize( minimumSizeHint() );
resize( tqminimumSizeHint() );
setNextEnabled(page1,true);
setNextEnabled(page2,true);
@ -82,16 +82,16 @@ void AddBackupWizard::initView()
void AddBackupWizard::initConnections()
{
connect( addBackupWizard1View->source, SIGNAL( textChanged(const QString&)), this, SLOT( slotPage1Changed() ) );
connect( addBackupWizard2View->dest, SIGNAL( textChanged(const QString&)), this, SLOT( slotPage2Changed() ) );
connect( addBackupWizard3View->advancedConfig, SIGNAL( clicked()),this,SLOT(slotShowAdvancedConfig()));
connect( addBackupWizard1View->includeExclude, SIGNAL( clicked()),this,SLOT(slotShowIncludeExclude()));
connect( finishButton(), SIGNAL( clicked()), this, SLOT( slotFinishClicked() ) );
connect( addBackupWizard1View->source, TQT_SIGNAL( textChanged(const TQString&)), this, TQT_SLOT( slotPage1Changed() ) );
connect( addBackupWizard2View->dest, TQT_SIGNAL( textChanged(const TQString&)), this, TQT_SLOT( slotPage2Changed() ) );
connect( addBackupWizard3View->advancedConfig, TQT_SIGNAL( clicked()),this,TQT_SLOT(slotShowAdvancedConfig()));
connect( addBackupWizard1View->includeExclude, TQT_SIGNAL( clicked()),this,TQT_SLOT(slotShowIncludeExclude()));
connect( finishButton(), TQT_SIGNAL( clicked()), this, TQT_SLOT( slotFinishClicked() ) );
}
void AddBackupWizard::setupPage1()
{
page1 = new QHBox( this );
page1 = new TQHBox( this );
page1->setSpacing(0);
page1->setMargin(0);
@ -105,7 +105,7 @@ void AddBackupWizard::setupPage1()
void AddBackupWizard::setupPage2()
{
page2 = new QHBox( this );
page2 = new TQHBox( this );
page2->setSpacing(0);
page2->setMargin(0);
@ -117,7 +117,7 @@ void AddBackupWizard::setupPage2()
void AddBackupWizard::setupPage3()
{
page3 = new QHBox( this );
page3 = new TQHBox( this );
page3->setSpacing(0);
page3->setMargin(0);
@ -164,17 +164,17 @@ void AddBackupWizard::slotShowIncludeExclude()
Backup AddBackupWizard::backup()
{
QString source = addBackupWizard1View->source->url();
QString dest = addBackupWizard2View->dest->url();
TQString source = addBackupWizard1View->source->url();
TQString dest = addBackupWizard2View->dest->url();
int interval = addBackupWizard3View->interval->value();
int deleteAfter = addBackupWizard3View->deleteAfter->value();
bool neverDelete = addBackupWizard3View->neverDelete->isChecked();
bool useCompression = addBackupWizard3View->useCompression->isChecked();
bool excludeSpecialFiles = addBackupWizard3View->excludeSpecialFiles->isChecked();
bool useAdvancedConfig = addBackupWizard3View->useAdvancedConfig->isChecked();
QStringList optionList = advancedBackupConfigDialog->optionList();
TQStringList optionList = advancedBackupConfigDialog->optionList();
bool useIncludeExclude = addBackupWizard1View->useIncludeExclude->isChecked();
QStringList includeExcludeList = includeExcludeDialog->includeExcludeList();
TQStringList includeExcludeList = includeExcludeDialog->includeExcludeList();
Backup backup(source,dest,interval,deleteAfter,neverDelete,useCompression,excludeSpecialFiles,useAdvancedConfig,optionList,useIncludeExclude,includeExcludeList);
return backup;

@ -20,7 +20,7 @@
#define _ADDBACKUPWIZARD_H_
#include <kwizard.h>
#include <qhbox.h>
#include <tqhbox.h>
#include "backup.h"
#include "advancedbackupconfigdialog.h"
@ -32,9 +32,10 @@
class AddBackupWizard: public KWizard
{
Q_OBJECT
TQ_OBJECT
public:
AddBackupWizard(QWidget *parent, const char *name);
AddBackupWizard(Backup backup,QWidget *parent, const char *name);
AddBackupWizard(TQWidget *tqparent, const char *name);
AddBackupWizard(Backup backup,TQWidget *tqparent, const char *name);
Backup backup();
@ -58,7 +59,7 @@ private:
void initView();
void initConnections();
QHBox *page1,*page2,*page3;
TQHBox *page1,*page2,*page3;
AddBackupWizard1View *addBackupWizard1View;
AddBackupWizard2View *addBackupWizard2View;
AddBackupWizard3View *addBackupWizard3View;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AddBackupWizard1View</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>AddBackupWizard1View</cstring>
</property>
@ -30,23 +30,23 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout17</cstring>
<cstring>tqlayout17</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>pixmapLabel1</cstring>
</property>
@ -67,7 +67,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>130</height>
@ -76,9 +76,9 @@
</spacer>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout16</cstring>
<cstring>tqlayout16</cstring>
</property>
<vbox>
<property name="name">
@ -113,15 +113,15 @@
</sizepolicy>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout11</cstring>
<cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>useIncludeExclude</cstring>
</property>
@ -163,7 +163,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>260</height>
@ -191,7 +191,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kurlrequester.h</includehint>

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AddBackupWizard3View</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>AddBackupWizard3View</cstring>
</property>
@ -30,23 +30,23 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout16</cstring>
<cstring>tqlayout16</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>pixmapLabel1</cstring>
</property>
@ -75,7 +75,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>130</height>
@ -84,9 +84,9 @@
</spacer>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout15</cstring>
<cstring>tqlayout15</cstring>
</property>
<vbox>
<property name="name">
@ -108,7 +108,7 @@
<string>Set the desired options for your backup.</string>
</property>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@ -127,25 +127,25 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout8</cstring>
<cstring>tqlayout8</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6_2</cstring>
<cstring>tqlayout6_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
<cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
@ -185,9 +185,9 @@
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout4</cstring>
<cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
@ -247,15 +247,15 @@
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
<cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>neverDelete</cstring>
</property>
@ -277,7 +277,7 @@
</widget>
</grid>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@ -296,15 +296,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout12</cstring>
<cstring>tqlayout12</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>useCompression</cstring>
</property>
@ -323,7 +323,7 @@
<bool>true</bool>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>excludeSpecialFiles</cstring>
</property>
@ -334,15 +334,15 @@
<bool>true</bool>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout11</cstring>
<cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>useAdvancedConfig</cstring>
</property>
@ -388,7 +388,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>46</height>
@ -434,7 +434,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kactivelabel.h</includehint>

@ -19,32 +19,32 @@
#include "advancedbackupconfigdialog.h"
#include <klocale.h>
#include <qlayout.h>
#include <tqlayout.h>
#include <kurl.h>
#include <dcopref.h>
#include <kdebug.h>
#include <kactivelabel.h>
#include <kmimetype.h>
#include <qpixmap.h>
#include <tqpixmap.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <qstringlist.h>
#include <tqstringlist.h>
#include <kactionselector.h>
AdvancedBackupConfigDialog::AdvancedBackupConfigDialog(QWidget *parent):KDialogBase(Plain, i18n("Advanced Backup Configuration"),
Help|Ok, Ok, parent, "advancedBackupConfigDialog", true, false)
AdvancedBackupConfigDialog::AdvancedBackupConfigDialog(TQWidget *tqparent):KDialogBase(Plain, i18n("Advanced Backup Configuration"),
Help|Ok, Ok, tqparent, "advancedBackupConfigDialog", true, false)
{
QGridLayout *topLayout = new QGridLayout(plainPage());
TQGridLayout *topLayout = new TQGridLayout(plainPage());
m_advancedBackupConfigView = new AdvancedBackupConfigView(plainPage());
topLayout->addWidget( m_advancedBackupConfigView,0,0 );
m_advancedBackupConfigView->optionList->availableListBox()->insertStringList(allOptionList());
resize( QSize(350,450).expandedTo(minimumSizeHint()) );
resize( TQSize(350,450).expandedTo(tqminimumSizeHint()) );
}
QStringList AdvancedBackupConfigDialog::optionList()
TQStringList AdvancedBackupConfigDialog::optionList()
{
QStringList options;
TQStringList options;
for (uint i=0;i<m_advancedBackupConfigView->optionList->selectedListBox()->count();i++)
{
options.append(m_advancedBackupConfigView->optionList->selectedListBox()->text(i));
@ -52,11 +52,11 @@ QStringList AdvancedBackupConfigDialog::optionList()
return options;
}
void AdvancedBackupConfigDialog::setOptionList(QStringList optionList)
void AdvancedBackupConfigDialog::setOptionList(TQStringList optionList)
{
QStringList alloptions = allOptionList();
QStringList available;
for ( QStringList::Iterator it = alloptions.begin(); it != alloptions.end(); ++it )
TQStringList alloptions = allOptionList();
TQStringList available;
for ( TQStringList::Iterator it = alloptions.begin(); it != alloptions.end(); ++it )
{
if ( optionList.grep(*it).size() == 0 )
{
@ -69,9 +69,9 @@ void AdvancedBackupConfigDialog::setOptionList(QStringList optionList)
m_advancedBackupConfigView->optionList->selectedListBox()->insertStringList(optionList);
}
QStringList AdvancedBackupConfigDialog::allOptionList()
TQStringList AdvancedBackupConfigDialog::allOptionList()
{
QStringList options;
TQStringList options;
options.append("--no-hard-links");
options.append("--exclude-special-files");
options.append("--exclude-device-files");

@ -26,16 +26,17 @@
class AdvancedBackupConfigDialog: public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
AdvancedBackupConfigDialog(QWidget *parent);
AdvancedBackupConfigDialog(TQWidget *tqparent);
~AdvancedBackupConfigDialog() {};
QStringList optionList();
void setOptionList(QStringList optionList);
TQStringList optionList();
void setOptionList(TQStringList optionList);
private:
QStringList allOptionList();
TQStringList allOptionList();
AdvancedBackupConfigView *m_advancedBackupConfigView;
};

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AdvancedBackupConfigView</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>AdvancedBackupConfigView</cstring>
</property>
@ -22,9 +22,9 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout3</cstring>
<cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
@ -82,7 +82,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kactionselector.h</includehint>

@ -19,40 +19,40 @@
#include "backupconfigdialog.h"
#include <klocale.h>
#include <qlayout.h>
#include <tqlayout.h>
#include <kurl.h>
#include <dcopref.h>
#include <kdebug.h>
#include <kactivelabel.h>
#include <kmimetype.h>
#include <qpixmap.h>
#include <tqpixmap.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kprogress.h>
#include <qlabel.h>
#include <qgroupbox.h>
#include <qradiobutton.h>
#include <qcheckbox.h>
#include <tqlabel.h>
#include <tqgroupbox.h>
#include <tqradiobutton.h>
#include <tqcheckbox.h>
#include <kmessagebox.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <qvaluelist.h>
#include <tqvaluelist.h>
#include "backupconfig.h"
BackupConfigDialog::BackupConfigDialog(QWidget *parent):KDialogBase(Plain, i18n("Configure backups"),
Help|Cancel|Ok, Cancel, parent, "configBackups", true, false)
BackupConfigDialog::BackupConfigDialog(TQWidget *tqparent):KDialogBase(Plain, i18n("Configure backups"),
Help|Cancel|Ok, Cancel, tqparent, "configBackups", true, false)
{
KIconLoader *icons = KGlobal::iconLoader();
QFrame *page = plainPage();
QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
TQFrame *page = plainPage();
TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
m_backupListWidget = new BackupListWidget(page,"backupListWidget");
topLayout->addWidget( m_backupListWidget );
setMainWidget(page);
connect( this, SIGNAL( okClicked()),this, SLOT(saveSettings()));
connect( this, TQT_SIGNAL( okClicked()),this, TQT_SLOT(saveSettings()));
}
void BackupConfigDialog::saveSettings()

@ -27,9 +27,10 @@ class BackupConfigDialog: public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
BackupConfigDialog(QWidget *parent);
BackupConfigDialog(TQWidget *tqparent);
~BackupConfigDialog() {};
public slots:

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>BackupListView</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>BackupListView</cstring>
</property>
@ -30,9 +30,9 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout4</cstring>
<cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@ -90,9 +90,9 @@
<enum>LastColumn</enum>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
<cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
@ -132,7 +132,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>480</height>
@ -147,7 +147,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>kpushbutton.h</includehint>

@ -18,9 +18,9 @@
#include "backuplistwidget.h"
#include <qpushbutton.h>
#include <tqpushbutton.h>
#include <klistbox.h>
#include <qstringlist.h>
#include <tqstringlist.h>
#include <kurlrequester.h>
#include <kdebug.h>
@ -29,15 +29,15 @@
#include "addbackupwizard.h"
#include "backupconfig.h"
BackupListWidget::BackupListWidget(QWidget *parent,char *name): BackupListView(parent,name)
BackupListWidget::BackupListWidget(TQWidget *tqparent,char *name): BackupListView(tqparent,name)
{
QToolTip::remove(m_lstBackup);
TQToolTip::remove(m_lstBackup);
new ListViewToolTip(m_lstBackup);
slotReadSettings();
connect( m_btnAdd, SIGNAL( clicked()), this, SLOT( slotAddClicked() ) );
connect( m_btnRemove, SIGNAL( clicked()), this, SLOT( slotRemoveClicked() ) );
connect( m_btnEdit, SIGNAL( clicked()), this, SLOT( slotEditClicked() ) );
connect( m_btnAdd, TQT_SIGNAL( clicked()), this, TQT_SLOT( slotAddClicked() ) );
connect( m_btnRemove, TQT_SIGNAL( clicked()), this, TQT_SLOT( slotRemoveClicked() ) );
connect( m_btnEdit, TQT_SIGNAL( clicked()), this, TQT_SLOT( slotEditClicked() ) );
}
BackupListWidget::~BackupListWidget()
@ -48,8 +48,8 @@ void BackupListWidget::slotReadSettings()
{
m_lstBackup->clear();
BackupConfig *backupConfig = new BackupConfig();
QValueList<Backup> backupList = backupConfig->backupList();
QValueList<Backup>::iterator it;
TQValueList<Backup> backupList = backupConfig->backupList();
TQValueList<Backup>::iterator it;
for ( it = backupList.begin(); it != backupList.end(); ++it )
{
BackupListViewItem *item = new BackupListViewItem(m_lstBackup,*it);
@ -59,10 +59,10 @@ void BackupListWidget::slotReadSettings()
void BackupListWidget::slotSaveSettings()
{
QValueList<Backup> backupList;
QListViewItemIterator it( m_lstBackup );
TQValueList<Backup> backupList;
TQListViewItemIterator it( m_lstBackup );
while ( it.current() ) {
QListViewItem *item = it.current();
TQListViewItem *item = it.current();
BackupListViewItem *backupItem = static_cast<BackupListViewItem*>(item);
backupList.append(backupItem->backup());
++it;
@ -75,18 +75,18 @@ void BackupListWidget::slotSaveSettings()
void BackupListWidget::slotAddClicked()
{
AddBackupWizard *wizard = new AddBackupWizard(this,"addBackupWizard");
connect(wizard,SIGNAL(backupSetted(Backup) ), this, SLOT(slotAddBackup(Backup)));
connect(wizard,TQT_SIGNAL(backupSetted(Backup) ), this, TQT_SLOT(slotAddBackup(Backup)));
wizard->show();
}
void BackupListWidget::slotEditClicked()
{
QListViewItem *item = m_lstBackup->currentItem();
TQListViewItem *item = m_lstBackup->currentItem();
if ( item )
{
BackupListViewItem *backupItem = static_cast<BackupListViewItem*>(item);
AddBackupWizard *wizard = new AddBackupWizard(backupItem->backup(),this,"addBackupWizard");
connect(wizard,SIGNAL(backupSetted(Backup) ), this, SLOT(slotUpdateBackup(Backup)));
connect(wizard,TQT_SIGNAL(backupSetted(Backup) ), this, TQT_SLOT(slotUpdateBackup(Backup)));
wizard->show();
}
}
@ -103,7 +103,7 @@ void BackupListWidget::slotAddBackup(Backup backup)
void BackupListWidget::slotUpdateBackup(Backup backup)
{
QListViewItem *item = m_lstBackup->currentItem();
TQListViewItem *item = m_lstBackup->currentItem();
if ( item )
{
BackupListViewItem *backupItem = static_cast<BackupListViewItem*>(item);

@ -25,8 +25,9 @@
class BackupListWidget: public BackupListView
{
Q_OBJECT
TQ_OBJECT
public:
BackupListWidget(QWidget *parent, char *name);
BackupListWidget(TQWidget *tqparent, char *name);
~BackupListWidget();
public slots:

@ -19,42 +19,42 @@
#include "forcebackupdialog.h"
#include <klocale.h>
#include <qlayout.h>
#include <tqlayout.h>
#include <kurl.h>
#include <dcopref.h>
#include <kdebug.h>
#include <kactivelabel.h>
#include <kmimetype.h>
#include <qpixmap.h>
#include <tqpixmap.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kprogress.h>
#include <qlabel.h>
#include <qgroupbox.h>
#include <qradiobutton.h>
#include <qcheckbox.h>
#include <tqlabel.h>
#include <tqgroupbox.h>
#include <tqradiobutton.h>
#include <tqcheckbox.h>
#include <kmessagebox.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <qvaluelist.h>
#include <tqvaluelist.h>
#include <kmessagebox.h>
#include "backupconfig.h"
#include "backuplistviewitem.h"
ForceBackupDialog::ForceBackupDialog(QWidget *parent):KDialogBase(Plain, i18n("Backup now"),
Help|Cancel|Ok, Cancel, parent, "forceBackupDialog", true, false)
ForceBackupDialog::ForceBackupDialog(TQWidget *tqparent):KDialogBase(Plain, i18n("Backup now"),
Help|Cancel|Ok, Cancel, tqparent, "forceBackupDialog", true, false)
{
QGridLayout* toplayout = new QGridLayout(plainPage());
TQGridLayout* toptqlayout = new TQGridLayout(plainPage());
m_view = new ForceBackupDialogView(plainPage());
toplayout->addWidget(m_view,0,0);
toptqlayout->addWidget(m_view,0,0);
loadBackupList();
m_manager = new RDBManager();
connect( m_manager, SIGNAL(backupError(Backup,QString)), this, SLOT(slotBackupError(Backup,QString)) );
connect( m_manager, TQT_SIGNAL(backupError(Backup,TQString)), this, TQT_SLOT(slotBackupError(Backup,TQString)) );
connect( this, SIGNAL(okClicked()), this, SLOT(slotForceBackup()));
connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotForceBackup()));
}
ForceBackupDialog::~ForceBackupDialog()
@ -65,8 +65,8 @@ ForceBackupDialog::~ForceBackupDialog()
void ForceBackupDialog::loadBackupList()
{
BackupConfig backupConfig;
QValueList<Backup> backupList = backupConfig.backupList();
QValueList<Backup>::iterator it;
TQValueList<Backup> backupList = backupConfig.backupList();
TQValueList<Backup>::iterator it;
for ( it = backupList.begin(); it != backupList.end(); ++it )
{
new BackupListViewItem(m_view->m_lstBackup,*it);
@ -75,11 +75,11 @@ void ForceBackupDialog::loadBackupList()
void ForceBackupDialog::slotForceBackup()
{
QValueList<Backup> backupList;
QListViewItemIterator it( m_view->m_lstBackup );
TQValueList<Backup> backupList;
TQListViewItemIterator it( m_view->m_lstBackup );
while ( it.current() )
{
QListViewItem *item = it.current();
TQListViewItem *item = it.current();
if ( item->isSelected() )
{
BackupListViewItem *backupItem = static_cast<BackupListViewItem*>(item);
@ -91,9 +91,9 @@ void ForceBackupDialog::slotForceBackup()
m_manager->slotForceBackup(backupList);
}
void ForceBackupDialog::slotBackupError(Backup backup,QString errorMessage)
void ForceBackupDialog::slotBackupError(Backup backup,TQString errorMessage)
{
KMessageBox::error(this,i18n("<p><b>An error occured making %1 backup:</b></p><p>%2</p>").arg(backup.source()).arg(errorMessage));
KMessageBox::error(this,i18n("<p><b>An error occured making %1 backup:</b></p><p>%2</p>").tqarg(backup.source()).tqarg(errorMessage));
}
#include "forcebackupdialog.moc"

@ -29,14 +29,15 @@ class ForceBackupDialog: public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
ForceBackupDialog(QWidget *parent);
ForceBackupDialog(TQWidget *tqparent);
~ForceBackupDialog();
public slots:
void slotForceBackup();
void slotBackupError(Backup backup,QString errorMessage);
void slotBackupError(Backup backup,TQString errorMessage);
private:
void loadBackupList();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ForceBackupDialogView</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>ForceBackupDialogView</cstring>
</property>
@ -22,9 +22,9 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout21</cstring>
<cstring>tqlayout21</cstring>
</property>
<vbox>
<property name="name">
@ -121,7 +121,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>klistview.h</includehint>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>GeneralConfigView</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>GeneralConfigView</cstring>
</property>
@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox4</cstring>
</property>
@ -38,15 +38,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout7</cstring>
<cstring>tqlayout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_NotifyBackupError</cstring>
</property>
@ -54,7 +54,7 @@
<string>Notify backup error</string>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_NotifyBackupSuccess</cstring>
</property>
@ -66,7 +66,7 @@
</widget>
</grid>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox4_2</cstring>
</property>
@ -77,15 +77,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout5</cstring>
<cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_ControlRDBPriority</cstring>
</property>
@ -93,9 +93,9 @@
<string>Control rdiff-backup priority</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout4</cstring>
<cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@ -147,7 +147,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>120</height>
@ -166,7 +166,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>

@ -19,27 +19,27 @@
#include "includeexcludedialog.h"
#include <klocale.h>
#include <qlayout.h>
#include <tqlayout.h>
#include <kurl.h>
#include <dcopref.h>
#include <kdebug.h>
#include <kactivelabel.h>
#include <kmimetype.h>
#include <qpixmap.h>
#include <tqpixmap.h>
#include <kapplication.h>
#include <kpushbutton.h>
#include <kiconloader.h>
#include <qstringlist.h>
#include <tqstringlist.h>
#include <kactionselector.h>
#include <klistview.h>
#include <kurlrequester.h>
#include "includeexcludeitem.h"
IncludeExcludeDialog::IncludeExcludeDialog(QWidget *parent):KDialogBase(Plain, i18n("Inclusion/Exclusion Configuration"),
Help|Ok, Ok, parent, "includeExcludeDialog", true, false)
IncludeExcludeDialog::IncludeExcludeDialog(TQWidget *tqparent):KDialogBase(Plain, i18n("Inclusion/Exclusion Configuration"),
Help|Ok, Ok, tqparent, "includeExcludeDialog", true, false)
{
QGridLayout *topLayout = new QGridLayout(plainPage());
TQGridLayout *topLayout = new TQGridLayout(plainPage());
m_view = new IncludeExcludeView(plainPage());
topLayout->addWidget( m_view,0,0 );
@ -49,19 +49,19 @@ IncludeExcludeDialog::IncludeExcludeDialog(QWidget *parent):KDialogBase(Plain, i
m_view->includeExcludeList->setSorting(-1);
connect(m_view->include,SIGNAL(clicked()),this,SLOT(slotInclude()));
connect(m_view->exclude,SIGNAL(clicked()),this,SLOT(slotExclude()));
connect(m_view->remove,SIGNAL(clicked()),this,SLOT(slotRemove()));
connect(m_view->include,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotInclude()));
connect(m_view->exclude,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotExclude()));
connect(m_view->remove,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotRemove()));
resize( QSize(450,450).expandedTo(minimumSizeHint()) );
resize( TQSize(450,450).expandedTo(tqminimumSizeHint()) );
}
QStringList IncludeExcludeDialog::includeExcludeList()
TQStringList IncludeExcludeDialog::includeExcludeList()
{
QStringList includeExcludeList;
QListViewItemIterator it( m_view->includeExcludeList );
TQStringList includeExcludeList;
TQListViewItemIterator it( m_view->includeExcludeList );
while ( it.current() ) {
QListViewItem *item = it.current();
TQListViewItem *item = it.current();
IncludeExcludeItem *includeExcludeItem = static_cast<IncludeExcludeItem*>(item);
includeExcludeList.append(includeExcludeItem->includeExclude());
++it;
@ -69,10 +69,10 @@ QStringList IncludeExcludeDialog::includeExcludeList()
return includeExcludeList;
}
void IncludeExcludeDialog::setIncludeExcludeList(QStringList includeExcludeList)
void IncludeExcludeDialog::setIncludeExcludeList(TQStringList includeExcludeList)
{
m_view->includeExcludeList->clear();
QStringList::iterator it;
TQStringList::iterator it;
IncludeExcludeItem *lastItem;
for ( it = includeExcludeList.begin(); it != includeExcludeList.end(); ++it )
{

@ -27,13 +27,14 @@
class IncludeExcludeDialog: public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
IncludeExcludeDialog(QWidget *parent);
IncludeExcludeDialog(TQWidget *tqparent);
~IncludeExcludeDialog() {};
QStringList includeExcludeList();
void setIncludeExcludeList(QStringList includeExcludeList);
TQStringList includeExcludeList();
void setIncludeExcludeList(TQStringList includeExcludeList);
public slots:
void slotInclude();

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>IncludeExcludeView</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>IncludeExcludeView</cstring>
</property>
@ -22,9 +22,9 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
@ -59,9 +59,9 @@
</sizepolicy>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout18</cstring>
<cstring>tqlayout18</cstring>
</property>
<hbox>
<property name="name">
@ -77,7 +77,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>61</width>
<height>20</height>
@ -102,7 +102,7 @@
</widget>
</hbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@ -113,9 +113,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout7</cstring>
<cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
@ -157,9 +157,9 @@
<bool>true</bool>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
<cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
@ -183,7 +183,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>121</height>
@ -202,7 +202,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kurlrequester.h</includehint>

@ -18,9 +18,9 @@
#include "keepmainwindow.h"
#include <qcolor.h>
#include <qlayout.h>
#include <qvariant.h>
#include <tqcolor.h>
#include <tqlayout.h>
#include <tqvariant.h>
#include <dcopclient.h>
#include <kactioncollection.h>
#include <kstdaction.h>
@ -44,7 +44,7 @@
#include "keepsettings.h"
#include "logdialog.h"
KeepMainWindow::KeepMainWindow(QWidget *parent, const char *name): KMainWindow(parent,name)
KeepMainWindow::KeepMainWindow(TQWidget *tqparent, const char *name): KMainWindow(tqparent,name)
{
setCaption(i18n("Backup System"));
@ -63,7 +63,7 @@ KeepMainWindow::KeepMainWindow(QWidget *parent, const char *name): KMainWindow(p
initActions();
initConnections();
resize( minimumSizeHint() );
resize( tqminimumSizeHint() );
createGUI(0L);
@ -78,26 +78,26 @@ KeepMainWindow::~KeepMainWindow()
void KeepMainWindow::initActions()
{
KStdAction::quit(this, SLOT(close()), actionCollection());
new KAction( i18n("Check rdiff-backup"), "info", "", this, SLOT(slotCheckRDB()), actionCollection(), "check_rdiff-backup" );
new KAction( i18n("Configure backups"), "configure", "", this, SLOT(slotConfigureBackup()), actionCollection(), "configure_backups" );
new KAction( i18n("Configure"), "configure", "", this, SLOT(slotConfigure()), actionCollection(), "configure_keep" );
new KAction( i18n("Add Backup"), "add_backup", "", this, SLOT(slotAddBackupWizard()), actionCollection(), "add_backup" );
new KAction( i18n("Restore Backup"), "restore_dir", "", this, SLOT(slotRestoreBackupWizard()), actionCollection(), "restore_backup" );
new KAction( i18n("Backup Now"), "force_backup", "", this, SLOT(slotForceBackup()), actionCollection(), "force_backup" );
new KAction( i18n("View log"), "log", "", this, SLOT(slotViewLog()), actionCollection(), "view_log");
KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
new KAction( i18n("Check rdiff-backup"), "info", "", TQT_TQOBJECT(this), TQT_SLOT(slotCheckRDB()), actionCollection(), "check_rdiff-backup" );
new KAction( i18n("Configure backups"), "configure", "", TQT_TQOBJECT(this), TQT_SLOT(slotConfigureBackup()), actionCollection(), "configure_backups" );
new KAction( i18n("Configure"), "configure", "", TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection(), "configure_keep" );
new KAction( i18n("Add Backup"), "add_backup", "", TQT_TQOBJECT(this), TQT_SLOT(slotAddBackupWizard()), actionCollection(), "add_backup" );
new KAction( i18n("Restore Backup"), "restore_dir", "", TQT_TQOBJECT(this), TQT_SLOT(slotRestoreBackupWizard()), actionCollection(), "restore_backup" );
new KAction( i18n("Backup Now"), "force_backup", "", TQT_TQOBJECT(this), TQT_SLOT(slotForceBackup()), actionCollection(), "force_backup" );
new KAction( i18n("View log"), "log", "", TQT_TQOBJECT(this), TQT_SLOT(slotViewLog()), actionCollection(), "view_log");
}
void KeepMainWindow::initConnections()
{
connect( m_actionView->m_btnAddWizard, SIGNAL( clicked()), this, SLOT( slotAddBackupWizard() ) );
connect( m_actionView->m_btnRestoreWizard, SIGNAL( clicked()), this, SLOT( slotRestoreBackupWizard() ) );
connect( m_actionView->m_btnForce, SIGNAL( clicked()), this, SLOT( slotForceBackup() ) );
connect( m_actionView->m_btnBackupConfig, SIGNAL( clicked()), this, SLOT( slotConfigureBackup() ) );
connect( m_actionView->m_btnLog, SIGNAL( clicked()), this, SLOT( slotViewLog() ) );
connect( m_actionView->m_btnLoadDaemon, SIGNAL( clicked()), this, SLOT( slotLoadDaemon() ) );
connect( m_actionView->m_btnUnloadDaemon, SIGNAL( clicked()), this, SLOT( slotUnloadDaemon() ) );
connect( m_actionView->m_btnReloadDaemon, SIGNAL( clicked()), this, SLOT( slotReloadDaemon() ) );
connect( m_actionView->m_btnAddWizard, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotAddBackupWizard() ) );
connect( m_actionView->m_btnRestoreWizard, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotRestoreBackupWizard() ) );
connect( m_actionView->m_btnForce, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotForceBackup() ) );
connect( m_actionView->m_btnBackupConfig, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotConfigureBackup() ) );
connect( m_actionView->m_btnLog, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotViewLog() ) );
connect( m_actionView->m_btnLoadDaemon, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotLoadDaemon() ) );
connect( m_actionView->m_btnUnloadDaemon, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotUnloadDaemon() ) );
connect( m_actionView->m_btnReloadDaemon, TQT_SIGNAL( clicked()), TQT_TQOBJECT(this), TQT_SLOT( slotReloadDaemon() ) );
}
void KeepMainWindow::slotRefreshGUI()
@ -125,7 +125,7 @@ void KeepMainWindow::slotCheckRDB()
{
RDBManager manager;
if ( manager.isRDB() )
KMessageBox::information(this, i18n("<b>The application rdiff-backup has been detected on your system.</b><br><br> You're running version %1 of rdiff-backup.").arg(manager.RDBVersion()));
KMessageBox::information(this, i18n("<b>The application rdiff-backup has been detected on your system.</b><br><br> You're running version %1 of rdiff-backup.").tqarg(manager.RDBVersion()));
else
KMessageBox::error(this,i18n("<b>The application rdiff-backup has not been detected on your system.</b><br><br>If rdiff-backup is not installed, Keep will not be able to make backups. To fix this problem, install rdiff-backup on your system."));
@ -169,7 +169,7 @@ void KeepMainWindow::slotConfigure()
void KeepMainWindow::slotAddBackupWizard()
{
AddBackupWizard *addBackupWizard = new AddBackupWizard(this, "addBackupWizard");
connect( addBackupWizard, SIGNAL( backupSetted(Backup)), this, SLOT( slotAddBackup(Backup) ) );
connect( addBackupWizard, TQT_SIGNAL( backupSetted(Backup)), TQT_TQOBJECT(this), TQT_SLOT( slotAddBackup(Backup) ) );
addBackupWizard->show();
}
@ -190,27 +190,27 @@ void KeepMainWindow::slotDaemonAlertState(bool state)
{
if ( !state )
{
m_actionView->m_ledDaemonState->setColor(Qt::green);
m_actionView->m_ledDaemonState->setColor(TQt::green);
}
else
{
m_actionView->m_ledDaemonState->setColor(Qt::red);
m_actionView->m_ledDaemonState->setColor(TQt::red);
}
}
bool KeepMainWindow::backupSystemRunning()
{
QCStringList modules;
QCString replyType;
QByteArray replyData;
TQCString replyType;
TQByteArray replyData;
if ( !kapp->dcopClient()->call( "kded", "kded", "loadedModules()", QByteArray(), replyType, replyData ) )
if ( !kapp->dcopClient()->call( "kded", "kded", "loadedModules()", TQByteArray(), replyType, replyData ) )
return false;
else
{
if ( replyType == "QCStringList" )
{
QDataStream reply( replyData, IO_ReadOnly );
TQDataStream reply( replyData, IO_ReadOnly );
reply >> modules;
}
}
@ -225,15 +225,15 @@ bool KeepMainWindow::backupSystemRunning()
void KeepMainWindow::slotLoadDaemon()
{
QCString service = "keep";
TQCString service = "keep";
QByteArray data, replyData;
QCString replyType;
QDataStream arg( data, IO_WriteOnly );
TQByteArray data, replyData;
TQCString replyType;
TQDataStream arg( data, IO_WriteOnly );
arg << service;
if ( kapp->dcopClient()->call( "kded", "kded", "loadModule(QCString)", data, replyType, replyData ) )
if ( kapp->dcopClient()->call( "kded", "kded", "loadModule(TQCString)", data, replyType, replyData ) )
{
QDataStream reply( replyData, IO_ReadOnly );
TQDataStream reply( replyData, IO_ReadOnly );
if ( replyType == "bool" )
{
bool result;
@ -260,13 +260,13 @@ void KeepMainWindow::slotLoadDaemon()
void KeepMainWindow::slotUnloadDaemon()
{
QCString service = "keep";
TQCString service = "keep";
QByteArray data;
QDataStream arg( data, IO_WriteOnly );
TQByteArray data;
TQDataStream arg( data, IO_WriteOnly );
arg << service;
if ( !kapp->dcopClient()->send( "kded", "kded", "unloadModule(QCString)", data ) )
if ( !kapp->dcopClient()->send( "kded", "kded", "unloadModule(TQCString)", data ) )
{
KMessageBox::error( this, i18n( "Unable to stop service." ) );
return;

@ -21,7 +21,7 @@
#include <kmainwindow.h>
#include <ktabwidget.h>
#include <qhbox.h>
#include <tqhbox.h>
#include "backup.h"
#include "actionview.h"
@ -29,8 +29,9 @@
class KeepMainWindow: public KMainWindow
{
Q_OBJECT
TQ_OBJECT
public:
KeepMainWindow(QWidget *parent, const char *name);
KeepMainWindow(TQWidget *tqparent, const char *name);
~KeepMainWindow();
public slots:

@ -19,33 +19,33 @@
#include "logdialog.h"
#include <klocale.h>
#include <qlayout.h>
#include <tqlayout.h>
#include <kstandarddirs.h>
#include <dcopref.h>
#include <kdebug.h>
#include <kactivelabel.h>
#include <klistview.h>
#include <qpixmap.h>
#include <tqpixmap.h>
#include <kcombobox.h>
#include <qfile.h>
#include <qlabel.h>
#include <qgroupbox.h>
#include <qradiobutton.h>
#include <qcheckbox.h>
#include <tqfile.h>
#include <tqlabel.h>
#include <tqgroupbox.h>
#include <tqradiobutton.h>
#include <tqcheckbox.h>
#include <kmessagebox.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <qstringlist.h>
#include <tqstringlist.h>
#include "logview.h"
LogDialog::LogDialog(QWidget *parent): KDialogBase(Plain, i18n("View log"),
Help|Ok, Cancel, parent, "logDialog", true, false)
LogDialog::LogDialog(TQWidget *tqparent): KDialogBase(Plain, i18n("View log"),
Help|Ok, Cancel, tqparent, "logDialog", true, false)
{
m_logFilePath = locateLocal( "data", "keep/keep.log", true );
QFrame *page = plainPage();
QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
TQFrame *page = plainPage();
TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
m_view = new LogView(page,"logDialog");
topLayout->addWidget( m_view );
setMainWidget(page);
@ -59,13 +59,13 @@ LogDialog::LogDialog(QWidget *parent): KDialogBase(Plain, i18n("View log"),
void LogDialog::slotLoadLog()
{
m_view->logList->clear();
QFile file( m_logFilePath );
TQFile file( m_logFilePath );
if ( file.open( IO_ReadOnly ) ) {
QTextStream stream( &file );
QString line;
TQTextStream stream( &file );
TQString line;
while ( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
QStringList params = QStringList::split("\t",line);
TQStringList params = TQStringList::split("\t",line);
KListViewItem *item = new KListViewItem(m_view->logList,params[0],params[1],params[2]);
}
file.close();

@ -26,9 +26,10 @@
class LogDialog: public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
LogDialog(QWidget *parent);
LogDialog(TQWidget *tqparent);
~LogDialog() {};
public slots:
@ -36,7 +37,7 @@ public slots:
private:
LogView *m_view;
QString m_logFilePath;
TQString m_logFilePath;
};

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LogView</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>LogView</cstring>
</property>
@ -24,9 +24,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout2</cstring>
<cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
@ -79,7 +79,7 @@
</widget>
<customwidgets>
</customwidgets>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>

@ -18,17 +18,17 @@
#include "restorebackupwizard.h"
#include <qpushbutton.h>
#include <tqpushbutton.h>
#include <kiconloader.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kactivelabel.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <tqcheckbox.h>
#include <tqradiobutton.h>
#include <kurlrequester.h>
#include <qvaluelist.h>
#include <qdir.h>
#include <tqvaluelist.h>
#include <tqdir.h>
#include <kmessagebox.h>
#include "backuplistviewitem.h"
@ -37,10 +37,10 @@
#include "listviewtooltip.h"
#include "incrementlistviewitem.h"
RestoreBackupWizard::RestoreBackupWizard(QWidget *parent,const char* name): KWizard( parent, name, true)
RestoreBackupWizard::RestoreBackupWizard(TQWidget *tqparent,const char* name): KWizard( tqparent, name, true)
{
m_manager = new RDBManager();
connect( m_manager, SIGNAL(backupError(Backup,QString)), this, SLOT(slotRestoreError(Backup,QString)) );
connect( m_manager, TQT_SIGNAL(backupError(Backup,TQString)), this, TQT_SLOT(slotRestoreError(Backup,TQString)) );
KIconLoader icons;
this->setIcon( icons.loadIcon( "wizard",KIcon::Small ));
@ -48,9 +48,9 @@ RestoreBackupWizard::RestoreBackupWizard(QWidget *parent,const char* name): KWiz
m_popup = new KPopupMenu(this);
m_popup->insertTitle(i18n("Menu"));
m_popup->insertItem(i18n("Show differences destination/backup"), this, SLOT(slotShowDiff()));
m_popup->insertItem(i18n("List changed files"), this, SLOT(slotShowChanged()));
m_popup->insertItem(i18n("List files"), this, SLOT(slotShowList()));
m_popup->insertItem(i18n("Show differences destination/backup"), this, TQT_SLOT(slotShowDiff()));
m_popup->insertItem(i18n("List changed files"), this, TQT_SLOT(slotShowChanged()));
m_popup->insertItem(i18n("List files"), this, TQT_SLOT(slotShowList()));
setupPage1();
setupPage2();
@ -62,7 +62,7 @@ RestoreBackupWizard::RestoreBackupWizard(QWidget *parent,const char* name): KWiz
setNextEnabled(page2,true);
setFinishEnabled(page3, false);
resize( minimumSizeHint() );
resize( tqminimumSizeHint() );
}
RestoreBackupWizard::~RestoreBackupWizard()
@ -73,25 +73,25 @@ RestoreBackupWizard::~RestoreBackupWizard()
void RestoreBackupWizard::initConnections()
{
// If custom source setted
connect(restoreBackupWizard1View->btnCustomSource, SIGNAL( toggled(bool)),this,SLOT(slotCustomSourceChecked(bool)));
connect(restoreBackupWizard1View->btnCustomSource, TQT_SIGNAL( toggled(bool)),this,TQT_SLOT(slotCustomSourceChecked(bool)));
// Date selection popup menu
connect(restoreBackupWizard3View->incrementList, SIGNAL(contextMenu (KListView *, QListViewItem *, const QPoint &)), this, SLOT(slotContextMenu(KListView *,QListViewItem*,const QPoint&)));
connect(restoreBackupWizard3View->incrementList, TQT_SIGNAL(contextMenu (KListView *, TQListViewItem *, const TQPoint &)), this, TQT_SLOT(slotContextMenu(KListView *,TQListViewItem*,const TQPoint&)));
// Page 1 changes
connect(restoreBackupWizard1View->m_lstBackup,SIGNAL(selectionChanged()),this,SLOT(slotPage1Changed()));
connect(restoreBackupWizard1View->btnCustomSource,SIGNAL(toggled(bool)),this,SLOT(slotPage1Changed()));
connect(restoreBackupWizard1View->customSource,SIGNAL(textChanged(const QString &)),this,SLOT(slotPage1Changed()));
connect(restoreBackupWizard1View->m_lstBackup,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotPage1Changed()));
connect(restoreBackupWizard1View->btnCustomSource,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotPage1Changed()));
connect(restoreBackupWizard1View->customSource,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotPage1Changed()));
// Page 2 changes
connect(restoreBackupWizard2View->btnCustomDest,SIGNAL(toggled(bool)),this,SLOT(slotPage2Changed()));
connect(restoreBackupWizard2View->customDest,SIGNAL(textChanged(const QString &)),this,SLOT(slotPage2Changed()));
connect(restoreBackupWizard2View->btnCustomDest,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotPage2Changed()));
connect(restoreBackupWizard2View->customDest,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotPage2Changed()));
// Page 3 Changes
connect(restoreBackupWizard3View->incrementList,SIGNAL(selectionChanged()),this,SLOT(slotPage3Changed()));
connect(restoreBackupWizard3View->incrementList,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotPage3Changed()));
// Finish button
connect(finishButton(),SIGNAL(clicked()),this,SLOT(slotRestoreBackup()));
connect(finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotRestoreBackup()));
}
void RestoreBackupWizard::slotPage1Changed()
@ -101,7 +101,7 @@ void RestoreBackupWizard::slotPage1Changed()
// Checks if a standard backup is selected.
if ( !restoreBackupWizard1View->btnCustomSource->isChecked() )
{
QListViewItem *item = restoreBackupWizard1View->m_lstBackup->selectedItem();
TQListViewItem *item = restoreBackupWizard1View->m_lstBackup->selectedItem();
if ( item )
{
BackupListViewItem *backupItem = static_cast<BackupListViewItem*>(item);
@ -117,13 +117,13 @@ void RestoreBackupWizard::slotPage1Changed()
if ( b.dest() != "" )
{
RDBManager manager;
QDateTime lastBackup = manager.lastIncrement(b);
TQDateTime lastBackup = manager.lastIncrement(b);
restoreBackupWizard3View->lblLastBackup->setText(lastBackup.toString(Qt::LocalDate));
QValueList<QDateTime> increments = manager.incrementList(b);
TQValueList<TQDateTime> increments = manager.incrementList(b);
if ( increments.size() != 0 )
{
restoreBackupWizard3View->incrementList->clear();
QValueList<QDateTime>::iterator it;
TQValueList<TQDateTime>::iterator it;
for ( it = increments.begin(); it != increments.end(); ++it )
{
IncrementListViewItem *item = new IncrementListViewItem(restoreBackupWizard3View->incrementList,(*it));
@ -139,14 +139,14 @@ void RestoreBackupWizard::slotPage2Changed()
setNextEnabled(page2,false);
if ( !restoreBackupWizard2View->btnCustomDest->isChecked() )
{
QListViewItem *item = restoreBackupWizard1View->m_lstBackup->selectedItem();
TQListViewItem *item = restoreBackupWizard1View->m_lstBackup->selectedItem();
BackupListViewItem *backupItem = static_cast<BackupListViewItem*>(item);
setBackup(backupItem->backup());
setNextEnabled(page2,true);
}
else
{
QDir dir( restoreBackupWizard2View->customDest->url() );
TQDir dir( restoreBackupWizard2View->customDest->url() );
if ( dir.exists() && restoreBackupWizard2View->customDest->url() != "" )
{
Backup b = backup();
@ -160,7 +160,7 @@ void RestoreBackupWizard::slotPage2Changed()
void RestoreBackupWizard::slotPage3Changed()
{
setFinishEnabled(page3,false);
QListViewItem *item = restoreBackupWizard3View->incrementList->selectedItem();
TQListViewItem *item = restoreBackupWizard3View->incrementList->selectedItem();
if ( item )
setFinishEnabled(page3,true);
}
@ -178,20 +178,20 @@ void RestoreBackupWizard::slotCustomSourceChecked(bool value)
void RestoreBackupWizard::setupPage1()
{
page1 = new QHBox( this );
page1 = new TQHBox( this );
page1->setSpacing(0);
page1->setMargin(0);
restoreBackupWizard1View = new RestoreBackupWizard1View(page1,"restoreBackupWizard1View");
BackupConfig *backupConfig = new BackupConfig();
QValueList<Backup> backupList = backupConfig->backupList();
QValueList<Backup>::iterator it;
TQValueList<Backup> backupList = backupConfig->backupList();
TQValueList<Backup>::iterator it;
for ( it = backupList.begin(); it != backupList.end(); ++it )
{
new BackupListViewItem(restoreBackupWizard1View->m_lstBackup,*it);
}
QToolTip::remove(restoreBackupWizard1View->m_lstBackup);
TQToolTip::remove(restoreBackupWizard1View->m_lstBackup);
new ListViewToolTip(restoreBackupWizard1View->m_lstBackup);
restoreBackupWizard1View->customSource->setMode(KFile::Directory);
@ -202,7 +202,7 @@ void RestoreBackupWizard::setupPage1()
void RestoreBackupWizard::setupPage2()
{
page2 = new QHBox( this );
page2 = new TQHBox( this );
page2->setSpacing(0);
page2->setMargin(0);
@ -215,18 +215,18 @@ void RestoreBackupWizard::setupPage2()
void RestoreBackupWizard::setupPage3()
{
page3 = new QHBox( this );
page3 = new TQHBox( this );
page3->setSpacing(0);
page3->setMargin(0);
restoreBackupWizard3View = new RestoreBackupWizard3View(page3,"restoreBackupWizard3View");
restoreBackupWizard3View->incrementList->setSorting(0,false);
restoreBackupWizard3View->lblDate->setText(QDateTime::currentDateTime().toString(Qt::LocalDate));
restoreBackupWizard3View->lblDate->setText(TQDateTime::tqcurrentDateTime().toString(Qt::LocalDate));
addPage( page3, "Date to restore" );
}
void RestoreBackupWizard::slotContextMenu(KListView *list,QListViewItem *item,const QPoint&p)
void RestoreBackupWizard::slotContextMenu(KListView *list,TQListViewItem *item,const TQPoint&p)
{
m_popup->popup(p, 1);
}
@ -244,50 +244,50 @@ void RestoreBackupWizard::setBackup(Backup backup)
void RestoreBackupWizard::slotShowDiff()
{
Backup b = backup();
QListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
TQListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
IncrementListViewItem *incrementItem = static_cast<IncrementListViewItem*>(item2);
QDateTime date = incrementItem->date();
QString diff = m_manager->compareAtTime(b,date);
QString message = "<p><b>" + i18n("List of modifications since the selected increment:") + "</b></p><p>" + diff + "</p>";
TQDateTime date = incrementItem->date();
TQString diff = m_manager->compareAtTime(b,date);
TQString message = "<p><b>" + i18n("List of modifications since the selected increment:") + "</b></p><p>" + diff + "</p>";
KMessageBox::information(this,message,i18n("Modifications"));
}
void RestoreBackupWizard::slotShowChanged()
{
Backup b = backup();
QListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
TQListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
IncrementListViewItem *incrementItem = static_cast<IncrementListViewItem*>(item2);
QDateTime date = incrementItem->date();
QString changed = m_manager->listChangedSince(b,date);
TQDateTime date = incrementItem->date();
TQString changed = m_manager->listChangedSince(b,date);
if ( changed == "" )
changed = i18n("Nothing.");
QString message = "<p><b>" + i18n("List of changed files since the selected increment:") + "</b></p><p>" + changed + "</p>";
TQString message = "<p><b>" + i18n("List of changed files since the selected increment:") + "</b></p><p>" + changed + "</p>";
KMessageBox::information(this,message,i18n("Changed files"));
}
void RestoreBackupWizard::slotShowList()
{
Backup b = backup();
QListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
TQListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
IncrementListViewItem *incrementItem = static_cast<IncrementListViewItem*>(item2);
QDateTime date = incrementItem->date();
QString list = m_manager->listAtTime(b,date);
QString message = "<p><b>" + i18n("List of files in the selected increment:") + "</b></p><p>" + list + "</p>";
TQDateTime date = incrementItem->date();
TQString list = m_manager->listAtTime(b,date);
TQString message = "<p><b>" + i18n("List of files in the selected increment:") + "</b></p><p>" + list + "</p>";
KMessageBox::information(this,message,i18n("List of files"));
}
void RestoreBackupWizard::slotRestoreBackup()
{
Backup b = backup();
QListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
TQListViewItem *item2 = restoreBackupWizard3View->incrementList->selectedItem();
IncrementListViewItem *incrementItem = static_cast<IncrementListViewItem*>(item2);
QDateTime date = incrementItem->date();
TQDateTime date = incrementItem->date();
m_manager->slotRestoreBackup(b,date);
}
void RestoreBackupWizard::slotRestoreError(Backup backup,QString errorMessage)
void RestoreBackupWizard::slotRestoreError(Backup backup,TQString errorMessage)
{
KMessageBox::error(this,i18n("<p><b>An error occured restoring %1 backup:</b></p><p>%2</p>").arg(backup.dest()).arg(errorMessage));
KMessageBox::error(this,i18n("<p><b>An error occured restoring %1 backup:</b></p><p>%2</p>").tqarg(backup.dest()).tqarg(errorMessage));
}
#include "restorebackupwizard.moc"

@ -21,7 +21,7 @@
#include <kwizard.h>
#include <kpopupmenu.h>
#include <qhbox.h>
#include <tqhbox.h>
#include "restorebackupwizard1view.h"
#include "restorebackupwizard2view.h"
@ -32,15 +32,16 @@
class RestoreBackupWizard: public KWizard
{
Q_OBJECT
TQ_OBJECT
public:
RestoreBackupWizard(QWidget *parent, const char *name);
RestoreBackupWizard(TQWidget *tqparent, const char *name);
~RestoreBackupWizard();
Backup backup();
void setBackup(Backup backup);
protected slots:
void slotContextMenu(KListView *list,QListViewItem * item,const QPoint &point);
void slotContextMenu(KListView *list,TQListViewItem * item,const TQPoint &point);
void slotPage1Changed();
void slotPage2Changed();
void slotPage3Changed();
@ -52,7 +53,7 @@ protected slots:
void slotShowList();
void slotRestoreBackup();
void slotRestoreError(Backup backup,QString errorMessage);
void slotRestoreError(Backup backup,TQString errorMessage);
private:
// init GUI
@ -62,7 +63,7 @@ private:
void initConnections();
KPopupMenu *m_popup;
QHBox *page1,*page2,*page3;
TQHBox *page1,*page2,*page3;
RestoreBackupWizard1View *restoreBackupWizard1View ;
RestoreBackupWizard2View *restoreBackupWizard2View;
RestoreBackupWizard3View *restoreBackupWizard3View;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>RestoreBackupWizard1View</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>RestoreBackupWizard1View</cstring>
</property>
@ -30,23 +30,23 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout7</cstring>
<cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>pixmapLabel1</cstring>
</property>
@ -67,7 +67,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>130</height>
@ -76,9 +76,9 @@
</spacer>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
@ -152,7 +152,7 @@
<enum>LastColumn</enum>
</property>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@ -171,15 +171,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout9</cstring>
<cstring>tqlayout9</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>btnCustomSource</cstring>
</property>
@ -187,9 +187,9 @@
<string>Use custom backup directory</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8</cstring>
<cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
@ -260,7 +260,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>klistview.h</includehint>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>RestoreBackupWizard2View</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>RestoreBackupWizard2View</cstring>
</property>
@ -22,23 +22,23 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout50</cstring>
<cstring>tqlayout50</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>pixmapLabel1</cstring>
</property>
@ -59,7 +59,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>130</height>
@ -68,9 +68,9 @@
</spacer>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout49</cstring>
<cstring>tqlayout49</cstring>
</property>
<vbox>
<property name="name">
@ -92,7 +92,7 @@
<string>Choose a location to restore the selected backup.</string>
</property>
</widget>
<widget class="QButtonGroup">
<widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup3</cstring>
</property>
@ -103,15 +103,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout48</cstring>
<cstring>tqlayout48</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QRadioButton">
<widget class="TQRadioButton">
<property name="name">
<cstring>btnDefaultDest</cstring>
</property>
@ -136,7 +136,7 @@
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QRadioButton">
<widget class="TQRadioButton">
<property name="name">
<cstring>btnCustomDest</cstring>
</property>
@ -144,9 +144,9 @@
<string>Use custom directory:</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8</cstring>
<cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
@ -200,7 +200,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>160</height>
@ -228,7 +228,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kactivelabel.h</includehint>

File diff suppressed because one or more lines are too long

@ -25,7 +25,7 @@ Backup::Backup()
{
}
Backup::Backup( QString source, QString dest, int interval, int deleteAfter, bool neverDelete,bool useCompression, bool excludeSpecialFiles,bool useAdvancedConfig,QStringList optionList,bool useIncludeExclude,QStringList includeExcludeList)
Backup::Backup( TQString source, TQString dest, int interval, int deleteAfter, bool neverDelete,bool useCompression, bool excludeSpecialFiles,bool useAdvancedConfig,TQStringList optionList,bool useIncludeExclude,TQStringList includeExcludeList)
{
m_source = source;
m_dest = dest;
@ -43,22 +43,22 @@ Backup::~Backup()
{
}
QString Backup::source()
TQString Backup::source()
{
return m_source;
}
void Backup::setSource(QString source)
void Backup::setSource(TQString source)
{
m_source = source;
}
QString Backup::dest()
TQString Backup::dest()
{
return m_dest;
}
void Backup::setDest(QString dest)
void Backup::setDest(TQString dest)
{
m_dest = dest;
}
@ -123,12 +123,12 @@ void Backup::setUseAdvancedConfig(bool useAdvancedConfig)
m_useAdvancedConfig = useAdvancedConfig;
}
QStringList Backup::optionList()
TQStringList Backup::optionList()
{
return m_optionList;
}
void Backup::setOptionList(QStringList optionList)
void Backup::setOptionList(TQStringList optionList)
{
m_optionList = optionList;
}
@ -143,31 +143,31 @@ void Backup::setUseIncludeExclude(bool useIncludeExclude)
m_useIncludeExclude = useIncludeExclude;
}
QStringList Backup::includeExcludeList()
TQStringList Backup::includeExcludeList()
{
return m_includeExcludeList;
}
void Backup::setIncludeExcludeList(QStringList includeExcludeList)
void Backup::setIncludeExcludeList(TQStringList includeExcludeList)
{
m_includeExcludeList = includeExcludeList;
}
QString Backup::htmlDesc()
TQString Backup::htmlDesc()
{
QString del;
QString compression;
TQString del;
TQString compression;
if ( m_neverDelete )
del = i18n("Never delete");
else
del = i18n("%1 days").arg(m_deleteAfter);
del = i18n("%1 days").tqarg(m_deleteAfter);
if ( m_useCompression )
compression = i18n("Yes");
else
compression = i18n("No");
QString html = "<p><b>" + i18n("Source directory:") + "</b><br>"
TQString html = "<p><b>" + i18n("Source directory:") + "</b><br>"
+ m_source + "<br><b>" + i18n("Destination directory:") + "</b><br>"
+ m_dest + "</p><p><b>" + i18n("Interval:") + "</b> " + i18n("%1 days").arg(m_interval)
+ m_dest + "</p><p><b>" + i18n("Interval:") + "</b> " + i18n("%1 days").tqarg(m_interval)
+ "<br><b>" + i18n("Delete after:") + "</b> " + del
+ "<br><b>" + i18n("Use compression:") + "</b> " + compression
+ "</p>";

@ -19,19 +19,19 @@
#ifndef _BACKUP_H_
#define _BACKUP_H_
#include <qstringlist.h>
#include <tqstringlist.h>
class Backup
{
public:
Backup( QString source, QString dest, int m_interval, int m_deleteAfter, bool m_neverDelete,bool useCompression,bool excludeSpecialFiles,bool useAdvancedConfig,QStringList optionList,bool useIncludeExclude,QStringList includeExcludeList);
Backup( TQString source, TQString dest, int m_interval, int m_deleteAfter, bool m_neverDelete,bool useCompression,bool excludeSpecialFiles,bool useAdvancedConfig,TQStringList optionList,bool useIncludeExclude,TQStringList includeExcludeList);
Backup();
~Backup();
QString source();
void setSource(QString source);
QString dest();
void setDest(QString dest);
TQString source();
void setSource(TQString source);
TQString dest();
void setDest(TQString dest);
int interval();
void setInterval(int interval);
int deleteAfter();
@ -44,27 +44,27 @@ public:
void setExcludeSpecialFiles(bool excludeSpecialFiles);
bool useAdvancedConfig();
void setUseAdvancedConfig(bool useAdvancedConfig);
QStringList optionList();
void setOptionList(QStringList optionList);
TQStringList optionList();
void setOptionList(TQStringList optionList);
bool useIncludeExclude();
void setUseIncludeExclude(bool useIncludeExclude);
QStringList includeExcludeList();
void setIncludeExcludeList(QStringList includeExcludeList);
TQStringList includeExcludeList();
void setIncludeExcludeList(TQStringList includeExcludeList);
QString htmlDesc();
TQString htmlDesc();
private:
QString m_source;
QString m_dest;
TQString m_source;
TQString m_dest;
int m_interval;
int m_deleteAfter;
bool m_neverDelete;
bool m_useCompression;
bool m_excludeSpecialFiles;
bool m_useAdvancedConfig;
QStringList m_optionList;
TQStringList m_optionList;
bool m_useIncludeExclude;
QStringList m_includeExcludeList;
TQStringList m_includeExcludeList;
};
#endif

@ -34,7 +34,7 @@ void BackupConfig::addBackup(Backup backup)
{
int id = generateId();
m_config->setGroup( ("Backup_" + QString::number(id)) );
m_config->setGroup( ("Backup_" + TQString::number(id)) );
m_config->writeEntry( "Source", backup.source());
m_config->writeEntry( "Dest", backup.dest());
m_config->writeEntry( "Interval", backup.interval());
@ -50,39 +50,39 @@ void BackupConfig::addBackup(Backup backup)
m_config->sync();
}
QValueList<Backup> BackupConfig::backupList()
TQValueList<Backup> BackupConfig::backupList()
{
QValueList<Backup> backupList;
QStringList groupList = m_config->groupList();
QStringList backupNameList = groupList.grep("Backup_");
for ( QStringList::Iterator it = backupNameList.begin(); it != backupNameList.end(); ++it ) {
TQValueList<Backup> backupList;
TQStringList groupList = m_config->groupList();
TQStringList backupNameList = groupList.grep("Backup_");
for ( TQStringList::Iterator it = backupNameList.begin(); it != backupNameList.end(); ++it ) {
m_config->setGroup(*it);
QString source = m_config->readEntry("Source");
QString dest = m_config->readEntry("Dest");
TQString source = m_config->readEntry("Source");
TQString dest = m_config->readEntry("Dest");
int interval = m_config->readNumEntry("Interval");
int deleteAfter = m_config->readNumEntry("DeleteAfter");
bool neverDelete = m_config->readBoolEntry("NeverDelete");
bool useCompression = m_config->readBoolEntry("UseCompression");
bool excludeSpecialFiles = m_config->readBoolEntry("ExcludeSpecialFiles");
bool useAdvancedConfig = m_config->readBoolEntry("UseAdvancedConfig");
QStringList optionList = m_config->readListEntry( "OptionList");
TQStringList optionList = m_config->readListEntry( "OptionList");
bool useIncludeExclude = m_config->readBoolEntry("UseIncludeExclude");
QStringList includeExcludeList = m_config->readListEntry("IncludeExcludeList");
TQStringList includeExcludeList = m_config->readListEntry("IncludeExcludeList");
backupList.append(Backup(source,dest,interval,deleteAfter,neverDelete,useCompression,excludeSpecialFiles,useAdvancedConfig,optionList,useIncludeExclude,includeExcludeList));
}
return backupList;
}
void BackupConfig::setBackupList(QValueList<Backup> backups)
void BackupConfig::setBackupList(TQValueList<Backup> backups)
{
QStringList groupList = m_config->groupList();
QStringList backupNameList = groupList.grep("Backup_");
for ( QStringList::Iterator it = backupNameList.begin(); it != backupNameList.end(); ++it ) {
TQStringList groupList = m_config->groupList();
TQStringList backupNameList = groupList.grep("Backup_");
for ( TQStringList::Iterator it = backupNameList.begin(); it != backupNameList.end(); ++it ) {
m_config->deleteGroup(*it);
}
m_config->sync();
QValueList<Backup>::iterator it;
TQValueList<Backup>::iterator it;
for ( it = backups.begin(); it != backups.end(); ++it )
{
addBackup(*it);

@ -19,21 +19,21 @@
#ifndef _BACKUPCONFIG_H_
#define _BACKUPCONFIG_H_
#include <qvaluelist.h>
#include <qobject.h>
#include <tqvaluelist.h>
#include <tqobject.h>
#include <kconfig.h>
#include "backup.h"
class BackupConfig: public QObject
class BackupConfig: public TQObject
{
public:
BackupConfig();
~BackupConfig();
void addBackup(Backup backup);
QValueList<Backup> backupList();
void setBackupList(QValueList<Backup> backups);
TQValueList<Backup> backupList();
void setBackupList(TQValueList<Backup> backups);
private:
KConfig *m_config;

@ -19,10 +19,10 @@
#include "backuplistviewitem.h"
#include <klocale.h>
#include <qdir.h>
#include <tqdir.h>
#include <klistview.h>
BackupListViewItem::BackupListViewItem(KListView *parent,Backup &backup): QListViewItem (parent)
BackupListViewItem::BackupListViewItem(KListView *tqparent,Backup &backup): TQListViewItem (tqparent)
{
setBackup(backup);
}
@ -44,14 +44,14 @@ void BackupListViewItem::setBackup(Backup backup)
void BackupListViewItem::setBackupText()
{
setText(0, QDir(m_backup.source()).dirName() );
setText(1, QDir(m_backup.dest()).dirName() );
setText(2, i18n("%1 days").arg(m_backup.interval()));
QString deleteAfter;
setText(0, TQDir(m_backup.source()).dirName() );
setText(1, TQDir(m_backup.dest()).dirName() );
setText(2, i18n("%1 days").tqarg(m_backup.interval()));
TQString deleteAfter;
if ( m_backup.neverDelete() == true )
deleteAfter = i18n("Never");
else
deleteAfter = i18n("%1 days").arg(m_backup.deleteAfter());
deleteAfter = i18n("%1 days").tqarg(m_backup.deleteAfter());
setText(3, deleteAfter);
}

@ -23,10 +23,10 @@
#include "backup.h"
class BackupListViewItem : public QListViewItem
class BackupListViewItem : public TQListViewItem
{
public:
BackupListViewItem(KListView *parent,Backup &backup);
BackupListViewItem(KListView *tqparent,Backup &backup);
~BackupListViewItem();
Backup backup();

@ -19,15 +19,15 @@
#include "includeexcludeitem.h"
#include <klocale.h>
#include <qdir.h>
#include <tqdir.h>
#include <klistview.h>
IncludeExcludeItem::IncludeExcludeItem(KListView *parent,QString includeExclude): QListViewItem (parent)
IncludeExcludeItem::IncludeExcludeItem(KListView *tqparent,TQString includeExclude): TQListViewItem (tqparent)
{
setIncludeExclude(includeExclude);
}
IncludeExcludeItem::IncludeExcludeItem(KListView *parent,IncludeExcludeItem *item,QString includeExclude): QListViewItem (parent,item)
IncludeExcludeItem::IncludeExcludeItem(KListView *tqparent,IncludeExcludeItem *item,TQString includeExclude): TQListViewItem (tqparent,item)
{
setIncludeExclude(includeExclude);
}
@ -37,12 +37,12 @@ IncludeExcludeItem::~IncludeExcludeItem()
{
}
QString IncludeExcludeItem::includeExclude()
TQString IncludeExcludeItem::includeExclude()
{
return m_includeExclude;
}
void IncludeExcludeItem::setIncludeExclude(QString includeExclude)
void IncludeExcludeItem::setIncludeExclude(TQString includeExclude)
{
m_includeExclude = includeExclude;
setIncludeExcludeText();
@ -50,8 +50,8 @@ void IncludeExcludeItem::setIncludeExclude(QString includeExclude)
void IncludeExcludeItem::setIncludeExcludeText()
{
QString type = m_includeExclude.left(1);
QString file = m_includeExclude.right(m_includeExclude.length() - 1);
TQString type = m_includeExclude.left(1);
TQString file = m_includeExclude.right(m_includeExclude.length() - 1);
setText(0, file);
if ( type == "I" )
setText(1,i18n("Included"));

@ -23,18 +23,18 @@
#include "backup.h"
class IncludeExcludeItem : public QListViewItem
class IncludeExcludeItem : public TQListViewItem
{
public:
IncludeExcludeItem(KListView *parent,QString includeExclude);
IncludeExcludeItem(KListView *parent,IncludeExcludeItem *item,QString includeExclude);
IncludeExcludeItem(KListView *tqparent,TQString includeExclude);
IncludeExcludeItem(KListView *tqparent,IncludeExcludeItem *item,TQString includeExclude);
~IncludeExcludeItem();
QString includeExclude();
void setIncludeExclude(QString includeExclude);
TQString includeExclude();
void setIncludeExclude(TQString includeExclude);
private:
QString m_includeExclude;
TQString m_includeExclude;
void setIncludeExcludeText();
};

@ -19,15 +19,15 @@
#include "incrementlistviewitem.h"
#include <klocale.h>
#include <qdir.h>
#include <tqdir.h>
#include <klistview.h>
IncrementListViewItem::IncrementListViewItem(KListView *parent,QDateTime date): QListViewItem (parent)
IncrementListViewItem::IncrementListViewItem(KListView *tqparent,TQDateTime date): TQListViewItem (tqparent)
{
setDate(date);
}
IncrementListViewItem::IncrementListViewItem(KListView *parent,QListViewItem *item,QDateTime date): QListViewItem (parent,item)
IncrementListViewItem::IncrementListViewItem(KListView *tqparent,TQListViewItem *item,TQDateTime date): TQListViewItem (tqparent,item)
{
setDate(date);
}
@ -37,12 +37,12 @@ IncrementListViewItem::~IncrementListViewItem()
{
}
QDateTime IncrementListViewItem::date()
TQDateTime IncrementListViewItem::date()
{
return m_date;
}
void IncrementListViewItem::setDate(QDateTime date)
void IncrementListViewItem::setDate(TQDateTime date)
{
m_date = date;
setDateText();

@ -20,21 +20,21 @@
#define _INCREMENTLISTVIEWITEM_H_
#include <klistview.h>
#include <qdatetime.h>
#include <tqdatetime.h>
class IncrementListViewItem : public QListViewItem
class IncrementListViewItem : public TQListViewItem
{
public:
IncrementListViewItem(KListView *parent, QDateTime date);
IncrementListViewItem(KListView *parent, QListViewItem *item,QDateTime date);
IncrementListViewItem(KListView *tqparent, TQDateTime date);
IncrementListViewItem(KListView *tqparent, TQListViewItem *item,TQDateTime date);
~IncrementListViewItem();
QDateTime date();
void setDate(QDateTime date);
TQDateTime date();
void setDate(TQDateTime date);
private:
QDateTime m_date;
TQDateTime m_date;
void setDateText();
};

@ -20,59 +20,59 @@
#ifndef _LISTVIEWTOOLTIP_H_
#define _LISTVIEWTOOLTIP_H_
#include <qtooltip.h>
#include <qlistview.h>
#include <qheader.h>
#include <tqtooltip.h>
#include <tqlistview.h>
#include <tqheader.h>
#include "backuplistviewitem.h"
#include "backup.h"
class ListViewToolTip : public QToolTip
class ListViewToolTip : public TQToolTip
{
public:
ListViewToolTip(QListView* parent);
ListViewToolTip(TQListView* tqparent);
protected:
void maybeTip( const QPoint& p );
void maybeTip( const TQPoint& p );
private:
QListView* listView;
TQListView* listView;
};
inline ListViewToolTip::ListViewToolTip( QListView* parent ): QToolTip( parent->viewport() ), listView( parent ) {}
inline ListViewToolTip::ListViewToolTip( TQListView* tqparent ): TQToolTip( tqparent->viewport() ), listView( tqparent ) {}
inline void ListViewToolTip::maybeTip( const QPoint& p ) {
inline void ListViewToolTip::maybeTip( const TQPoint& p ) {
if ( !listView )
return;
QListViewItem* item = listView->itemAt( p );
TQListViewItem* item = listView->itemAt( p );
if ( !item )
return;
const QRect itemRect = listView->itemRect( item );
if ( !itemRect.isValid() )
const TQRect tqitemRect = listView->tqitemRect( item );
if ( !tqitemRect.isValid() )
return;
const int col = listView->header()->sectionAt( p.x() );
if ( col == -1 )
return;
const QRect headerRect = listView->header()->sectionRect( col );
const TQRect headerRect = listView->header()->sectionRect( col );
if ( !headerRect.isValid() )
return;
const QRect cellRect( headerRect.left(), itemRect.top(),headerRect.width(), itemRect.height());
const TQRect cellRect( headerRect.left(), tqitemRect.top(),headerRect.width(), tqitemRect.height());
BackupListViewItem* backupItem = static_cast<BackupListViewItem*>(item);
QString tipStr = backupItem->backup().htmlDesc();
TQString tipStr = backupItem->backup().htmlDesc();
/*
if( col == 0 )
tipStr = QString( "Contents of this cell: <b>%1</b>" ).arg(item->text( 0 ) );
tipStr = TQString( "Contents of this cell: <b>%1</b>" ).tqarg(item->text( 0 ) );
else if( col == 1 )
tipStr = QString( "Contents of that cell: <em>%1</em>" ).arg(item->text( 1 ) );
tipStr = TQString( "Contents of that cell: <em>%1</em>" ).tqarg(item->text( 1 ) );
else
tipStr = QString( "Something else" );
tipStr = TQString( "Something else" );
*/
tip( cellRect, tipStr );
}

@ -35,17 +35,17 @@ void RDBListener::receivedStdOut(KProcess *proc, char *buffer, int buflen)
m_stdOut.append(buffer);
}
QString RDBListener::errorMessage()
TQString RDBListener::errorMessage()
{
return m_stdErr.join("").simplifyWhiteSpace();
}
QStringList RDBListener::stdErr()
TQStringList RDBListener::stdErr()
{
return m_stdErr;
}
QStringList RDBListener::stdOut()
TQStringList RDBListener::stdOut()
{
return m_stdOut;
}

@ -19,19 +19,20 @@
#ifndef _RDBLISTENER_H_
#define _RDBLISTENER_H_
#include <qstringlist.h>
#include <tqstringlist.h>
#include <qobject.h>
#include <tqobject.h>
#include <kprocess.h>
class RDBListener: public QObject
class RDBListener: public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
RDBListener();
QStringList stdOut();
QStringList stdErr();
QString errorMessage();
TQStringList stdOut();
TQStringList stdErr();
TQString errorMessage();
bool isOk();
public slots:
@ -39,8 +40,8 @@ public slots:
void receivedStdErr(KProcess *proc, char *buffer, int buflen);
private:
QStringList m_stdOut;
QStringList m_stdErr;
TQStringList m_stdOut;
TQStringList m_stdErr;
bool m_isOk;
};

@ -20,7 +20,7 @@
#include <kprocess.h>
#include <kdebug.h>
#include <qfile.h>
#include <tqfile.h>
#include <keepsettings.h>
RDBManager::RDBManager()
@ -33,42 +33,42 @@ RDBManager::~RDBManager()
void RDBManager::slotCheckBackup()
{
QValueList<Backup> backups = outdatedBackupList();
QValueList<Backup>::iterator it;
TQValueList<Backup> backups = outdatedBackupList();
TQValueList<Backup>::iterator it;
for ( it = backups.begin(); it != backups.end(); ++it )
{
doBackup(*it);
}
}
void RDBManager::slotForceBackup(QValueList<Backup> backupList)
void RDBManager::slotForceBackup(TQValueList<Backup> backupList)
{
QValueList<Backup>::iterator it;
TQValueList<Backup>::iterator it;
for ( it = backupList.begin(); it != backupList.end(); ++it )
{
doBackup(*it);
}
}
QString RDBManager::compareAtTime(Backup backup, QDateTime date)
TQString RDBManager::compareAtTime(Backup backup, TQDateTime date)
{
// Gets the rdiff-backup process
KProcess *proc = RDBProcess();
// Adds the options
*proc << "--compare-at-time";
*proc << QString::number(date.toTime_t()); // increment date
*proc << TQString::number(date.toTime_t()); // increment date
// Adds source and dest
*proc << QFile::encodeName(KProcess::quote(backup.source()));
*proc << QFile::encodeName(KProcess::quote(backup.dest()));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.source())));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.dest())));
// Adds the listener
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
QStringList output = listen->stdOut();
QStringList::iterator it = output.begin();
TQStringList output = listen->stdOut();
TQStringList::iterator it = output.begin();
kdDebug() << "Executed process: " << proc->args() << endl;
@ -78,24 +78,24 @@ QString RDBManager::compareAtTime(Backup backup, QDateTime date)
return (*it);
}
QString RDBManager::listChangedSince(Backup backup, QDateTime date)
TQString RDBManager::listChangedSince(Backup backup, TQDateTime date)
{
// Gets the rdiff-backup process
KProcess *proc = RDBProcess();
// Adds the options
*proc << "--list-changed-since";
*proc << QString::number(date.toTime_t()); // increment date
*proc << TQString::number(date.toTime_t()); // increment date
// Adds the dest
*proc << QFile::encodeName(KProcess::quote(backup.dest()));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.dest())));
// Adds a listener
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
QStringList output = listen->stdOut();
QStringList::iterator it = output.begin();
TQStringList output = listen->stdOut();
TQStringList::iterator it = output.begin();
kdDebug() << "Executed process: " << proc->args() << endl;
@ -105,24 +105,24 @@ QString RDBManager::listChangedSince(Backup backup, QDateTime date)
return (*it);
}
QString RDBManager::listAtTime(Backup backup, QDateTime date)
TQString RDBManager::listAtTime(Backup backup, TQDateTime date)
{
// Gets the rdiff-backup process
KProcess *proc = RDBProcess();
// Adds the options
*proc << "--list-at-time";
*proc << QString::number(date.toTime_t()); // increment date
*proc << TQString::number(date.toTime_t()); // increment date
// Adds the dest
*proc << QFile::encodeName(KProcess::quote(backup.dest()));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.dest())));
// Adds a listener
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
QStringList output = listen->stdOut();
QStringList::iterator it = output.begin();
TQStringList output = listen->stdOut();
TQStringList::iterator it = output.begin();
kdDebug() << "Executed process: " << proc->args() << endl;
@ -132,7 +132,7 @@ QString RDBManager::listAtTime(Backup backup, QDateTime date)
return (*it);
}
QValueList<QDateTime> RDBManager::incrementList(Backup backup)
TQValueList<TQDateTime> RDBManager::incrementList(Backup backup)
{
// Gets the rdiff-backup process
KProcess *proc = RDBProcess();
@ -141,27 +141,27 @@ QValueList<QDateTime> RDBManager::incrementList(Backup backup)
*proc << "-v2";
*proc << "--parsable-output";
// Adds the dest
*proc << QFile::encodeName(KProcess::quote(backup.dest()));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.dest())));
// Adds a listener
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
QStringList output = listen->stdOut();
QStringList::iterator it = output.begin();
TQStringList output = listen->stdOut();
TQStringList::iterator it = output.begin();
QStringList lines = QStringList::split("\n",*it);
QValueList<QDateTime> dateList;
TQStringList lines = TQStringList::split("\n",*it);
TQValueList<TQDateTime> dateList;
QStringList::iterator it2 = output.begin();
TQStringList::iterator it2 = output.begin();
for ( it2 = lines.begin(); it2 != lines.end(); ++it2 )
{
QStringList field = QStringList::split(" ",*it2);
QStringList::iterator dateStr = field.begin();
TQStringList field = TQStringList::split(" ",*it2);
TQStringList::iterator dateStr = field.begin();
long timestamp = (*dateStr).toUInt();
QDateTime datetime;
TQDateTime datetime;
datetime.setTime_t(timestamp);
dateList.append(datetime);
}
@ -174,24 +174,24 @@ QValueList<QDateTime> RDBManager::incrementList(Backup backup)
return dateList;
}
QDateTime RDBManager::lastIncrement(Backup backup)
TQDateTime RDBManager::lastIncrement(Backup backup)
{
QValueList<QDateTime> increments = incrementList(backup);
QDateTime last = increments.last();
TQValueList<TQDateTime> increments = incrementList(backup);
TQDateTime last = increments.last();
return last;
}
QValueList<Backup> RDBManager::outdatedBackupList()
TQValueList<Backup> RDBManager::outdatedBackupList()
{
BackupConfig config;
QValueList<Backup> backups = config.backupList();
QValueList<Backup> outdated;
QValueList<Backup>::iterator it;
TQValueList<Backup> backups = config.backupList();
TQValueList<Backup> outdated;
TQValueList<Backup>::iterator it;
kdDebug() << "Detecting outdated backup." << endl;
for ( it = backups.begin(); it != backups.end(); ++it )
{
QDateTime last = lastIncrement(*it);
QDate today = QDate::currentDate();
TQDateTime last = lastIncrement(*it);
TQDate today = TQDate::tqcurrentDate();
if ( last.date().daysTo(today) >= (*it).interval() )
{
kdDebug() << "Detected outdated backup: " << (*it).source() << endl;
@ -201,21 +201,21 @@ QValueList<Backup> RDBManager::outdatedBackupList()
return outdated;
}
void RDBManager::slotRestoreBackup(Backup backup,QDateTime time)
void RDBManager::slotRestoreBackup(Backup backup,TQDateTime time)
{
// Gets the rdiff-backup process
KProcess *proc = RDBProcess();
// Adds the options
*proc << "--force";
*proc << "--restore-as-of";
*proc << QString::number(time.toTime_t()); // Date of the increment to restore
*proc << TQString::number(time.toTime_t()); // Date of the increment to restore
// Adds source and dest
*proc << QFile::encodeName(KProcess::quote(backup.dest()));
*proc << QFile::encodeName(KProcess::quote(backup.source()));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.dest())));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.source())));
// Adds a listener (for output recording)
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,SIGNAL(receivedStderr(KProcess *,char *,int)),listen,SLOT(receivedStdErr(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStderr(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdErr(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
@ -239,13 +239,13 @@ bool RDBManager::isRDB()
*proc << "-V";
// Adds a listener (for output recording)
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
QStringList outList = listen->stdOut();
QStringList::iterator out = outList.begin();
TQStringList outList = listen->stdOut();
TQStringList::iterator out = outList.begin();
kdDebug() << "Executed process: " << proc->args() << endl;
@ -257,20 +257,20 @@ bool RDBManager::isRDB()
return true;
}
QString RDBManager::RDBVersion()
TQString RDBManager::RDBVersion()
{
// Gets the rdiff-backup process
KProcess *proc = RDBProcess();
*proc << "-V";
// Adds a listener (for output recording)
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
QStringList outList = listen->stdOut();
QStringList::iterator out = outList.begin();
TQStringList outList = listen->stdOut();
TQStringList::iterator out = outList.begin();
kdDebug() << "Executed process: " << proc->args() << endl;
@ -287,21 +287,21 @@ void RDBManager::doBackup(Backup backup)
// Adds include and exclude
if ( backup.useIncludeExclude() )
{
QStringList includeExcludeList = backup.includeExcludeList();
QStringList::iterator it;
TQStringList includeExcludeList = backup.includeExcludeList();
TQStringList::iterator it;
for ( it = includeExcludeList.begin(); it != includeExcludeList.end(); ++it )
{
QString type = (*it).left(1);
QString file = (*it).right((*it).length() - 1);
TQString type = (*it).left(1);
TQString file = (*it).right((*it).length() - 1);
if ( type == "I" )
{
*proc << "--include";
*proc << QFile::encodeName(KProcess::quote(file));
*proc << TQString(TQFile::encodeName(KProcess::quote(file)));
}
else if ( type == "E" )
{
*proc << "--exclude";
*proc << QFile::encodeName(KProcess::quote(file));
*proc << TQString(TQFile::encodeName(KProcess::quote(file)));
}
}
}
@ -318,19 +318,19 @@ void RDBManager::doBackup(Backup backup)
// For advanced mode
else
{
QStringList optionList = backup.optionList();
for ( QStringList::Iterator it = optionList.begin(); it != optionList.end(); ++it )
TQStringList optionList = backup.optionList();
for ( TQStringList::Iterator it = optionList.begin(); it != optionList.end(); ++it )
{
*proc << *it;
}
}
// Adds source and dest
*proc << QFile::encodeName(KProcess::quote(backup.source()));
*proc << QFile::encodeName(KProcess::quote(backup.dest()));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.source())));
*proc << TQString(TQFile::encodeName(KProcess::quote(backup.dest())));
// Adds a listener (for output recording)
RDBListener *listen = new RDBListener();
connect(proc,SIGNAL(receivedStdout(KProcess *,char *,int)),listen,SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,SIGNAL(receivedStderr(KProcess *,char *,int)),listen,SLOT(receivedStdErr(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStdout(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdOut(KProcess *,char *,int)));
connect(proc,TQT_SIGNAL(receivedStderr(KProcess *,char *,int)),listen,TQT_SLOT(receivedStdErr(KProcess *,char *,int)));
// Starts the process
if ( !proc->start(KProcess::Block, KProcess::AllOutput) )
kdDebug() << "Error starting rdiff-backup" << endl;
@ -360,7 +360,7 @@ void RDBManager::removeOldIncrements(Backup backup)
// Gets the rdiff-backup process
KProcess *proc = RDBProcess();
// Adds the options
*proc << "--remove-older-than" << QString("%1").arg(backup.deleteAfter()) + "D";
*proc << "--remove-older-than" << TQString("%1").tqarg(backup.deleteAfter()) + "D";
// Adds dest
*proc << backup.dest();
// Starts the process
@ -378,7 +378,7 @@ KProcess *RDBManager::RDBProcess(bool isNice,int niceLevel)
proc->setUseShell(true);
if ( isNice )
{
*proc << "nice" << "-n" << QString("%1").arg(niceLevel);
*proc << "nice" << "-n" << TQString("%1").tqarg(niceLevel);
}
*proc << "rdiff-backup";

@ -19,38 +19,39 @@
#ifndef _RDBMANAGER_H_
#define _RDBMANAGER_H_
#include <qvaluelist.h>
#include <qobject.h>
#include <qdatetime.h>
#include <tqvaluelist.h>
#include <tqobject.h>
#include <tqdatetime.h>
#include "backupconfig.h"
#include "rdblistener.h"
class RDBManager: public QObject
class RDBManager: public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
RDBManager();
~RDBManager();
QValueList<QDateTime> incrementList(Backup backup);
QValueList<Backup> outdatedBackupList();
QDateTime lastIncrement(Backup backup);
TQValueList<TQDateTime> incrementList(Backup backup);
TQValueList<Backup> outdatedBackupList();
TQDateTime lastIncrement(Backup backup);
QString compareAtTime(Backup backup, QDateTime date);
QString listChangedSince(Backup backup, QDateTime date);
QString listAtTime(Backup backup, QDateTime date);
TQString compareAtTime(Backup backup, TQDateTime date);
TQString listChangedSince(Backup backup, TQDateTime date);
TQString listAtTime(Backup backup, TQDateTime date);
bool isRDB();
QString RDBVersion();
TQString RDBVersion();
public slots:
void slotCheckBackup();
void slotForceBackup(QValueList<Backup> backupList);
void slotRestoreBackup(Backup backup,QDateTime time);
void slotForceBackup(TQValueList<Backup> backupList);
void slotRestoreBackup(Backup backup,TQDateTime time);
signals:
void backupError(Backup backup,QString errorMessage);
void backupError(Backup backup,TQString errorMessage);
void backupSuccess(Backup backup);
private:

@ -18,10 +18,10 @@
#include "keepkded.h"
#include <qdir.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qdatetime.h>
#include <tqdir.h>
#include <tqfile.h>
#include <tqfileinfo.h>
#include <tqdatetime.h>
#include <kdebug.h>
#include <kprocess.h>
#include <krun.h>
@ -32,18 +32,18 @@
#include <klocale.h>
#include <keepsettings.h>
KeepKded::KeepKded(const QCString &name): KDEDModule(name)
KeepKded::KeepKded(const TQCString &name): KDEDModule(name)
{
m_logFilePath = locateLocal( "data", "keep/keep.log", true );
m_manager = new RDBManager();
connect( m_manager, SIGNAL(backupError(Backup,QString)), this, SLOT(slotBackupError(Backup,QString)) );
connect( m_manager, SIGNAL(backupSuccess(Backup)), this, SLOT(slotBackupSuccess(Backup)) );
connect( m_manager, TQT_SIGNAL(backupError(Backup,TQString)), this, TQT_SLOT(slotBackupError(Backup,TQString)) );
connect( m_manager, TQT_SIGNAL(backupSuccess(Backup)), this, TQT_SLOT(slotBackupSuccess(Backup)) );
slotCheckBackup();
m_timer = new QTimer(this);
connect( m_timer, SIGNAL(timeout()), this, SLOT(slotCheckBackup()) );
m_timer = new TQTimer(this);
connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckBackup()) );
m_timer->start( 1000 * 60 * 60 );
}
@ -52,11 +52,11 @@ KeepKded::~KeepKded()
delete m_manager;
}
void KeepKded::slotBackupError(Backup backup,QString errorMessage)
void KeepKded::slotBackupError(Backup backup,TQString errorMessage)
{
if ( KeepSettings::notifyBackupError() )
{
KNotifyClient::userEvent(0,i18n("<p><b>An error occured making %1 backup:</b></p><p>%2</p>").arg(backup.source()).arg(errorMessage),16,4);
KNotifyClient::userEvent(0,i18n("<p><b>An error occured making %1 backup:</b></p><p>%2</p>").tqarg(backup.source()).tqarg(errorMessage),16,4);
}
log("Backup Error",backup.source(),errorMessage);
}
@ -65,18 +65,18 @@ void KeepKded::slotBackupSuccess(Backup backup)
{
if ( KeepSettings::notifyBackupSuccess() )
{
KNotifyClient::userEvent(0,i18n("<p><b>Backup %1 successfully backuped to %2</b></p>").arg(backup.source()).arg(backup.dest()),16,1);
KNotifyClient::userEvent(0,i18n("<p><b>Backup %1 successfully backuped to %2</b></p>").tqarg(backup.source()).tqarg(backup.dest()),16,1);
}
log("Backup Success",backup.source(),"Successfully backuped to: " + backup.dest() );
}
void KeepKded::log(QString type,QString backup,QString message)
void KeepKded::log(TQString type,TQString backup,TQString message)
{
QString logMessage = QDateTime::currentDateTime().toString(Qt::ISODate) + "\t" + type + "\t" + backup + "\t" + message;
QFile file( m_logFilePath );
TQString logMessage = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate) + "\t" + type + "\t" + backup + "\t" + message;
TQFile file( m_logFilePath );
if ( file.open(IO_WriteOnly | IO_Append) )
{
QTextStream stream( &file );
TQTextStream stream( &file );
stream << logMessage << "\n";
file.close();
}
@ -90,7 +90,7 @@ void KeepKded::slotCheckBackup()
extern "C"
{
KDE_EXPORT KDEDModule *create_keep(const QCString &name)
KDE_EXPORT KDEDModule *create_keep(const TQCString &name)
{
return new KeepKded(name);
}

@ -20,29 +20,30 @@
#define _KEEPKDED_H_
#include <kdedmodule.h>
#include <qstring.h>
#include <tqstring.h>
#include "rdbmanager.h"
class KeepKded: public KDEDModule
{
Q_OBJECT
// TQ_OBJECT
K_DCOP
public:
KeepKded( const QCString &name );
KeepKded( const TQCString &name );
virtual ~KeepKded();
public slots:
void slotCheckBackup();
void slotBackupError(Backup backup, QString ErrorMessage);
void slotBackupError(Backup backup, TQString ErrorMessage);
void slotBackupSuccess(Backup backup);
private:
QTimer *m_timer;
QString m_logFilePath;
TQTimer *m_timer;
TQString m_logFilePath;
RDBManager *m_manager;
void log(QString type,QString backup,QString message);
void log(TQString type,TQString backup,TQString message);
};
#endif

Loading…
Cancel
Save