aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/cpaster
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@nokia.com>2009-07-13 08:32:46 +0200
committerMaurice Kalinowski <maurice.kalinowski@nokia.com>2009-07-27 20:55:19 +0200
commit3629e091c448f4a7418f3fd7dad830c5b4df8933 (patch)
tree827af3a3992b8fa2eaf8e3770ca74b4a7888d311 /src/shared/cpaster
parent6e38027b4ff72ac177f91e34f03326a92f924d77 (diff)
refactor and add support for pastebin.com
- created protocol class as basis for different paste servers - removed custom classes and replaced functionality with simple QHttp* usage - removed poster and fetcher classes copied from cpaster application. It not getting updated anyways in creator - Known issue: Listing does not update, when user changes protocol - TODO: add pastebin.ca support. Code is done already, just needs to be placed inside plugin.
Diffstat (limited to 'src/shared/cpaster')
-rw-r--r--src/shared/cpaster/cpaster.pri17
-rw-r--r--src/shared/cpaster/fetcher.cpp75
-rw-r--r--src/shared/cpaster/fetcher.h62
-rw-r--r--src/shared/cpaster/poster.cpp72
-rw-r--r--src/shared/cpaster/poster.h60
-rw-r--r--src/shared/cpaster/view.cpp181
-rw-r--r--src/shared/cpaster/view.h62
-rw-r--r--src/shared/cpaster/view.ui208
8 files changed, 4 insertions, 733 deletions
diff --git a/src/shared/cpaster/cpaster.pri b/src/shared/cpaster/cpaster.pri
index 146b9d393b..519016dd80 100644
--- a/src/shared/cpaster/cpaster.pri
+++ b/src/shared/cpaster/cpaster.pri
@@ -1,14 +1,5 @@
INCLUDEPATH += $$PWD
-
-HEADERS += $$PWD/cgi.h \
- $$PWD/fetcher.h \
- $$PWD/poster.h \
- $$PWD/splitter.h \
- $$PWD/view.h
-SOURCES += $$PWD/cgi.cpp \
- $$PWD/fetcher.cpp \
- $$PWD/poster.cpp \
- $$PWD/splitter.cpp \
- $$PWD/view.cpp
-
-FORMS += $$PWD/view.ui
+HEADERS += $$PWD/cgi.h \
+ $$PWD/splitter.h
+SOURCES += $$PWD/cgi.cpp \
+ $$PWD/splitter.cpp
diff --git a/src/shared/cpaster/fetcher.cpp b/src/shared/cpaster/fetcher.cpp
deleted file mode 100644
index 9cf2a2c65e..0000000000
--- a/src/shared/cpaster/fetcher.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** Commercial Usage
-**
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-**
-**************************************************************************/
-
-#include "fetcher.h"
-#include "cgi.h"
-
-#include <QCoreApplication>
-#include <QByteArray>
-#include <QDebug>
-
-Fetcher::Fetcher(const QString &host)
- : QHttp(host)
-{
- m_host = host;
- m_status = 0;
- m_hadError = false;
- connect(this, SIGNAL(requestFinished(int,bool)), SLOT(gotRequestFinished(int,bool)));
- connect(this, SIGNAL(readyRead(QHttpResponseHeader)), SLOT(gotReadyRead(QHttpResponseHeader)));
-}
-
-int Fetcher::fetch(const QString &url)
-{
-// qDebug("Fetcher::fetch(%s)", qPrintable(url));
- return QHttp::get(url);
-}
-
-int Fetcher::fetch(int pasteID)
-{
- return fetch("http://" + m_host + "/?format=raw&id=" + QString::number(pasteID));
-}
-
-void Fetcher::gotRequestFinished(int, bool error)
-{
- m_hadError = error;
- QCoreApplication::exit(error ? -1 : 0); // ends event-loop
-}
-
-void Fetcher::gotReadyRead(const QHttpResponseHeader & /* resp */)
-{
- m_body += QHttp::readAll();
-
- // Hackish check for No Such Paste, as codepaster doesn't send a HTTP code indicating such, or
- // sends a redirect to an url indicating failure...
- if (m_body.contains("<B>No such paste!</B>")) {
- m_body.clear();
- m_status = -1;
- m_hadError = true;
- }
-}
diff --git a/src/shared/cpaster/fetcher.h b/src/shared/cpaster/fetcher.h
deleted file mode 100644
index 46cdfc22e1..0000000000
--- a/src/shared/cpaster/fetcher.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** Commercial Usage
-**
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-**
-**************************************************************************/
-
-#ifndef FETCHER_H
-#define FETCHER_H
-
-#include <QHttp>
-#include <QHttpResponseHeader>
-#include <QString>
-
-class Fetcher : public QHttp
-{
- Q_OBJECT
-public:
- Fetcher(const QString &host);
-
- int fetch(const QString &url);
- int fetch(int pasteID);
-
- QByteArray &body() { return m_body; }
-
- int status() { return m_status; }
- bool hadError() { return m_hadError; }
-
-private slots:
- void gotRequestFinished(int id, bool error);
- void gotReadyRead(const QHttpResponseHeader &resp);
-
-private:
- QString m_host;
- int m_status;
- bool m_hadError;
- QByteArray m_body;
-};
-
-#endif // FETCHER_H
diff --git a/src/shared/cpaster/poster.cpp b/src/shared/cpaster/poster.cpp
deleted file mode 100644
index b07f769a74..0000000000
--- a/src/shared/cpaster/poster.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** Commercial Usage
-**
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-**
-**************************************************************************/
-
-#include "poster.h"
-#include "cgi.h"
-
-#include <QCoreApplication>
-#include <QByteArray>
-#include <QDebug>
-
-Poster::Poster(const QString &host)
- : QHttp(host)
-{
- m_status = 0;
- m_hadError = false;
- connect(this, SIGNAL(requestFinished(int,bool)), SLOT(gotRequestFinished(int,bool)));
- connect(this, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), SLOT(gotResponseHeaderReceived(QHttpResponseHeader)));
-}
-
-void Poster::post(const QString &description, const QString &comment,
- const QString &text, const QString &user)
-{
-
- QByteArray data = "command=processcreate&submit=submit&highlight_type=0&description=";
- data += CGI::encodeURL(description).toLatin1();
- data += "&comment=";
- data += CGI::encodeURL(comment).toLatin1();
- data += "&code=";
- data += CGI::encodeURL(text).toLatin1();
- data += "&poster=";
- data += CGI::encodeURL(user).toLatin1();
-// qDebug("POST [%s]", data.constData());
-
- QHttp::post("/", data);
-}
-
-void Poster::gotRequestFinished(int, bool error)
-{
- m_hadError = error;
- QCoreApplication::exit(error ? -1 : 0); // ends event-loop
-}
-
-void Poster::gotResponseHeaderReceived(const QHttpResponseHeader &resp)
-{
- m_url = resp.value("location");
-}
diff --git a/src/shared/cpaster/poster.h b/src/shared/cpaster/poster.h
deleted file mode 100644
index 96d138d49e..0000000000
--- a/src/shared/cpaster/poster.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** Commercial Usage
-**
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-**
-**************************************************************************/
-
-#ifndef POSTER_H
-#define POSTER_H
-
-#include <QHttp>
-#include <QHttpResponseHeader>
-#include <QString>
-
-class Poster : public QHttp
-{
- Q_OBJECT
-public:
- Poster(const QString &host);
-
- void post(const QString &description, const QString &comment,
- const QString &text, const QString &user);
-
- QString pastedUrl() { return m_url; }
- int status() { return m_status; }
- bool hadError() { return m_hadError; }
-
-private slots:
- void gotRequestFinished(int id, bool error);
- void gotResponseHeaderReceived(const QHttpResponseHeader &resp);
-
-private:
- QString m_url;
- int m_status;
- bool m_hadError;
-};
-
-#endif // POSTER_H
diff --git a/src/shared/cpaster/view.cpp b/src/shared/cpaster/view.cpp
deleted file mode 100644
index b053ce9bad..0000000000
--- a/src/shared/cpaster/view.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** Commercial Usage
-**
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-**
-**************************************************************************/
-
-#include "view.h"
-
-#include <QFontMetrics>
-#include <QPainter>
-#include <QScrollBar>
-#include <QPushButton>
-#include <QSettings>
-
-class ColumnIndicatorTextEdit : public QTextEdit
-{
-public:
- ColumnIndicatorTextEdit(QWidget *parent) : QTextEdit(parent), m_columnIndicator(0)
- {
- QFont font;
- font.setFamily(QString::fromUtf8("Courier New"));
- //font.setPointSizeF(8.0);
- setFont(font);
- setReadOnly(true);
- QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- sizePolicy.setVerticalStretch(3);
- setSizePolicy(sizePolicy);
- int cmx = 0, cmy = 0, cmw = 0, cmh = 0;
- getContentsMargins(&cmx, &cmy, &cmw, &cmh);
- m_columnIndicator = QFontMetrics(font).width('W') * 100 + cmx + 1;
- m_columnIndicatorFont.setFamily(QString::fromUtf8("Times"));
- m_columnIndicatorFont.setPointSizeF(7.0);
- }
-
- int m_columnIndicator;
- QFont m_columnIndicatorFont;
-
-protected:
- virtual void paintEvent(QPaintEvent *event);
-};
-
-void ColumnIndicatorTextEdit::paintEvent(QPaintEvent *event)
-{
- QTextEdit::paintEvent(event);
-
- QPainter p(viewport());
- p.setFont(m_columnIndicatorFont);
- p.setPen(QPen(QColor(0xa0, 0xa0, 0xa0, 0xa0)));
- p.drawLine(m_columnIndicator, 0, m_columnIndicator, viewport()->height());
- int yOffset = verticalScrollBar()->value();
- p.drawText(m_columnIndicator + 1, m_columnIndicatorFont.pointSize() - yOffset, "100");
-}
-
-// -------------------------------------------------------------------------------------------------
-
-
-View::View(QWidget *parent)
- : QDialog(parent)
-{
- m_ui.setupUi(this);
-
- // Swap out the Patch View widget with a ColumnIndicatorTextEdit, which will indicate column 100
- delete m_ui.uiPatchView;
- m_ui.uiPatchView = new ColumnIndicatorTextEdit(m_ui.groupBox);
- m_ui.vboxLayout1->addWidget(m_ui.uiPatchView);
- m_ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Paste"));
- connect(m_ui.uiPatchList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(contentChanged()));
-}
-
-View::~View()
-{
-}
-
-QString View::getUser()
-{
- const QString username = m_ui.uiUsername->text();
- if (username.isEmpty() || username == tr("<Username>"))
- return "Anonymous";
- return username;
-}
-
-QString View::getDescription()
-{
- const QString description = m_ui.uiDescription->text();
- if (description == tr("<Description>"))
- return QString();
- return description;
-}
-
-QString View::getComment()
-{
- const QString comment = m_ui.uiComment->toPlainText();
- if (comment == tr("<Comment>"))
- return QString();
- return comment;
-}
-
-QByteArray View::getContent()
-{
- QByteArray newContent;
- for (int i = 0; i < m_ui.uiPatchList->count(); ++i) {
- QListWidgetItem *item = m_ui.uiPatchList->item(i);
- if (item->checkState() != Qt::Unchecked)
- newContent += m_parts.at(i).content;
- }
- return newContent;
-}
-
-void View::contentChanged()
-{
- m_ui.uiPatchView->setPlainText(getContent());
-}
-
-int View::show(const QString &user, const QString &description, const QString &comment,
- const FileDataList &parts)
-{
- if (user.isEmpty())
- m_ui.uiUsername->setText(tr("<Username>"));
- else
- m_ui.uiUsername->setText(user);
-
- if (description.isEmpty())
- m_ui.uiDescription->setText(tr("<Description>"));
- else
- m_ui.uiDescription->setText(description);
-
- if (comment.isEmpty())
- m_ui.uiComment->setPlainText(tr("<Comment>"));
- else
- m_ui.uiComment->setPlainText(comment);
-
- QByteArray content;
- m_parts = parts;
- m_ui.uiPatchList->clear();
- foreach (const FileData part, parts) {
- QListWidgetItem *itm = new QListWidgetItem(part.filename, m_ui.uiPatchList);
- itm->setCheckState(Qt::Checked);
- itm->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
- content += part.content;
- }
- m_ui.uiPatchView->setPlainText(content);
-
- m_ui.uiDescription->setFocus();
- m_ui.uiDescription->selectAll();
-
- // (Re)store dialog size
- QSettings settings("Trolltech", "cpaster");
- int h = settings.value("/gui/height", height()).toInt();
- int w = settings.value("/gui/width",
- ((ColumnIndicatorTextEdit*)m_ui.uiPatchView)->m_columnIndicator + 50)
- .toInt();
- resize(w, h);
- int ret = QDialog::exec();
- settings.setValue("/gui/height", height());
- settings.setValue("/gui/width", width());
-
- return ret;
-}
diff --git a/src/shared/cpaster/view.h b/src/shared/cpaster/view.h
deleted file mode 100644
index b61ad7dd7e..0000000000
--- a/src/shared/cpaster/view.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** Commercial Usage
-**
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Nokia.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
-**
-**************************************************************************/
-
-#ifndef VIEW_H
-#define VIEW_H
-
-#include <QDialog>
-#include <QByteArray>
-
-#include "splitter.h"
-#include "ui_view.h"
-
-class View : public QDialog
-{
- Q_OBJECT
-public:
- View(QWidget *parent);
- ~View();
-
- int show(const QString &user, const QString &description, const QString &comment,
- const FileDataList &parts);
-
- QString getUser();
- QString getDescription();
- QString getComment();
- QByteArray getContent();
-
-private slots:
- void contentChanged();
-
-private:
- Ui::ViewDialog m_ui;
- FileDataList m_parts;
-};
-
-#endif // VIEW_H
diff --git a/src/shared/cpaster/view.ui b/src/shared/cpaster/view.ui
deleted file mode 100644
index b8ede8d1d4..0000000000
--- a/src/shared/cpaster/view.ui
+++ /dev/null
@@ -1,208 +0,0 @@
-<ui version="4.0" >
- <class>ViewDialog</class>
- <widget class="QDialog" name="ViewDialog" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>600</width>
- <height>500</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Send to Codepaster</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>&amp;Username:</string>
- </property>
- <property name="buddy" >
- <cstring>uiUsername</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="uiUsername" >
- <property name="text" >
- <string>&lt;Username></string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>&amp;Description:</string>
- </property>
- <property name="buddy" >
- <cstring>uiDescription</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="uiDescription" >
- <property name="text" >
- <string>&lt;Description></string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTextEdit" name="uiComment" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize" >
- <size>
- <width>16777215</width>
- <height>100</height>
- </size>
- </property>
- <property name="tabChangesFocus" >
- <bool>true</bool>
- </property>
- <property name="html" >
- <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
-p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&amp;lt;Comment&amp;gt;&lt;/p>&lt;/body>&lt;/html></string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title" >
- <string>Parts to send to codepaster</string>
- </property>
- <property name="flat" >
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>2</number>
- </property>
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <item>
- <widget class="QListWidget" name="uiPatchList" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>1</verstretch>
- </sizepolicy>
- </property>
- <property name="uniformItemSizes" >
- <bool>true</bool>
- </property>
- <item>
- <property name="text" >
- <string>Patch 1</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Patch 2</string>
- </property>
- </item>
- </widget>
- </item>
- <item>
- <widget class="QTextEdit" name="uiPatchView" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>3</verstretch>
- </sizepolicy>
- </property>
- <property name="font" >
- <font>
- <family>Courier New</family>
- </font>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <tabstops>
- <tabstop>uiUsername</tabstop>
- <tabstop>uiDescription</tabstop>
- <tabstop>uiComment</tabstop>
- <tabstop>buttonBox</tabstop>
- <tabstop>uiPatchList</tabstop>
- <tabstop>uiPatchView</tabstop>
- </tabstops>
- <resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>ViewDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel" >
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>ViewDialog</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel" >
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>