forked from qt-creator/qt-creator
CPaster: Inline pasteview.ui
Change-Id: Ib09de9def992f9d564eaf6398627f2b5633dd629 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -20,7 +20,7 @@ add_qtc_plugin(CodePaster
|
|||||||
pastebindotcomsettings.ui
|
pastebindotcomsettings.ui
|
||||||
pasteselect.ui
|
pasteselect.ui
|
||||||
pasteselectdialog.cpp pasteselectdialog.h
|
pasteselectdialog.cpp pasteselectdialog.h
|
||||||
pasteview.cpp pasteview.h pasteview.ui
|
pasteview.cpp pasteview.h
|
||||||
protocol.cpp protocol.h
|
protocol.cpp protocol.h
|
||||||
settings.cpp settings.h
|
settings.cpp settings.h
|
||||||
stickynotespasteprotocol.cpp stickynotespasteprotocol.h
|
stickynotespasteprotocol.cpp stickynotespasteprotocol.h
|
||||||
|
|||||||
@@ -30,8 +30,7 @@
|
|||||||
|
|
||||||
namespace CodePaster {
|
namespace CodePaster {
|
||||||
|
|
||||||
ColumnIndicatorTextEdit::ColumnIndicatorTextEdit(QWidget *parent) :
|
ColumnIndicatorTextEdit::ColumnIndicatorTextEdit()
|
||||||
QTextEdit(parent)
|
|
||||||
{
|
{
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setFamily(QLatin1String("Courier New"));
|
font.setFamily(QLatin1String("Courier New"));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace CodePaster {
|
|||||||
class ColumnIndicatorTextEdit : public QTextEdit
|
class ColumnIndicatorTextEdit : public QTextEdit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ColumnIndicatorTextEdit(QWidget *parent);
|
ColumnIndicatorTextEdit();
|
||||||
|
|
||||||
int columnIndicator() const { return m_columnIndicator; }
|
int columnIndicator() const { return m_columnIndicator; }
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ QtcPlugin {
|
|||||||
"pasteselectdialog.h",
|
"pasteselectdialog.h",
|
||||||
"pasteview.cpp",
|
"pasteview.cpp",
|
||||||
"pasteview.h",
|
"pasteview.h",
|
||||||
"pasteview.ui",
|
|
||||||
"protocol.cpp",
|
"protocol.cpp",
|
||||||
"protocol.h",
|
"protocol.h",
|
||||||
"settings.cpp",
|
"settings.cpp",
|
||||||
|
|||||||
@@ -24,20 +24,36 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "pasteview.h"
|
#include "pasteview.h"
|
||||||
|
|
||||||
|
#include "columnindicatortextedit.h"
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QListWidget>
|
||||||
|
#include <QPlainTextEdit>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QSpinBox>
|
||||||
|
#include <QStackedWidget>
|
||||||
|
#include <QTextEdit>
|
||||||
|
|
||||||
static const char groupC[] = "CPaster";
|
const char groupC[] = "CPaster";
|
||||||
static const char heightKeyC[] = "PasteViewHeight";
|
const char heightKeyC[] = "PasteViewHeight";
|
||||||
static const char widthKeyC[] = "PasteViewWidth";
|
const char widthKeyC[] = "PasteViewWidth";
|
||||||
|
|
||||||
namespace CodePaster {
|
namespace CodePaster {
|
||||||
// -------------------------------------------------------------------------------------------------
|
|
||||||
PasteView::PasteView(const QList<Protocol *> &protocols,
|
PasteView::PasteView(const QList<Protocol *> &protocols,
|
||||||
const QString &mt,
|
const QString &mt,
|
||||||
QWidget *parent) :
|
QWidget *parent) :
|
||||||
@@ -46,21 +62,93 @@ PasteView::PasteView(const QList<Protocol *> &protocols,
|
|||||||
m_commentPlaceHolder(tr("<Comment>")),
|
m_commentPlaceHolder(tr("<Comment>")),
|
||||||
m_mimeType(mt)
|
m_mimeType(mt)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
resize(670, 678);
|
||||||
|
setWindowTitle(tr("Send to Codepaster"));
|
||||||
|
|
||||||
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Paste"));
|
m_protocolBox = new QComboBox;
|
||||||
connect(m_ui.uiPatchList, &QListWidget::itemChanged, this, &PasteView::contentChanged);
|
for (const Protocol *p : protocols)
|
||||||
|
m_protocolBox->addItem(p->name());
|
||||||
|
|
||||||
foreach (const Protocol *p, protocols)
|
m_expirySpinBox = new QSpinBox;
|
||||||
m_ui.protocolBox->addItem(p->name());
|
m_expirySpinBox->setSuffix(tr(" Days"));
|
||||||
connect(m_ui.protocolBox, &QComboBox::currentIndexChanged, this, &PasteView::protocolChanged);
|
m_expirySpinBox->setRange(1, 365);
|
||||||
|
|
||||||
|
m_uiUsername = new QLineEdit(this);
|
||||||
|
m_uiUsername->setPlaceholderText(tr("<Username>"));
|
||||||
|
|
||||||
|
m_uiDescription = new QLineEdit(this);
|
||||||
|
m_uiDescription->setPlaceholderText(tr("<Description>"));
|
||||||
|
|
||||||
|
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
m_uiComment = new QTextEdit(this);
|
||||||
|
m_uiComment->setSizePolicy(sizePolicy);
|
||||||
|
m_uiComment->setMaximumHeight(100);
|
||||||
|
m_uiComment->setTabChangesFocus(true);
|
||||||
|
|
||||||
|
m_uiPatchList = new QListWidget;
|
||||||
|
sizePolicy.setVerticalStretch(1);
|
||||||
|
m_uiPatchList->setSizePolicy(sizePolicy);
|
||||||
|
m_uiPatchList->setUniformItemSizes(true);
|
||||||
|
|
||||||
|
m_uiPatchView = new CodePaster::ColumnIndicatorTextEdit;
|
||||||
|
sizePolicy.setVerticalStretch(3);
|
||||||
|
m_uiPatchView->setSizePolicy(sizePolicy);
|
||||||
|
|
||||||
|
QFont font;
|
||||||
|
font.setFamilies({"Courier New"});
|
||||||
|
m_uiPatchView->setFont(font);
|
||||||
|
m_uiPatchView->setReadOnly(true);
|
||||||
|
|
||||||
|
auto groupBox = new QGroupBox(tr("Parts to Send to Server"));
|
||||||
|
groupBox->setFlat(true);
|
||||||
|
|
||||||
|
m_plainTextEdit = new QPlainTextEdit;
|
||||||
|
|
||||||
|
m_stackedWidget = new QStackedWidget(this);
|
||||||
|
m_stackedWidget->addWidget(groupBox);
|
||||||
|
m_stackedWidget->addWidget(m_plainTextEdit);
|
||||||
|
m_stackedWidget->setCurrentIndex(0);
|
||||||
|
|
||||||
|
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
|
||||||
|
buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Paste"));
|
||||||
|
|
||||||
|
const bool __sortingEnabled = m_uiPatchList->isSortingEnabled();
|
||||||
|
m_uiPatchList->setSortingEnabled(false);
|
||||||
|
m_uiPatchList->setSortingEnabled(__sortingEnabled);
|
||||||
|
|
||||||
|
using namespace Utils::Layouting;
|
||||||
|
|
||||||
|
Column {
|
||||||
|
m_uiPatchList,
|
||||||
|
m_uiPatchView
|
||||||
|
}.attachTo(groupBox);
|
||||||
|
|
||||||
|
Column {
|
||||||
|
Form {
|
||||||
|
tr("Protocol:"), m_protocolBox, br,
|
||||||
|
tr("&Expires after:"), m_expirySpinBox, br,
|
||||||
|
tr("&Username:"), m_uiUsername, br,
|
||||||
|
tr("&Description:"), m_uiDescription,
|
||||||
|
},
|
||||||
|
m_uiComment,
|
||||||
|
m_stackedWidget,
|
||||||
|
buttonBox
|
||||||
|
}.setSpacing(2).attachTo(this);
|
||||||
|
|
||||||
|
connect(m_uiPatchList, &QListWidget::itemChanged, this, &PasteView::contentChanged);
|
||||||
|
|
||||||
|
connect(m_protocolBox, &QComboBox::currentIndexChanged, this, &PasteView::protocolChanged);
|
||||||
|
|
||||||
|
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||||
|
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||||
}
|
}
|
||||||
|
|
||||||
PasteView::~PasteView() = default;
|
PasteView::~PasteView() = default;
|
||||||
|
|
||||||
QString PasteView::user() const
|
QString PasteView::user() const
|
||||||
{
|
{
|
||||||
const QString username = m_ui.uiUsername->text();
|
const QString username = m_uiUsername->text();
|
||||||
if (username.isEmpty())
|
if (username.isEmpty())
|
||||||
return QLatin1String("Anonymous");
|
return QLatin1String("Anonymous");
|
||||||
return username;
|
return username;
|
||||||
@@ -68,12 +156,12 @@ QString PasteView::user() const
|
|||||||
|
|
||||||
QString PasteView::description() const
|
QString PasteView::description() const
|
||||||
{
|
{
|
||||||
return m_ui.uiDescription->text();
|
return m_uiDescription->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PasteView::comment() const
|
QString PasteView::comment() const
|
||||||
{
|
{
|
||||||
const QString comment = m_ui.uiComment->toPlainText();
|
const QString comment = m_uiComment->toPlainText();
|
||||||
if (comment == m_commentPlaceHolder)
|
if (comment == m_commentPlaceHolder)
|
||||||
return QString();
|
return QString();
|
||||||
return comment;
|
return comment;
|
||||||
@@ -82,11 +170,11 @@ QString PasteView::comment() const
|
|||||||
QString PasteView::content() const
|
QString PasteView::content() const
|
||||||
{
|
{
|
||||||
if (m_mode == PlainTextMode)
|
if (m_mode == PlainTextMode)
|
||||||
return m_ui.plainTextEdit->toPlainText();
|
return m_plainTextEdit->toPlainText();
|
||||||
|
|
||||||
QString newContent;
|
QString newContent;
|
||||||
for (int i = 0; i < m_ui.uiPatchList->count(); ++i) {
|
for (int i = 0; i < m_uiPatchList->count(); ++i) {
|
||||||
QListWidgetItem *item = m_ui.uiPatchList->item(i);
|
QListWidgetItem *item = m_uiPatchList->item(i);
|
||||||
if (item->checkState() != Qt::Unchecked)
|
if (item->checkState() != Qt::Unchecked)
|
||||||
newContent += m_parts.at(i).content;
|
newContent += m_parts.at(i).content;
|
||||||
}
|
}
|
||||||
@@ -95,46 +183,45 @@ QString PasteView::content() const
|
|||||||
|
|
||||||
int PasteView::protocol() const
|
int PasteView::protocol() const
|
||||||
{
|
{
|
||||||
return m_ui.protocolBox->currentIndex();
|
return m_protocolBox->currentIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasteView::contentChanged()
|
void PasteView::contentChanged()
|
||||||
{
|
{
|
||||||
m_ui.uiPatchView->setPlainText(content());
|
m_uiPatchView->setPlainText(content());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasteView::protocolChanged(int p)
|
void PasteView::protocolChanged(int p)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(p >= 0 && p < m_protocols.size(), return);
|
QTC_ASSERT(p >= 0 && p < m_protocols.size(), return);
|
||||||
const unsigned caps = m_protocols.at(p)->capabilities();
|
const unsigned caps = m_protocols.at(p)->capabilities();
|
||||||
m_ui.uiDescription->setEnabled(caps & Protocol::PostDescriptionCapability);
|
m_uiDescription->setEnabled(caps & Protocol::PostDescriptionCapability);
|
||||||
m_ui.uiUsername->setEnabled(caps & Protocol::PostUserNameCapability);
|
m_uiUsername->setEnabled(caps & Protocol::PostUserNameCapability);
|
||||||
m_ui.uiComment->setEnabled(caps & Protocol::PostCommentCapability);
|
m_uiComment->setEnabled(caps & Protocol::PostCommentCapability);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasteView::setupDialog(const QString &user, const QString &description, const QString &comment)
|
void PasteView::setupDialog(const QString &user, const QString &description, const QString &comment)
|
||||||
{
|
{
|
||||||
m_ui.uiUsername->setText(user);
|
m_uiUsername->setText(user);
|
||||||
m_ui.uiDescription->setText(description);
|
m_uiDescription->setText(description);
|
||||||
m_ui.uiComment->setPlainText(comment.isEmpty() ? m_commentPlaceHolder : comment);
|
m_uiComment->setPlainText(comment.isEmpty() ? m_commentPlaceHolder : comment);
|
||||||
}
|
}
|
||||||
|
|
||||||
int PasteView::showDialog()
|
int PasteView::showDialog()
|
||||||
{
|
{
|
||||||
m_ui.uiDescription->setFocus();
|
m_uiDescription->setFocus();
|
||||||
m_ui.uiDescription->selectAll();
|
m_uiDescription->selectAll();
|
||||||
|
|
||||||
// (Re)store dialog size
|
// (Re)store dialog size
|
||||||
const QSettings *settings = Core::ICore::settings();
|
const QSettings *settings = Core::ICore::settings();
|
||||||
const QString rootKey = QLatin1String(groupC) + QLatin1Char('/');
|
const QString rootKey = QLatin1String(groupC) + QLatin1Char('/');
|
||||||
const int h = settings->value(rootKey + QLatin1String(heightKeyC), height()).toInt();
|
const int h = settings->value(rootKey + QLatin1String(heightKeyC), height()).toInt();
|
||||||
const int defaultWidth = m_ui.uiPatchView->columnIndicator() + 50;
|
const int defaultWidth = m_uiPatchView->columnIndicator() + 50;
|
||||||
const int w = settings->value(rootKey + QLatin1String(widthKeyC), defaultWidth).toInt();
|
const int w = settings->value(rootKey + QLatin1String(widthKeyC), defaultWidth).toInt();
|
||||||
|
|
||||||
resize(w, h);
|
resize(w, h);
|
||||||
|
|
||||||
const int ret = QDialog::exec();
|
return QDialog::exec();
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show up with checkable list of diff chunks.
|
// Show up with checkable list of diff chunks.
|
||||||
@@ -143,22 +230,21 @@ int PasteView::show(
|
|||||||
const QString &description,
|
const QString &description,
|
||||||
const QString &comment,
|
const QString &comment,
|
||||||
int expiryDays,
|
int expiryDays,
|
||||||
const FileDataList &parts
|
const FileDataList &parts)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
setupDialog(user, description, comment);
|
setupDialog(user, description, comment);
|
||||||
m_ui.uiPatchList->clear();
|
m_uiPatchList->clear();
|
||||||
m_parts = parts;
|
m_parts = parts;
|
||||||
m_mode = DiffChunkMode;
|
m_mode = DiffChunkMode;
|
||||||
QString content;
|
QString content;
|
||||||
foreach (const FileData &part, parts) {
|
for (const FileData &part : parts) {
|
||||||
auto itm = new QListWidgetItem(part.filename, m_ui.uiPatchList);
|
auto itm = new QListWidgetItem(part.filename, m_uiPatchList);
|
||||||
itm->setCheckState(Qt::Checked);
|
itm->setCheckState(Qt::Checked);
|
||||||
itm->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
itm->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||||
content += part.content;
|
content += part.content;
|
||||||
}
|
}
|
||||||
m_ui.stackedWidget->setCurrentIndex(0);
|
m_stackedWidget->setCurrentIndex(0);
|
||||||
m_ui.uiPatchView->setPlainText(content);
|
m_uiPatchView->setPlainText(content);
|
||||||
setExpiryDays(expiryDays);
|
setExpiryDays(expiryDays);
|
||||||
return showDialog();
|
return showDialog();
|
||||||
}
|
}
|
||||||
@@ -169,25 +255,25 @@ int PasteView::show(const QString &user, const QString &description,
|
|||||||
{
|
{
|
||||||
setupDialog(user, description, comment);
|
setupDialog(user, description, comment);
|
||||||
m_mode = PlainTextMode;
|
m_mode = PlainTextMode;
|
||||||
m_ui.stackedWidget->setCurrentIndex(1);
|
m_stackedWidget->setCurrentIndex(1);
|
||||||
m_ui.plainTextEdit->setPlainText(content);
|
m_plainTextEdit->setPlainText(content);
|
||||||
setExpiryDays(expiryDays);
|
setExpiryDays(expiryDays);
|
||||||
return showDialog();
|
return showDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasteView::setExpiryDays(int d)
|
void PasteView::setExpiryDays(int d)
|
||||||
{
|
{
|
||||||
m_ui.expirySpinBox->setValue(d);
|
m_expirySpinBox->setValue(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
int PasteView::expiryDays() const
|
int PasteView::expiryDays() const
|
||||||
{
|
{
|
||||||
return m_ui.expirySpinBox->value();
|
return m_expirySpinBox->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasteView::accept()
|
void PasteView::accept()
|
||||||
{
|
{
|
||||||
const int index = m_ui.protocolBox->currentIndex();
|
const int index = m_protocolBox->currentIndex();
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -213,14 +299,14 @@ void PasteView::accept()
|
|||||||
|
|
||||||
void PasteView::setProtocol(const QString &protocol)
|
void PasteView::setProtocol(const QString &protocol)
|
||||||
{
|
{
|
||||||
const int index = m_ui.protocolBox->findText(protocol);
|
const int index = m_protocolBox->findText(protocol);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
return;
|
return;
|
||||||
m_ui.protocolBox->setCurrentIndex(index);
|
m_protocolBox->setCurrentIndex(index);
|
||||||
if (index == m_ui.protocolBox->currentIndex())
|
if (index == m_protocolBox->currentIndex())
|
||||||
protocolChanged(index); // Force enabling
|
protocolChanged(index); // Force enabling
|
||||||
else
|
else
|
||||||
m_ui.protocolBox->setCurrentIndex(index);
|
m_protocolBox->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace CodePaster
|
} // CodePaster
|
||||||
|
|||||||
@@ -25,17 +25,29 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ui_pasteview.h"
|
|
||||||
|
|
||||||
#include <splitter.h>
|
#include <splitter.h>
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QComboBox;
|
||||||
|
class QLineEdit;
|
||||||
|
class QListWidget;
|
||||||
|
class QPlainTextEdit;
|
||||||
|
class QSpinBox;
|
||||||
|
class QStackedWidget;
|
||||||
|
class QTextEdit;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace CodePaster {
|
namespace CodePaster {
|
||||||
|
|
||||||
|
class ColumnIndicatorTextEdit;
|
||||||
class Protocol;
|
class Protocol;
|
||||||
|
|
||||||
class PasteView : public QDialog
|
class PasteView : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Mode
|
enum Mode
|
||||||
{
|
{
|
||||||
@@ -80,7 +92,15 @@ private:
|
|||||||
const QString m_commentPlaceHolder;
|
const QString m_commentPlaceHolder;
|
||||||
const QString m_mimeType;
|
const QString m_mimeType;
|
||||||
|
|
||||||
Internal::Ui::ViewDialog m_ui;
|
QComboBox *m_protocolBox;
|
||||||
|
QSpinBox *m_expirySpinBox;
|
||||||
|
QLineEdit *m_uiUsername;
|
||||||
|
QLineEdit *m_uiDescription;
|
||||||
|
QTextEdit *m_uiComment;
|
||||||
|
QStackedWidget *m_stackedWidget;
|
||||||
|
QListWidget *m_uiPatchList;
|
||||||
|
ColumnIndicatorTextEdit *m_uiPatchView;
|
||||||
|
QPlainTextEdit *m_plainTextEdit;
|
||||||
FileDataList m_parts;
|
FileDataList m_parts;
|
||||||
Mode m_mode = DiffChunkMode;
|
Mode m_mode = DiffChunkMode;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,294 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>CodePaster::Internal::ViewDialog</class>
|
|
||||||
<widget class="QDialog" name="CodePaster::Internal::ViewDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>670</width>
|
|
||||||
<height>678</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Send to Codepaster</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="protocolLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Protocol:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="protocolBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="expiryLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Expires after:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>expirySpinBox</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="expirySpinBox">
|
|
||||||
<property name="suffix">
|
|
||||||
<string> Days</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>365</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="userLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Username:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>uiUsername</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="uiUsername">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string><Username></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="descriptionLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Description:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>uiDescription</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="uiDescription">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string><Description></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextEdit" name="uiComment">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
|
||||||
<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><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;Comment&gt;</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QStackedWidget" name="stackedWidget">
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="diffChunkPage">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<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="QGroupBox" name="groupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Parts to Send to Server</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 hsizetype="Expanding" vsizetype="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="CodePaster::ColumnIndicatorTextEdit" name="uiPatchView">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="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>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="plainTextPage">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<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="QPlainTextEdit" name="plainTextEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>CodePaster::ColumnIndicatorTextEdit</class>
|
|
||||||
<extends>QTextEdit</extends>
|
|
||||||
<header location="global">cpaster/columnindicatortextedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>protocolBox</tabstop>
|
|
||||||
<tabstop>expirySpinBox</tabstop>
|
|
||||||
<tabstop>uiUsername</tabstop>
|
|
||||||
<tabstop>uiDescription</tabstop>
|
|
||||||
<tabstop>uiComment</tabstop>
|
|
||||||
<tabstop>uiPatchList</tabstop>
|
|
||||||
<tabstop>uiPatchView</tabstop>
|
|
||||||
<tabstop>plainTextEdit</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>CodePaster::Internal::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>CodePaster::Internal::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>
|
|
||||||
Reference in New Issue
Block a user