|
From: <cn...@us...> - 2020-11-02 01:42:44
|
Revision: 1094
http://sourceforge.net/p/seq/svn/1094
Author: cn187
Date: 2020-11-02 01:42:38 +0000 (Mon, 02 Nov 2020)
Log Message:
-----------
Replace compatibility/deprecated functions with Qt4 equivalents
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/combatlog.cpp
showeq/branches/pre_6_0_beta/src/compassframe.cpp
showeq/branches/pre_6_0_beta/src/experiencelog.cpp
showeq/branches/pre_6_0_beta/src/guildlist.cpp
showeq/branches/pre_6_0_beta/src/interface.cpp
showeq/branches/pre_6_0_beta/src/main.cpp
showeq/branches/pre_6_0_beta/src/map.cpp
showeq/branches/pre_6_0_beta/src/messagewindow.cpp
showeq/branches/pre_6_0_beta/src/netdiag.cpp
showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
Modified: showeq/branches/pre_6_0_beta/src/combatlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -269,8 +269,13 @@
#ifdef DEBUGCOMBAT
seqDebug("CombatWindow::initUI: starting...");
#endif
- QVBoxLayout* layout = new QVBoxLayout(boxLayout());
+ QWidget* mainWidget = new QWidget();
+ setWidget(mainWidget);
+
+ QVBoxLayout* layout = new QVBoxLayout(mainWidget);
+ layout->setContentsMargins(0, 0, 0, 0);
+
m_menu_bar = new QMenuBar(this);
layout->addWidget(m_menu_bar);
Modified: showeq/branches/pre_6_0_beta/src/compassframe.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/compassframe.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/compassframe.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -31,7 +31,13 @@
CompassFrame::CompassFrame(Player* player, QWidget* parent, const char* name)
: SEQWindow("Compass", "ShowEQ - Compass", parent, name)
{
- QVBoxLayout* layout = new QVBoxLayout(boxLayout());
+
+ QWidget* mainWidget = new QWidget();
+ setWidget(mainWidget);
+
+ QVBoxLayout* layout = new QVBoxLayout(mainWidget);
+ layout->setContentsMargins(0, 0, 0, 0);
+
m_compass = new Compass (this, "compass");
layout->addWidget(m_compass);
QWidget* coordsbox = new QWidget(this);
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -234,8 +234,12 @@
this, SLOT(calcZEMNextKill()) );
m_action_calc_zem->setCheckable(true);
- m_layout = new QVBoxLayout(boxLayout());
+ QWidget* mainWidget = new QWidget();
+ setWidget(mainWidget);
+ m_layout = new QVBoxLayout(mainWidget);
+ m_layout->setContentsMargins(0, 0, 0, 0);
+
m_menu_bar = new QMenuBar( this );
m_menu_bar->addMenu(m_view_menu );
//m_layout->addSpacing( m_menu_bar->height() + 5 );
Modified: showeq/branches/pre_6_0_beta/src/guildlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -164,9 +164,13 @@
m_showAlts = pSEQPrefs->getPrefBool("ShowAlts", preferenceName(), true);
- QBoxLayout* vLayout = new QVBoxLayout(boxLayout());
+ QWidget* mainWidget = new QWidget();
+ setWidget(mainWidget);
+
+ QBoxLayout* vLayout = new QVBoxLayout(mainWidget);
+ vLayout->setContentsMargins(0, 0, 0, 0);
QHBoxLayout* hLayout= new QHBoxLayout();
- vLayout->addLayout(hLayout);
+ vLayout->addLayout(hLayout);
// Guild Name
m_guildName = new QLabel("Guild", this);
Modified: showeq/branches/pre_6_0_beta/src/interface.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/interface.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -101,9 +101,9 @@
#define ZONE_ORDER_DIAG
/* The main interface widget */
-EQInterface::EQInterface(DataLocationMgr* dlm,
- QWidget * parent, const char *name)
- : Q3MainWindow (parent),
+EQInterface::EQInterface(DataLocationMgr* dlm,
+ QWidget * parent, const char *name)
+ : Q3MainWindow (parent, nullptr, Qt::WType_TopLevel),
m_player(0),
m_dataLocationMgr(dlm),
m_mapMgr(0),
@@ -186,7 +186,7 @@
if (pSEQPrefs->isPreference("Font", section))
{
QFont appFont = pSEQPrefs->getPrefFont("Font", section, qApp->font());
- qApp->setFont( appFont, true );
+ qApp->setFont( appFont );
}
// initialize packet count
@@ -3117,18 +3117,17 @@
// get a new application font
QFont newFont;
- newFont = QFontDialog::getFont(&ok, QApplication::font(),
- this, name);
+ newFont = QFontDialog::getFont(&ok, QApplication::font(),
+ this, name);
// if the user clicked ok and selected a valid font, set it
if (ok)
{
// set the new application font
- qApp->setFont( newFont, true );
+ qApp->setFont( newFont );
// set the preference for future sessions
- pSEQPrefs->setPrefFont("Font", "Interface",
- newFont);
+ pSEQPrefs->setPrefFont("Font", "Interface", newFont);
// make sure the windows that override the application font, do so
emit restoreFonts();
@@ -3267,18 +3266,15 @@
newFont.setPointSize(8);
// get new status font
- newFont = QFontDialog::getFont(&ok,
- pSEQPrefs->getPrefFont("StatusFont",
- "Interface",
- newFont),
- this, name);
+ newFont = QFontDialog::getFont(&ok,
+ pSEQPrefs->getPrefFont("StatusFont", "Interface", newFont),
+ this, name);
// if the user clicked ok and selected a valid font, set it
if (ok)
{
// set the preference for future sessions
- pSEQPrefs->setPrefFont("StatusFont", "Interface",
- newFont);
+ pSEQPrefs->setPrefFont("StatusFont", "Interface", newFont);
// make sure to reset the status font since the previous call may have
// changed it
@@ -5612,14 +5608,14 @@
{
QPalette p( QColor( 239, 239, 239 ) );
qApp->setStyle("plastique");
- qApp->setPalette( p, TRUE );
+ qApp->setPalette(p);
}
break;
case 2: // windows
{
qApp->setStyle("windows");
- qApp->setFont( OrigFont, TRUE );
- qApp->setPalette( OrigPalette, TRUE );
+ qApp->setFont( OrigFont );
+ qApp->setPalette(OrigPalette);
}
break;
case 3: // cde
@@ -5645,8 +5641,8 @@
p.setColor( QPalette::Disabled, QColorGroup::Foreground, Qt::lightGray );
p.setColor( QPalette::Disabled, QColorGroup::Text, Qt::lightGray );
p.setColor( QPalette::Disabled, QColorGroup::ButtonText, Qt::lightGray );
- qApp->setPalette( p, TRUE );
- qApp->setFont( QFont( "times", OrigFont.pointSize() ), TRUE );
+ qApp->setPalette(p);
+ qApp->setFont( QFont( "times", OrigFont.pointSize() ) );
}
break;
case 5: // motif
@@ -5653,8 +5649,8 @@
{
QPalette p( QColor( 192, 192, 192 ) );
qApp->setStyle("motif");
- qApp->setPalette( p, TRUE );
- qApp->setFont( OrigFont, TRUE );
+ qApp->setPalette(p);
+ qApp->setFont( OrigFont );
}
break;
case 6: // cleanlooks
@@ -5661,8 +5657,8 @@
{
//QPalette p( QColor( 192, 192, 192 ) );
qApp->setStyle("cleanlooks");
- qApp->setPalette( OrigPalette, TRUE );
- qApp->setFont( OrigFont, TRUE );
+ qApp->setPalette(OrigPalette);
+ qApp->setFont( OrigFont );
}
break;
default: // system default
@@ -5669,8 +5665,8 @@
{
QPalette p( QColor( 192, 192, 192 ) );
qApp->setStyle("motif");
- qApp->setPalette( p, TRUE );
- qApp->setFont( OrigFont, TRUE );
+ qApp->setPalette(p);
+ qApp->setFont( OrigFont );
theme = 2;
}
break;
Modified: showeq/branches/pre_6_0_beta/src/main.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/main.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/main.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -746,8 +746,7 @@
{
/* The main interface widget */
EQInterface intf(&dataLocMgr, 0, "interface");
- qapp.setMainWidget (&intf);
-
+
/* Start the main loop */
ret = qapp.exec ();
}
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -4632,8 +4632,12 @@
QLabel* tmpLabel;
+ QWidget* mainWidget = new QWidget();
+ setWidget(mainWidget);
+
// setup the vertical box
- m_vertical = new QVBoxLayout(boxLayout());
+ m_vertical = new QVBoxLayout(mainWidget);
+ m_vertical->setContentsMargins(0, 0, 0, 0);
// setup the top control window
m_topControlBox = new QWidget(this);
Modified: showeq/branches/pre_6_0_beta/src/messagewindow.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -122,7 +122,7 @@
setWindowTitle(caption);
// setup the GUI
- QGridLayout* grid = new QGridLayout(this, 5, 2);
+ QGridLayout* grid = new QGridLayout(this);
// sets margin around the grid
grid->setMargin(5);
@@ -130,8 +130,8 @@
m_findText = new QLineEdit(this);
m_findText->setReadOnly(false);
connect(m_findText, SIGNAL(textChanged(const QString&)),
- this, SLOT(textChanged(const QString&)));
- grid->addMultiCellWidget(m_findText, 0, 0, 1, 2);
+ this, SLOT(textChanged(const QString&)));
+ grid->addWidget(m_findText, 0, 1, 1, 3);
QLabel* label = new QLabel("Find &Text:", this);
label->setBuddy(m_findText);
grid->addWidget(label, 0, 0);
@@ -142,20 +142,14 @@
m_findBackwards = new QCheckBox("Find &Backwards", this);
grid->addWidget(m_findBackwards, 3, 1);
- QHBoxLayout* layout = new QHBoxLayout(grid);
- grid->addMultiCell(layout, 5, 5, 0, 2);
- layout->addStretch();
+
m_find = new QPushButton("&Find", this);
- layout->addWidget(m_find);
+ grid->addWidget(m_find, 4, 1);
m_find->setEnabled(false);
- connect(m_find, SIGNAL(clicked()),
- this, SLOT(find()));
- layout->addStretch();
+ connect(m_find, SIGNAL(clicked()), this, SLOT(find()));
QPushButton* close = new QPushButton("&Close", this);
- layout->addWidget(close);
- connect(close, SIGNAL(clicked()),
- this, SLOT(close()));
- layout->addStretch();
+ grid->addWidget(close, 4, 3);
+ connect(close, SIGNAL(clicked()), this, SLOT(close()));
// turn off resizing
setSizeGripEnabled(false);
Modified: showeq/branches/pre_6_0_beta/src/netdiag.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/netdiag.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/netdiag.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -35,15 +35,19 @@
m_packet(packet),
m_playbackSpeed(NULL)
{
+
+ QWidget* mainWidget = new QWidget();
+ setWidget(mainWidget);
+
// setResizeEnabled(false);
// get preferences
- QGridLayout* tmpGrid = new QGridLayout(boxLayout(), 26, 9);
- tmpGrid->addColSpacing(3, 5);
- tmpGrid->addColSpacing(6, 5);
- tmpGrid->addRowSpacing(1, 5);
- tmpGrid->addRowSpacing(3, 5);
- tmpGrid->addRowSpacing(6, 5);
- tmpGrid->addRowSpacing(8, 5);
+ QGridLayout* tmpGrid = new QGridLayout(mainWidget);
+ tmpGrid->addItem(new QSpacerItem(5, 0), 0, 3);
+ tmpGrid->addItem(new QSpacerItem(5, 0), 0, 6);
+ tmpGrid->addItem(new QSpacerItem(0, 5), 1, 0);
+ tmpGrid->addItem(new QSpacerItem(0, 5), 3, 0);
+ tmpGrid->addItem(new QSpacerItem(0, 5), 6, 0);
+ tmpGrid->addItem(new QSpacerItem(0, 5), 8, 0);
int row = 0;
int col = 0;
@@ -94,8 +98,8 @@
tmpGrid->addWidget(new QLabel("Filter: ", this), row, col++);
m_filterLabel = new QLabel(this);
m_filterLabel->setText(m_packet->pcapFilter());
- tmpGrid->addMultiCellWidget(m_filterLabel, row, row, col, col+5);
-
+ tmpGrid->addWidget(m_filterLabel, row, col, 1, 5);
+
// stream specific statistics
row++; row++; col = 0;
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-11-02 01:42:23 UTC (rev 1093)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-11-02 01:42:38 UTC (rev 1094)
@@ -65,7 +65,11 @@
int fpm = pSEQPrefs->getPrefInt("FPM", preferenceName(), 10);
m_delay = 60000L / fpm;
- QBoxLayout* vLayout = new QVBoxLayout(boxLayout());
+ QWidget* mainWidget = new QWidget();
+ setWidget(mainWidget);
+
+ QBoxLayout* vLayout = new QVBoxLayout(mainWidget);
+ vLayout->setContentsMargins(0, 0, 0, 0);
QHBoxLayout* hLayout= new QHBoxLayout();
vLayout->addLayout(hLayout);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|