[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk/kioslave/svn/svnhelper
From: Laurent Montel <montel () kde ! org>
Date: 2008-07-10 6:49:01
Message-ID: 1215672541.708451.5202.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 830332 by mlaurent:
Better integration with KDE
M +27 -10 kio_svn_helper.cpp
M +16 -2 kio_svn_helper.h
M +85 -169 subversioncheckout.ui
--- trunk/KDE/kdesdk/kioslave/svn/svnhelper/kio_svn_helper.cpp #830331:830332
@@ -29,6 +29,7 @@
#include <kio/netaccess.h>
#include <kio/jobuidelegate.h>
#include <qpixmap.h>
+#include <KVBox>
#include "kio_svn_helper.h"
#include <kurlrequester.h>
@@ -39,14 +40,30 @@
#include <kstandarddirs.h>
#include <qtextcodec.h>
-SubversionCheckout::SubversionCheckout(QWidget *parent )
-: QDialog(parent)
+
+SubversionCheckoutDialog::SubversionCheckoutDialog( QWidget* parent)
+ : KDialog( parent )
{
- setupUi( this );
- connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
+ setCaption( i18n( "Address Selection" ) );
+ setButtons( Ok|Cancel );
+ setDefaultButton( Ok );
+ setModal( true );
+ KVBox *page = new KVBox( this );
+ setMainWidget( page );
+ m_checkoutWidget = new SubversionCheckout( page );
}
+int SubversionCheckoutDialog::revisionValue() const
+{
+ return m_checkoutWidget->revision->value();
+}
+
+KUrl SubversionCheckoutDialog::url() const
+{
+ return m_checkoutWidget->url->url();
+}
+
+
SubversionSwitch::SubversionSwitch(QWidget *parent )
: QDialog(parent)
{
@@ -222,7 +239,7 @@
KIO::NetAccess::synchronousRun( job, 0 );
} else if (args->isSet("C")) {
kDebug(7128) << "checkout " << list;
- SubversionCheckout d;
+ SubversionCheckoutDialog d;
int result = d.exec();
if ( result == QDialog::Accepted ) {
for ( QList<KUrl>::const_iterator it = list.begin(); it != list.end() ; ++it ) {
@@ -232,16 +249,16 @@
int cmd = 1;
int rev = -1;
QString revkind = "HEAD";
- if ( d.revision->value() != 0 ) {
- rev = d.revision->value();
+ if ( d.revisionValue() != 0 ) {
+ rev = d.revisionValue();
revkind = "";
}
s<<cmd;
- s << KUrl( d.url->url() );
+ s << d.url();
s << ( *it );
s << rev;
s << revkind;
- kDebug(7128) << "checkouting : " << d.url->url() << " into " << \
(*it).prettyUrl() << " at rev : " << rev << " or " << revkind; + kDebug(7128) << \
"checkouting : " << d.url() << " into " << (*it).prettyUrl() << " at rev : " << rev \
<< " or " << revkind; KIO::SimpleJob * job = KIO::special(servURL, parms);
connect( job, SIGNAL( result( KJob * ) ), this, SLOT( slotResult( KJob * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
--- trunk/KDE/kdesdk/kioslave/svn/svnhelper/kio_svn_helper.h #830331:830332
@@ -28,10 +28,12 @@
#include "ui_subversionswitch.h"
#include "ui_subversiondiff.h"
-class SubversionCheckout : public QDialog, public Ui::SubversionCheckout
+class SubversionCheckout : public QWidget, public Ui::SubversionCheckout
{
public:
- SubversionCheckout( QWidget *parent = 0);
+ SubversionCheckout( QWidget *parent = 0) : QWidget( parent ) {
+ setupUi( this );
+ }
};
class SubversionSwitch : public QDialog, public Ui::SubversionSwitch
@@ -47,6 +49,18 @@
};
+class SubversionCheckoutDialog : public KDialog
+{
+ Q_OBJECT
+public:
+ SubversionCheckoutDialog( QWidget *parent = 0 );
+ int revisionValue() const;
+ KUrl url() const;
+private:
+ SubversionCheckout *m_checkoutWidget;
+};
+
+
class SvnHelper:public KApplication {
Q_OBJECT
--- trunk/KDE/kdesdk/kioslave/svn/svnhelper/subversioncheckout.ui #830331:830332
@@ -1,171 +1,87 @@
-<ui version="4.0" stdsetdef="1" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>SubversionCheckout</class>
- <widget class="QDialog" name="SubversionCheckout" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>498</width>
- <height>133</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle" >
- <string>Subversion Checkout</string>
- </property>
- <property name="sizeGripEnabled" >
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QPushButton" name="buttonHelp" >
- <property name="text" >
- <string>&Help</string>
- </property>
- <property name="shortcut" >
- <string>F1</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="Horizontal Spacing2" >
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- <property name="sizeType" >
- <enum>Expanding</enum>
- </property>
- <property name="orientation" >
- <enum>Horizontal</enum>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="buttonOk" >
- <property name="text" >
- <string>&OK</string>
- </property>
- <property name="shortcut" >
- <string/>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- <property name="default" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonCancel" >
- <property name="text" >
- <string>&Cancel</string>
- </property>
- <property name="shortcut" >
- <string/>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="0" column="0" >
- <widget class="KUrlRequester" name="url" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="textLabel1" >
- <property name="text" >
- <string>Revision (0 for HEAD):</string>
- </property>
- <property name="wordWrap" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="spacer2" >
- <property name="sizeHint" >
- <size>
- <width>121</width>
- <height>20</height>
- </size>
- </property>
- <property name="sizeType" >
- <enum>Expanding</enum>
- </property>
- <property name="orientation" >
- <enum>Horizontal</enum>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QSpinBox" name="revision" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>3</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
+<ui version="4.0" >
+ <class>SubversionCheckout</class>
+ <widget class="QWidget" name="SubversionCheckout" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>445</width>
+ <height>118</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="KUrlRequester" name="url" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <layout class="QHBoxLayout" name="_3" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="textLabel1" >
+ <property name="text" >
+ <string>Revision (0 for HEAD):</string>
+ </property>
+ <property name="wordWrap" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="spacer2" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>121</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="revision" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
- </widget>
- <layoutdefault spacing="6" margin="11" />
- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
- <includes>
- <include location="local" >kurlrequester.h</include>
- <include location="local" >klineedit.h</include>
- <include location="local" >kpushbutton.h</include>
- </includes>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>KUrlRequester</class>
+ <extends>QFrame</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
</ui>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic