mirror of
https://github.com/ra3xdh/qucs_s
synced 2025-03-28 21:13:26 +00:00
Initial fixes qucsfilter to Qt4
Trying to get rid of Qt3Support.
This commit is contained in:
parent
20d8cf1f1e
commit
9de480ae96
@ -21,16 +21,15 @@
|
|||||||
|
|
||||||
#include "helpdialog.h"
|
#include "helpdialog.h"
|
||||||
|
|
||||||
#include <qlayout.h>
|
|
||||||
#include <q3hbox.h>
|
#include <QPushButton>
|
||||||
#include <qpushbutton.h>
|
#include <QVBoxLayout>
|
||||||
#include <q3textedit.h>
|
#include <QHBoxLayout>
|
||||||
//Added by qt3to4:
|
#include <QTextEdit>
|
||||||
#include <Q3VBoxLayout>
|
|
||||||
|
|
||||||
|
|
||||||
HelpDialog::HelpDialog(QWidget *parent)
|
HelpDialog::HelpDialog(QWidget *parent)
|
||||||
: QDialog(parent, 0, false, Qt::WDestructiveClose)
|
: QDialog(parent) //, 0, false, Qt::WDestructiveClose)
|
||||||
{
|
{
|
||||||
setCaption("Qucs Filter Help");
|
setCaption("Qucs Filter Help");
|
||||||
|
|
||||||
@ -51,25 +50,28 @@ HelpDialog::HelpDialog(QWidget *parent)
|
|||||||
// -------- create dialog widgets ------------
|
// -------- create dialog widgets ------------
|
||||||
resize(250, 230);
|
resize(250, 230);
|
||||||
|
|
||||||
vLayout = new Q3VBoxLayout(this);
|
vLayout = new QVBoxLayout();
|
||||||
|
|
||||||
Text = new Q3TextEdit(s, QString::null, this);
|
Text = new QTextEdit(s, this);
|
||||||
Text->setTextFormat(Qt::PlainText);
|
//Text->setTextFormat(Qt::PlainText);
|
||||||
Text->setReadOnly(true);
|
Text->setReadOnly(true);
|
||||||
//Text->setWordWrap(QTextEdit::NoWrap);
|
//Text->setWordWrap(QTextEdit::NoWrap);
|
||||||
Text->setMinimumSize(200,200);
|
Text->setMinimumSize(200,200);
|
||||||
vLayout->addWidget(Text);
|
vLayout->addWidget(Text);
|
||||||
|
|
||||||
Q3HBox *h = new Q3HBox(this);
|
QHBoxLayout *h = new QHBoxLayout();
|
||||||
vLayout->addWidget(h);
|
h->addLayout(vLayout);
|
||||||
|
|
||||||
h->setStretchFactor(new QWidget(h),5); // stretchable placeholder
|
h->addStretch(5);
|
||||||
|
|
||||||
QPushButton *ButtonClose = new QPushButton(tr("Close"), h);
|
QPushButton *ButtonClose = new QPushButton(tr("Close"));
|
||||||
|
h->addWidget(ButtonClose);
|
||||||
connect(ButtonClose, SIGNAL(clicked()), SLOT(slotClose()));
|
connect(ButtonClose, SIGNAL(clicked()), SLOT(slotClose()));
|
||||||
ButtonClose->setFocus();
|
ButtonClose->setFocus();
|
||||||
|
|
||||||
h->setStretchFactor(new QWidget(h),5); // stretchable placeholder
|
h->addStretch(5);
|
||||||
|
|
||||||
|
setLayout(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
HelpDialog::~HelpDialog()
|
HelpDialog::~HelpDialog()
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
#ifndef HELPDIALOG_H
|
#ifndef HELPDIALOG_H
|
||||||
#define HELPDIALOG_H
|
#define HELPDIALOG_H
|
||||||
|
|
||||||
#include <qdialog.h>
|
#include <QDialog>
|
||||||
//Added by qt3to4:
|
#include <QVBoxLayout>
|
||||||
#include <Q3VBoxLayout>
|
#include <QTextEdit>
|
||||||
|
|
||||||
class Q3TextEdit;
|
class QTextEdit;
|
||||||
class Q3VBoxLayout;
|
class QVBoxLayout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@author Michael Margraf
|
*@author Michael Margraf
|
||||||
@ -39,8 +39,8 @@ private slots:
|
|||||||
void slotClose();
|
void slotClose();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q3VBoxLayout *vLayout;
|
QVBoxLayout *vLayout;
|
||||||
Q3TextEdit *Text;
|
QTextEdit *Text;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <qmenubar.h>
|
#include <qmenubar.h>
|
||||||
#include <q3popupmenu.h>
|
#include <QMenu>
|
||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
@ -54,10 +54,10 @@ QucsFilter::QucsFilter()
|
|||||||
|
|
||||||
|
|
||||||
// -------- create menubar -------------------
|
// -------- create menubar -------------------
|
||||||
Q3PopupMenu *fileMenu = new Q3PopupMenu();
|
QMenu *fileMenu = new QMenu();
|
||||||
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), Qt::CTRL+Qt::Key_Q);
|
fileMenu->insertItem(tr("E&xit"), this, SLOT(slotQuit()), Qt::CTRL+Qt::Key_Q);
|
||||||
|
|
||||||
Q3PopupMenu *helpMenu = new Q3PopupMenu();
|
QMenu *helpMenu = new QMenu();
|
||||||
helpMenu->insertItem(tr("Help..."), this, SLOT(slotHelpIntro()), Qt::Key_F1);
|
helpMenu->insertItem(tr("Help..."), this, SLOT(slotHelpIntro()), Qt::Key_F1);
|
||||||
helpMenu->insertSeparator();
|
helpMenu->insertSeparator();
|
||||||
helpMenu->insertItem(
|
helpMenu->insertItem(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user