diff options
Diffstat (limited to 'ksirc/KSProgress')
-rw-r--r-- | ksirc/KSProgress/Makefile.am | 11 | ||||
-rw-r--r-- | ksirc/KSProgress/ksprogress.cpp | 60 | ||||
-rw-r--r-- | ksirc/KSProgress/ksprogress.dlg | 167 | ||||
-rw-r--r-- | ksirc/KSProgress/ksprogress.h | 47 | ||||
-rw-r--r-- | ksirc/KSProgress/ksprogressdata.cpp | 72 | ||||
-rw-r--r-- | ksirc/KSProgress/ksprogressdata.h | 48 |
6 files changed, 405 insertions, 0 deletions
diff --git a/ksirc/KSProgress/Makefile.am b/ksirc/KSProgress/Makefile.am new file mode 100644 index 00000000..b24cc64f --- /dev/null +++ b/ksirc/KSProgress/Makefile.am @@ -0,0 +1,11 @@ +KDE_CXXFLAGS = $(USE_RTTI) $(USE_EXCEPTIONS) + +INCLUDES= $(all_includes) + +noinst_LTLIBRARIES = libksprogress.la + +libksprogress_la_SOURCES = ksprogress.cpp ksprogressdata.cpp +libksprogress_la_METASOURCES = AUTO + +noinst_HEADERS = ksprogress.h ksprogressdata.h + diff --git a/ksirc/KSProgress/ksprogress.cpp b/ksirc/KSProgress/ksprogress.cpp new file mode 100644 index 00000000..369b0742 --- /dev/null +++ b/ksirc/KSProgress/ksprogress.cpp @@ -0,0 +1,60 @@ +/********************************************************************** + + + *********************************************************************/ + +#include "ksprogress.h" + +#undef Inherited +#define Inherited ksprogressData + +KSProgress::KSProgress +( + QWidget* parent, + const char* name +) + : + Inherited( parent, name ) +{ + setCaption("KSProgress"); + id = ""; + canceled = FALSE; +} + + +void KSProgress::setID(QString _id) +{ + id = _id; +} + +void KSProgress::setRange(int minValue, int maxValue) +{ + progress->setRange(minValue, maxValue); +} + +void KSProgress::setTopText(QString text) +{ + fileName->setText(text); +} + +void KSProgress::setBotText(QString text) +{ + transferStatus->setText(text); +} + +void KSProgress::setValue(int value) +{ + progress->setValue(value); +} + +void KSProgress::cancelPressed() +{ + canceled = TRUE; + emit cancel(); + emit cancel(id); +} + +KSProgress::~KSProgress() +{ +} +#include "ksprogress.moc" diff --git a/ksirc/KSProgress/ksprogress.dlg b/ksirc/KSProgress/ksprogress.dlg new file mode 100644 index 00000000..5484c4d6 --- /dev/null +++ b/ksirc/KSProgress/ksprogress.dlg @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="UTF-8"?> +<QtArch type="Dialog" version="2.1" nested="true" > + <Dialog supertype="true" nested="true" > + <DialogCommon nested="true" > + <SourceDir >.</SourceDir> + <ClassHeader >ksprogress.h</ClassHeader> + <ClassSource >ksprogress.cpp</ClassSource> + <ClassName >KSProgress</ClassName> + <DataHeader >ksprogressdata.h</DataHeader> + <DataSource >ksprogressdata.cpp</DataSource> + <DataName >ksprogressData</DataName> + <WindowBaseClass >QFrame</WindowBaseClass> + <ClassHeader >ksprogress.h</ClassHeader> + </DialogCommon> + <WidgetLayout nested="true" > + <WidgetLayoutCommon nested="true" > + <InitialPos type="qpoint" complex="true" nested="true" > + <X type="integer">-1</X> + <Y type="integer">-1</Y> + </InitialPos> + <Size type="qsize" complex="true" nested="true" > + <Height type="integer">130</Height> + <Width type="integer">250</Width> + </Size> + <MinSize type="qsize" complex="true" nested="true" > + <Height type="integer">140</Height> + <Width type="integer">250</Width> + </MinSize> + <MaxSize type="qsize" complex="true" nested="true" > + <Height type="integer">140</Height> + <Width type="integer">250</Width> + </MaxSize> + <GridSize type="integer">10</GridSize> + </WidgetLayoutCommon> + <Widgets list="true" nested="true" > + <User nested="true" > + <UserClassHeader >kprogress.h</UserClassHeader> + <UserClassName >KProgress</UserClassName> + <DlgWidget nested="true" > + <Rect type="qrect" complex="true" nested="true" > + <Height type="integer">20</Height> + <Width type="integer">230</Width> + <X type="integer">10</X> + <Y type="integer">60</Y> + </Rect> + <Name >User_1</Name> + <Variable >progress</Variable> + <SignalConnection list="true" nested="true" > + </SignalConnection> + <MinimumSize type="qsize" complex="true" nested="true" > + <Height type="integer">10</Height> + <Width type="integer">10</Width> + </MinimumSize> + <MaximumSize type="qsize" complex="true" nested="true" > + <Height type="integer">32767</Height> + <Width type="integer">32767</Width> + </MaximumSize> + <Enabled type="boolean">true</Enabled> + <FocusPolicy >NoFocus</FocusPolicy> + <BackgroundMode >PaletteBackground</BackgroundMode> + <BackgroundOrigin >WidgetOrigin</BackgroundOrigin> + </DlgWidget> + </User> + <PushButton nested="true" > + <Button nested="true" > + <Text >&Cancel</Text> + <DlgWidget nested="true" > + <Rect type="qrect" complex="true" nested="true" > + <Height type="integer">30</Height> + <Width type="integer">100</Width> + <X type="integer">70</X> + <Y type="integer">90</Y> + </Rect> + <Name >PushButton_1</Name> + <SignalConnection list="true" nested="true" > + <Signal >[Protected] clicked --> cancelPressed ()</Signal> + </SignalConnection> + <MinimumSize type="qsize" complex="true" nested="true" > + <Height type="integer">10</Height> + <Width type="integer">10</Width> + </MinimumSize> + <MaximumSize type="qsize" complex="true" nested="true" > + <Height type="integer">32767</Height> + <Width type="integer">32767</Width> + </MaximumSize> + <Enabled type="boolean">true</Enabled> + <FocusPolicy >TabFocus</FocusPolicy> + <BackgroundMode >PaletteButton</BackgroundMode> + <BackgroundOrigin >WidgetOrigin</BackgroundOrigin> + </DlgWidget> + </Button> + </PushButton> + <Label nested="true" > + <Text >fileName</Text> + <Alignment >AlignLeft|AlignVCenter|ExpandTabs</Alignment> + <Indent type="integer">-1</Indent> + <TextFormat type="qstring">AutoText</TextFormat> + <Frame nested="true" > + <LineWidth type="integer">1</LineWidth> + <DlgWidget nested="true" > + <Rect type="qrect" complex="true" nested="true" > + <Height type="integer">20</Height> + <Width type="integer">230</Width> + <X type="integer">10</X> + <Y type="integer">10</Y> + </Rect> + <Name >Label_1</Name> + <Variable >fileName</Variable> + <SignalConnection list="true" nested="true" > + </SignalConnection> + <MinimumSize type="qsize" complex="true" nested="true" > + <Height type="integer">10</Height> + <Width type="integer">10</Width> + </MinimumSize> + <MaximumSize type="qsize" complex="true" nested="true" > + <Height type="integer">32767</Height> + <Width type="integer">32767</Width> + </MaximumSize> + <Enabled type="boolean">true</Enabled> + <FocusPolicy >NoFocus</FocusPolicy> + <BackgroundMode >PaletteBackground</BackgroundMode> + <BackgroundOrigin >WidgetOrigin</BackgroundOrigin> + </DlgWidget> + </Frame> + </Label> + <Label nested="true" > + <Text >XferStatus</Text> + <Alignment >AlignLeft|AlignVCenter|ExpandTabs</Alignment> + <Indent type="integer">-1</Indent> + <TextFormat type="qstring">AutoText</TextFormat> + <Frame nested="true" > + <LineWidth type="integer">1</LineWidth> + <DlgWidget nested="true" > + <Rect type="qrect" complex="true" nested="true" > + <Height type="integer">20</Height> + <Width type="integer">230</Width> + <X type="integer">10</X> + <Y type="integer">35</Y> + </Rect> + <Name >Label_2</Name> + <Variable >transferStatus</Variable> + <SignalConnection list="true" nested="true" > + </SignalConnection> + <MinimumSize type="qsize" complex="true" nested="true" > + <Height type="integer">10</Height> + <Width type="integer">10</Width> + </MinimumSize> + <MaximumSize type="qsize" complex="true" nested="true" > + <Height type="integer">32767</Height> + <Width type="integer">32767</Width> + </MaximumSize> + <Enabled type="boolean">true</Enabled> + <FocusPolicy >NoFocus</FocusPolicy> + <BackgroundMode >PaletteBackground</BackgroundMode> + <BackgroundOrigin >WidgetOrigin</BackgroundOrigin> + </DlgWidget> + </Frame> + </Label> + </Widgets> + <TabOrder list="true" nested="true" > + <Widget type="qstring">PushButton_1</Widget> + </TabOrder> + <Layout list="true" nested="true" > + </Layout> + </WidgetLayout> + </Dialog> +</QtArch> diff --git a/ksirc/KSProgress/ksprogress.h b/ksirc/KSProgress/ksprogress.h new file mode 100644 index 00000000..c3feb2c6 --- /dev/null +++ b/ksirc/KSProgress/ksprogress.h @@ -0,0 +1,47 @@ +/********************************************************************** + + --- Qt Architect generated file --- + + File: ksprogress.h + Last generated: Thu Dec 18 08:01:39 1997 + + *********************************************************************/ + +#ifndef KSProgress_included +#define KSProgress_included + +#include "ksprogressdata.h" + +class KSProgress : public ksprogressData +{ + Q_OBJECT + +public: + + KSProgress + ( + QWidget* parent = NULL, + const char* name = NULL + ); + + virtual ~KSProgress(); + + virtual void setID(QString); + virtual void setRange(int minValue, int maxValue); + virtual void setTopText(QString text); + virtual void setBotText(QString text); + +public slots: + virtual void setValue(int value); + virtual void cancelPressed(); + +signals: + void cancel(); + void cancel(QString); + +private: + QString id; + bool canceled; + +}; +#endif // KSProgress_included diff --git a/ksirc/KSProgress/ksprogressdata.cpp b/ksirc/KSProgress/ksprogressdata.cpp new file mode 100644 index 00000000..0feb524b --- /dev/null +++ b/ksirc/KSProgress/ksprogressdata.cpp @@ -0,0 +1,72 @@ +/********************************************************************** + + --- Qt Architect generated file --- + + File: ksprogressdata.cpp + Last generated: Thu Dec 18 09:09:53 1997 + + DO NOT EDIT!!! This file will be automatically + regenerated by qtarch. All changes will be lost. + + *********************************************************************/ + +#include "ksprogressdata.h" + +#undef Inherited +#define Inherited QFrame + +#include <kpushbutton.h> +#include <kstdguiitem.h> + +#include <klocale.h> + +ksprogressData::ksprogressData +( + QWidget* parent, + const char* name +) + : + Inherited( parent, name, 0 ) +{ + progress = new KProgress( this, "User_1" ); + progress->setGeometry( 10, 60, 230, 20 ); + progress->setMinimumSize( 10, 10 ); + progress->setMaximumSize( 32767, 32767 ); + + QPushButton* dlgedit_PushButton_1; + dlgedit_PushButton_1 = new KPushButton( KStdGuiItem::cancel(), this, "PushButton_1" ); + dlgedit_PushButton_1->setGeometry( 70, 90, 100, 30 ); + dlgedit_PushButton_1->setMinimumSize( 10, 10 ); + dlgedit_PushButton_1->setMaximumSize( 32767, 32767 ); + connect( dlgedit_PushButton_1, SIGNAL(clicked()), SLOT(cancelPressed()) ); + dlgedit_PushButton_1->setAutoRepeat( FALSE ); + + fileName = new QLabel( this, "Label_1" ); + fileName->setGeometry( 10, 10, 230, 20 ); + fileName->setMinimumSize( 10, 10 ); + fileName->setMaximumSize( 32767, 32767 ); + fileName->setText( i18n("File Name") ); + fileName->setAlignment( 289 ); + fileName->setMargin( -1 ); + + transferStatus = new QLabel( this, "Label_2" ); + transferStatus->setGeometry( 10, 35, 230, 20 ); + transferStatus->setMinimumSize( 10, 10 ); + transferStatus->setMaximumSize( 32767, 32767 ); + transferStatus->setText( i18n("Transfer Status") ); + transferStatus->setAlignment( 289 ); + transferStatus->setMargin( -1 ); + + resize( 250,130 ); + setMinimumSize( 250, 140 ); + setMaximumSize( 250, 140 ); +} + + +ksprogressData::~ksprogressData() +{ +} +void ksprogressData::cancelPressed() +{ +} +#include "ksprogressdata.moc" diff --git a/ksirc/KSProgress/ksprogressdata.h b/ksirc/KSProgress/ksprogressdata.h new file mode 100644 index 00000000..a2282baf --- /dev/null +++ b/ksirc/KSProgress/ksprogressdata.h @@ -0,0 +1,48 @@ +/********************************************************************** + + --- Qt Architect generated file --- + + File: ksprogressdata.h + Last generated: Thu Dec 18 09:09:53 1997 + + DO NOT EDIT!!! This file will be automatically + regenerated by qtarch. All changes will be lost. + + *********************************************************************/ + +#ifndef ksprogressData_included +#define ksprogressData_included + +#include <qframe.h> +#include <qlabel.h> +#include "kprogress.h" + +class ksprogressData : public QFrame +{ + Q_OBJECT + +public: + + ksprogressData + ( + QWidget* parent = NULL, + const char* name = NULL + ); + + virtual ~ksprogressData(); + +public slots: + + +protected slots: + + virtual void cancelPressed(); + +protected: + KProgress* progress; + QLabel* fileName; + QLabel* transferStatus; + +}; + +#endif // ksprogressData_included |