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 <qlayout.h>
|
||||
#include <q3hbox.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <q3textedit.h>
|
||||
//Added by qt3to4:
|
||||
#include <Q3VBoxLayout>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QTextEdit>
|
||||
|
||||
|
||||
HelpDialog::HelpDialog(QWidget *parent)
|
||||
: QDialog(parent, 0, false, Qt::WDestructiveClose)
|
||||
: QDialog(parent) //, 0, false, Qt::WDestructiveClose)
|
||||
{
|
||||
setCaption("Qucs Filter Help");
|
||||
|
||||
@ -51,25 +50,28 @@ HelpDialog::HelpDialog(QWidget *parent)
|
||||
// -------- create dialog widgets ------------
|
||||
resize(250, 230);
|
||||
|
||||
vLayout = new Q3VBoxLayout(this);
|
||||
vLayout = new QVBoxLayout();
|
||||
|
||||
Text = new Q3TextEdit(s, QString::null, this);
|
||||
Text->setTextFormat(Qt::PlainText);
|
||||
Text = new QTextEdit(s, this);
|
||||
//Text->setTextFormat(Qt::PlainText);
|
||||
Text->setReadOnly(true);
|
||||
// Text->setWordWrap(QTextEdit::NoWrap);
|
||||
//Text->setWordWrap(QTextEdit::NoWrap);
|
||||
Text->setMinimumSize(200,200);
|
||||
vLayout->addWidget(Text);
|
||||
|
||||
Q3HBox *h = new Q3HBox(this);
|
||||
vLayout->addWidget(h);
|
||||
QHBoxLayout *h = new QHBoxLayout();
|
||||
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()));
|
||||
ButtonClose->setFocus();
|
||||
|
||||
h->setStretchFactor(new QWidget(h),5); // stretchable placeholder
|
||||
h->addStretch(5);
|
||||
|
||||
setLayout(h);
|
||||
}
|
||||
|
||||
HelpDialog::~HelpDialog()
|
||||
|
@ -18,12 +18,12 @@
|
||||
#ifndef HELPDIALOG_H
|
||||
#define HELPDIALOG_H
|
||||
|
||||
#include <qdialog.h>
|
||||
//Added by qt3to4:
|
||||
#include <Q3VBoxLayout>
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QTextEdit>
|
||||
|
||||
class Q3TextEdit;
|
||||
class Q3VBoxLayout;
|
||||
class QTextEdit;
|
||||
class QVBoxLayout;
|
||||
|
||||
/**
|
||||
*@author Michael Margraf
|
||||
@ -39,8 +39,8 @@ private slots:
|
||||
void slotClose();
|
||||
|
||||
private:
|
||||
Q3VBoxLayout *vLayout;
|
||||
Q3TextEdit *Text;
|
||||
QVBoxLayout *vLayout;
|
||||
QTextEdit *Text;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <qmenubar.h>
|
||||
#include <q3popupmenu.h>
|
||||
#include <QMenu>
|
||||
#include <qmessagebox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qlabel.h>
|
||||
@ -54,10 +54,10 @@ QucsFilter::QucsFilter()
|
||||
|
||||
|
||||
// -------- create menubar -------------------
|
||||
Q3PopupMenu *fileMenu = new Q3PopupMenu();
|
||||
QMenu *fileMenu = new QMenu();
|
||||
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->insertSeparator();
|
||||
helpMenu->insertItem(
|
||||
|
Loading…
x
Reference in New Issue
Block a user