[rkward-cvs] SF.net SVN: rkward: [2233] branches/KDE4_port/rkward/misc

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Nov 18 16:28:06 UTC 2007


Revision: 2233
          http://rkward.svn.sourceforge.net/rkward/?rev=2233&view=rev
Author:   tfry
Date:     2007-11-18 08:28:05 -0800 (Sun, 18 Nov 2007)

Log Message:
-----------
Remove obsolete RKCancelDialog

Modified Paths:
--------------
    branches/KDE4_port/rkward/misc/CMakeLists.txt

Removed Paths:
-------------
    branches/KDE4_port/rkward/misc/rkcanceldialog.cpp
    branches/KDE4_port/rkward/misc/rkcanceldialog.h

Modified: branches/KDE4_port/rkward/misc/CMakeLists.txt
===================================================================
--- branches/KDE4_port/rkward/misc/CMakeLists.txt	2007-11-18 16:05:27 UTC (rev 2232)
+++ branches/KDE4_port/rkward/misc/CMakeLists.txt	2007-11-18 16:28:05 UTC (rev 2233)
@@ -7,7 +7,6 @@
    rkspinbox.cpp
    getfilenamewidget.cpp
    rkobjectlistview.cpp
-   rkcanceldialog.cpp
    xmlhelper.cpp
    multistringselector.cpp
    rkcommonfunctions.cpp

Deleted: branches/KDE4_port/rkward/misc/rkcanceldialog.cpp
===================================================================
--- branches/KDE4_port/rkward/misc/rkcanceldialog.cpp	2007-11-18 16:05:27 UTC (rev 2232)
+++ branches/KDE4_port/rkward/misc/rkcanceldialog.cpp	2007-11-18 16:28:05 UTC (rev 2233)
@@ -1,88 +0,0 @@
-/***************************************************************************
-                          rkcanceldialog  -  description
-                             -------------------
-    begin                : Wed Sep 8 2004
-    copyright            : (C) 2004 by Thomas Friedrichsmeier
-    email                : tfry at users.sourceforge.net
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-#include "rkcanceldialog.h"
-
-#if 0
-
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <QVBoxLayout>
-#include <QCloseEvent>
-
-#include <klocale.h>
-#include <kdialog.h>
-
-#include "../rkglobals.h"
-#include "../rbackend/rinterface.h"
-
-#include "../debug.h"
-
-RKCancelDialog::RKCancelDialog (const QString &caption, const QString &text, QWidget *parent, RCommand *associated_command) : QDialog (parent, 0, true) {
-	RK_TRACE (DIALOGS);
-	setCaption (caption);
-	
-	QVBoxLayout *layout = new QVBoxLayout (this);
-	QLabel *label = new QLabel (text, this);
-	label->setWordWrap (true);
-	layout->addWidget (label);
-	
-	QPushButton *cancel_button = new QPushButton (i18n ("Cancel"), this);
-	connect (cancel_button, SIGNAL (clicked ()), this, SLOT (reject ()));
-	cancel_button->setFixedWidth (cancel_button->sizeHint ().width ());
-	layout->addWidget (cancel_button, 0, Qt::AlignHCenter);
-	
-	resize (sizeHint ().expandedTo (QSize (300, 80)));
-	
-	command = associated_command;
-}
-
-RKCancelDialog::~RKCancelDialog () {
-	RK_TRACE (DIALOGS);
-}
-
-//static
-int RKCancelDialog::showCancelDialog (const QString &caption, const QString &text, QWidget *parent, QObject *done_sender, const char *done_signal, RCommand *associated_command) {
-	RK_TRACE (DIALOGS);
-	RKCancelDialog *dialog = new RKCancelDialog (caption, text, parent, associated_command);
-	connect (done_sender, done_signal, dialog, SLOT (completed ()));
-	
-	int res = dialog->exec ();
-	RK_ASSERT ((res == QDialog::Accepted) || (res == QDialog::Rejected));
-	
-	delete dialog;
-	return res;
-}
-
-void RKCancelDialog::closeEvent (QCloseEvent *e) {
-	RK_TRACE (DIALOGS);
-	e->ignore ();
-}
-
-void RKCancelDialog::completed () {
-	RK_TRACE (DIALOGS);
-	accept ();
-}
-
-void RKCancelDialog::reject () {
-	RK_TRACE (DIALOGS);
-	if (command) RKGlobals::rInterface ()->cancelCommand (command);
-	QDialog::reject ();
-}
-
-#include "rkcanceldialog.moc"
-#endif

Deleted: branches/KDE4_port/rkward/misc/rkcanceldialog.h
===================================================================
--- branches/KDE4_port/rkward/misc/rkcanceldialog.h	2007-11-18 16:05:27 UTC (rev 2232)
+++ branches/KDE4_port/rkward/misc/rkcanceldialog.h	2007-11-18 16:28:05 UTC (rev 2233)
@@ -1,53 +0,0 @@
-/***************************************************************************
-                          rkcanceldialog  -  description
-                             -------------------
-    begin                : Wed Sep 8 2004
-    copyright            : (C) 2004 by Thomas Friedrichsmeier
-    email                : tfry at users.sourceforge.net
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-#ifndef RKCANCELDIALOG_H
-#define RKCANCELDIALOG_H
-
-#warning TODO: remove
-#if 0
-
-#include <qdialog.h>
-
-class QCloseEvent;
-class RCommand;
-
-/**
-A simple modal dialog which can be shown during a lengthy operation (which has to be carried out synchronously) and allows the user to cancel said operation. Connect a signal to the complete ()-slot to signal the operation is done. Returns QDialog::Accepted if successful or QDialog::rejected, if the user pressed cancel before the operation was completed.
-If you specify an associated_commands in the constructor, RKCanceldialog, if cancelled, will also take care of canceling that RCommand.
-Use the static member showCancelDialog () to make it a single-liner.
- at author Thomas Friedrichsmeier
-*/
-class RKCancelDialog : public QDialog {
-Q_OBJECT
-public:
-	RKCancelDialog (const QString &caption, const QString &text, QWidget *parent, RCommand *associated_command=0);
-	~RKCancelDialog();
-	
-	// returns either QDialog::Accepted or QDialog::Rejected
-	static int showCancelDialog (const QString &caption, const QString &text, QWidget *parent, QObject *done_sender, const char *done_signal, RCommand *associated_command=0);
-public slots:
-	void completed ();
-protected:
-	void closeEvent (QCloseEvent *e);
-private:
-	RCommand *command;
-protected slots:
-	virtual void reject ();
-};
-
-#endif
-#endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list