[rkward-cvs] SF.net SVN: rkward: [2060] branches/KDE4_port/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Oct 14 18:06:12 UTC 2007
Revision: 2060
http://rkward.svn.sourceforge.net/rkward/?rev=2060&view=rev
Author: tfry
Date: 2007-10-14 11:06:12 -0700 (Sun, 14 Oct 2007)
Log Message:
-----------
subdir dialogs compiles
Modified Paths:
--------------
branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp
branches/KDE4_port/rkward/dialogs/rkimportdialog.h
branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp
branches/KDE4_port/rkward/dialogs/rkreadlinedialog.h
branches/KDE4_port/rkward/plugin/rkcomponentcontext.h
branches/KDE4_port/rkward/plugin/rkcomponentmap.h
branches/KDE4_port/rkward/plugin/rkcomponentproperties.h
Modified: branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp
===================================================================
--- branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp 2007-10-14 17:32:35 UTC (rev 2059)
+++ branches/KDE4_port/rkward/dialogs/rkimportdialog.cpp 2007-10-14 18:06:12 UTC (rev 2060)
@@ -37,9 +37,11 @@
combo = new QComboBox (this);
}
-RKImportDialog::RKImportDialog (const QString &context_id, QWidget *parent) : KFileDialog (QString::null, QString::null, parent, 0, false, format_selector=new RKImportDialogFormatSelector ()) {
+RKImportDialog::RKImportDialog (const QString &context_id, QWidget *parent) : KFileDialog (KUrl (), QString (), parent, format_selector=new RKImportDialogFormatSelector ()) {
RK_TRACE (DIALOGS);
+ setModal (false);
+
context = RKComponentMap::getContext (context_id);
if (!context) {
KMessageBox::sorry (this, i18n ("No plugins defined for context '%1'").arg (context_id));
@@ -76,8 +78,8 @@
// initialize
setMode (KFile::File | KFile::ExistingOnly | KFile::LocalOnly);
setFilter (formats);
- connect (filterWidget, SIGNAL (filterChanged ()), this, SLOT (filterChanged ()));
- filterChanged ();
+ connect (this, SIGNAL (filterChanged (const QString&)), this, SLOT (filterWasChanged (const QString&)));
+ filterWasChanged (QString ());
show ();
}
@@ -85,10 +87,10 @@
RK_TRACE (DIALOGS);
}
-void RKImportDialog::filterChanged () {
+void RKImportDialog::filterWasChanged (const QString &) {
RK_TRACE (DIALOGS);
- int index = filters.findIndex (filterWidget->currentFilter ());
+ int index = filters.findIndex (filterWidget ()->currentFilter ());
if (index < 0) { // All files
format_selector->combo->setEnabled (true);
Modified: branches/KDE4_port/rkward/dialogs/rkimportdialog.h
===================================================================
--- branches/KDE4_port/rkward/dialogs/rkimportdialog.h 2007-10-14 17:32:35 UTC (rev 2059)
+++ branches/KDE4_port/rkward/dialogs/rkimportdialog.h 2007-10-14 18:06:12 UTC (rev 2060)
@@ -40,7 +40,7 @@
~RKImportDialog ();
public slots:
/** The currently selected file extension filter was changed. Update the file format selection box accordingly. */
- void filterChanged ();
+ void filterWasChanged (const QString &);
protected:
/** reimplemented to a) invoke the relevant plugin, b) trigger self-destruction of the dialog */
void accept ();
Modified: branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp
===================================================================
--- branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp 2007-10-14 17:32:35 UTC (rev 2059)
+++ branches/KDE4_port/rkward/dialogs/rkreadlinedialog.cpp 2007-10-14 18:06:12 UTC (rev 2060)
@@ -25,6 +25,7 @@
#include <qdesktopwidget.h>
#include <klocale.h>
+#include <kvbox.h>
#include "../rbackend/rcommand.h"
@@ -32,11 +33,17 @@
QRect RKReadLineDialog::stored_geom;
-RKReadLineDialog::RKReadLineDialog (QWidget *parent, const QString &caption, const QString &prompt, RCommand *command) : KDialogBase (parent, 0, true, caption, KDialogBase::Ok | KDialogBase::Cancel) {
+RKReadLineDialog::RKReadLineDialog (QWidget *parent, const QString &caption, const QString &prompt, RCommand *command) : KDialog (parent) {
RK_TRACE (DIALOGS);
RK_ASSERT (command);
- KVBox *page = makeVBoxMainWidget ();
+ setModal (true);
+ setCaption (caption);
+ setButtons (KDialog::Ok | KDialog::Cancel);
+
+ KVBox *page = new KVBox ();
+ setMainWidget (page);
+
new QLabel (caption, page);
int screen_width = qApp->desktop ()->width () - 2*marginHint() - 2*spacingHint (); // TODO is this correct on xinerama?
@@ -47,7 +54,7 @@
Q3TextEdit *output = new Q3TextEdit (page);
output->setUndoRedoEnabled (false);
- output->setTextFormat (Q3TextEdit::PlainText);
+ output->setTextFormat (Qt::PlainText);
output->setCurrentFont (QFont ("Courier"));
output->setWordWrap (Q3TextEdit::NoWrap);
output->setText (context);
@@ -55,7 +62,7 @@
int cwidth = output->contentsWidth ();
output->setMinimumWidth (screen_width < cwidth ? screen_width : cwidth);
output->scrollToBottom ();
- output->setFocusPolicy (QWidget::NoFocus);
+ output->setFocusPolicy (Qt::NoFocus);
}
QLabel *promptl = new QLabel (prompt, page);
Modified: branches/KDE4_port/rkward/dialogs/rkreadlinedialog.h
===================================================================
--- branches/KDE4_port/rkward/dialogs/rkreadlinedialog.h 2007-10-14 17:32:35 UTC (rev 2059)
+++ branches/KDE4_port/rkward/dialogs/rkreadlinedialog.h 2007-10-14 18:06:12 UTC (rev 2060)
@@ -18,7 +18,7 @@
#ifndef RKREADLINEDIALOG_H
#define RKREADLINEDIALOG_H
-#include <kdialogbase.h>
+#include <kdialog.h>
class QLineEdit;
class QWidget;
@@ -29,7 +29,7 @@
@author Thomas Friedrichsmeier
*/
-class RKReadLineDialog : public KDialogBase {
+class RKReadLineDialog : public KDialog {
public:
/** Construct and run modal RKReadLineDialog.
@param parent QWidget to center the modal dialog on (0 for application)
Modified: branches/KDE4_port/rkward/plugin/rkcomponentcontext.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentcontext.h 2007-10-14 17:32:35 UTC (rev 2059)
+++ branches/KDE4_port/rkward/plugin/rkcomponentcontext.h 2007-10-14 18:06:12 UTC (rev 2060)
@@ -49,6 +49,7 @@
QString id;
};
+class KAction;
/** An RKContextHandler can be thought of as an instance of a context. E.g. the x11 device context by itself is just an abstract description. To actually use the context for a given device, an RKContextHandler is used. The normal way to construct an instance of this class is using RKContextMap::makeContextHandler().
Modified: branches/KDE4_port/rkward/plugin/rkcomponentmap.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentmap.h 2007-10-14 17:32:35 UTC (rev 2059)
+++ branches/KDE4_port/rkward/plugin/rkcomponentmap.h 2007-10-14 18:06:12 UTC (rev 2060)
@@ -82,6 +82,8 @@
};
#include <qmap.h>
+#include <QDomDocument>
+
#include <kxmlguiclient.h>
class QDomElement;
Modified: branches/KDE4_port/rkward/plugin/rkcomponentproperties.h
===================================================================
--- branches/KDE4_port/rkward/plugin/rkcomponentproperties.h 2007-10-14 17:32:35 UTC (rev 2059)
+++ branches/KDE4_port/rkward/plugin/rkcomponentproperties.h 2007-10-14 18:06:12 UTC (rev 2060)
@@ -20,6 +20,8 @@
#include <qobject.h>
+#include <limits.h>
+
/* we need these forward declarations for now, due to cylcic includes. TODO: fix this */
class RKComponentPropertyBase;
class RKComponentPropertyBool;
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