You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(18) |
Oct
(11) |
Nov
(9) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
(6) |
Mar
|
Apr
(10) |
May
(38) |
Jun
(15) |
Jul
(32) |
Aug
|
Sep
(17) |
Oct
(11) |
Nov
|
Dec
(14) |
| 2006 |
Jan
(2) |
Feb
(5) |
Mar
(3) |
Apr
(2) |
May
(3) |
Jun
(7) |
Jul
|
Aug
|
Sep
(3) |
Oct
(2) |
Nov
(6) |
Dec
(3) |
| 2007 |
Jan
|
Feb
(17) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
(11) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
|
Sep
(6) |
Oct
(4) |
Nov
(1) |
Dec
|
| 2009 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
|
May
(4) |
Jun
(3) |
Jul
|
Aug
(5) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(6) |
| 2010 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(5) |
| 2013 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2014 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(2) |
Nov
(5) |
Dec
(2) |
| 2015 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(2) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2018 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(2) |
Jun
(2) |
Jul
(8) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(6) |
| 2019 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(2) |
Oct
(13) |
Nov
(6) |
Dec
(4) |
| 2020 |
Jan
(7) |
Feb
(7) |
Mar
(7) |
Apr
(8) |
May
(5) |
Jun
(3) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(37) |
Nov
(30) |
Dec
(8) |
| 2021 |
Jan
(14) |
Feb
(9) |
Mar
(7) |
Apr
(17) |
May
(3) |
Jun
(10) |
Jul
(7) |
Aug
(3) |
Sep
(3) |
Oct
(4) |
Nov
(15) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(5) |
Sep
(6) |
Oct
(4) |
Nov
(34) |
Dec
(17) |
| 2023 |
Jan
(3) |
Feb
(3) |
Mar
(29) |
Apr
(2) |
May
(18) |
Jun
(12) |
Jul
(12) |
Aug
(2) |
Sep
(7) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2024 |
Jan
(2) |
Feb
(10) |
Mar
(17) |
Apr
(6) |
May
(3) |
Jun
(9) |
Jul
(22) |
Aug
(48) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(8) |
| 2025 |
Jan
(3) |
Feb
(2) |
Mar
(9) |
Apr
(7) |
May
(3) |
Jun
(3) |
Jul
(2) |
Aug
(2) |
Sep
(11) |
Oct
(6) |
Nov
(9) |
Dec
(4) |
| 2026 |
Jan
(5) |
Feb
(6) |
Mar
(3) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <cn...@us...> - 2020-10-28 14:22:54
|
Revision: 1085
http://sourceforge.net/p/seq/svn/1085
Author: cn187
Date: 2020-10-28 14:22:52 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
Replace Q3MultiLineEdit/Q3TextEdit with QTextEdit
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/editor.cpp
showeq/branches/pre_6_0_beta/src/editor.h
showeq/branches/pre_6_0_beta/src/messagewindow.cpp
showeq/branches/pre_6_0_beta/src/messagewindow.h
Modified: showeq/branches/pre_6_0_beta/src/editor.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/editor.cpp 2020-10-28 00:32:56 UTC (rev 1084)
+++ showeq/branches/pre_6_0_beta/src/editor.cpp 2020-10-28 14:22:52 UTC (rev 1085)
@@ -38,7 +38,7 @@
#include <Q3TextStream>
#include <QPaintDevice>
#include <QObject>
-#include <Q3MultiLineEdit>
+#include <QTextEdit>
#include <QMessageBox>
#include <QPixmap>
#include <QCloseEvent>
@@ -124,7 +124,7 @@
file->insertSeparator();
file->insertItem( "&Close Editor", this, SLOT(close()), Qt::CTRL+Qt::Key_W );
- e = new Q3MultiLineEdit( this, "editor" );
+ e = new QTextEdit( this, "editor" );
e->setFocus();
setCentralWidget( e );
@@ -154,7 +154,6 @@
if ( !f.open( QIODevice::ReadOnly ) )
return;
- e->setAutoUpdate( FALSE );
e->clear();
Q3TextStream t(&f);
@@ -164,9 +163,8 @@
}
f.close();
- e->setAutoUpdate( TRUE );
e->repaint();
- e->setEdited( FALSE );
+ e->setModified( FALSE );
setCaption( fileName );
QString s;
s.sprintf( "Opened %s", fileName );
@@ -192,7 +190,7 @@
t << text;
f.close();
- e->setEdited( FALSE );
+ e->setModified( FALSE );
setCaption( filename );
@@ -212,7 +210,7 @@
void EditorWindow::closeEvent( QCloseEvent* ce )
{
- if ( !e->edited() ) {
+ if ( !e->isModified() ) {
ce->accept();
return;
}
Modified: showeq/branches/pre_6_0_beta/src/editor.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/editor.h 2020-10-28 00:32:56 UTC (rev 1084)
+++ showeq/branches/pre_6_0_beta/src/editor.h 2020-10-28 14:22:52 UTC (rev 1085)
@@ -27,7 +27,7 @@
#include <QCloseEvent>
#include <QMenu>
-class Q3MultiLineEdit;
+class QTextEdit;
class Q3ToolBar;
class QMenu;
@@ -49,7 +49,7 @@
void saveAs();
private:
- Q3MultiLineEdit *e;
+ QTextEdit *e;
Q3ToolBar *fileTools;
QString filename;
};
Modified: showeq/branches/pre_6_0_beta/src/messagewindow.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-28 00:32:56 UTC (rev 1084)
+++ showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-28 14:22:52 UTC (rev 1085)
@@ -51,7 +51,7 @@
//----------------------------------------------------------------------
// MessageBrowser
MessageBrowser::MessageBrowser(QWidget* parent, const char* name)
- : Q3TextEdit(parent, name)
+ : QTextEdit(parent, name)
{
}
@@ -65,7 +65,7 @@
}
#endif // ZBTEPM
if (e->type() != QEvent::MouseButtonPress)
- return Q3TextEdit::eventFilter(o, e);
+ return QTextEdit::eventFilter(o, e);
QMouseEvent* m = (QMouseEvent*)e;
@@ -76,7 +76,7 @@
return true;
}
- return Q3TextEdit::eventFilter(o, e);
+ return QTextEdit::eventFilter(o, e);
}
void MessageBrowser::keyPressEvent(QKeyEvent* e)
@@ -104,7 +104,7 @@
}
};
- Q3TextEdit::keyPressEvent(e);
+ QTextEdit::keyPressEvent(e);
}
//----------------------------------------------------------------------
@@ -163,11 +163,11 @@
{
// perform a find in the message window, starting at the current position
// using the settings from the checkboxes.
- m_messageWindow->find(m_findText->text(),
- m_matchCase->isChecked(),
- m_wholeWords->isChecked(),
- !m_findBackwards->isChecked(),
- 0, 0);
+ QTextDocument::FindFlags options = 0;
+ if (m_matchCase->isChecked()) options |= QTextDocument::FindCaseSensitively;
+ if (m_wholeWords->isChecked()) options |= QTextDocument::FindWholeWords;
+ if (m_findBackwards->isChecked()) options |= QTextDocument::FindBackward;
+ m_messageWindow->find(m_findText->text(), options);
}
void MessageFindDialog::close()
@@ -480,11 +480,12 @@
m_messageWindow->setCurrentFont(font());
// set the colors
- m_messageWindow->setColor(m_defaultColor);
- m_messageWindow->setPaper(m_defaultBGColor);
+ QPalette p = m_messageWindow->palette();
+ p.setColor(QPalette::Base, m_defaultBGColor);
+ p.setColor(QPalette::Text, m_defaultColor);
+ m_messageWindow->setPalette(p);
// make sure history isn't kept
- m_messageWindow->setUndoDepth(0);
m_messageWindow->setUndoRedoEnabled(false);
m_messageWindow->setTextFormat(Qt::PlainText);
@@ -492,12 +493,12 @@
// set it to read only
m_messageWindow->setReadOnly(true);
- // set the word wrap
- m_messageWindow->setWordWrap(m_wrapText ?
- Q3TextEdit::WidgetWidth : Q3TextEdit::NoWrap);
+ // set the word wrap
+ m_messageWindow->setLineWrapMode(m_wrapText ?
+ QTextEdit::WidgetWidth : QTextEdit::NoWrap);
// set the wrap policy to break at space
- m_messageWindow->setWrapPolicy(Q3TextEdit::AtWhiteSpace);
+ m_messageWindow->setWordWrapMode(QTextOption::WordWrap);
// connect to the Messages signal(s)
connect(m_messages, SIGNAL(newMessage(const MessageEntry&)),
@@ -716,15 +717,25 @@
text.replace(m_itemPattern, "\\2 (#\\1)");
+ //Set the fg/bg colors
+ if (m_typeStyles[type].bgColor().isValid() &&
+ m_typeStyles[type].color().isValid())
+ {
+ QTextCharFormat format = m_messageWindow->currentCharFormat();
+ format.setForeground(m_typeStyles[type].color());
+ format.setBackground(m_typeStyles[type].bgColor());
+ m_messageWindow->setCurrentCharFormat(format);
+ }
+
// now append the message text to the buffer
m_messageWindow->append(text);
- int para = m_messageWindow->paragraphs() - 1;
- if (m_typeStyles[type].bgColor().isValid())
- m_messageWindow->setParagraphBackgroundColor(para,
- m_typeStyles[type].bgColor());
- else
- m_messageWindow->setParagraphBackgroundColor(para, m_defaultBGColor);
+ //Reset the fg/bg colors
+ QTextCharFormat format = m_messageWindow->currentCharFormat();
+ format.setForeground(m_defaultColor);
+ format.setBackground(m_defaultBGColor);
+ m_messageWindow->setCurrentCharFormat(format);
+
}
void MessageWindow::newMessage(const MessageEntry& message)
@@ -758,10 +769,10 @@
m_messageWindow->append(" ");
// set the cursor to the beginning of the document
- m_messageWindow->setCursorPosition(0, 0);
+ //m_messageWindow->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
// move the cursor to the end of the document
- m_messageWindow->moveCursor(Q3TextEdit::MoveEnd, false);
+ m_messageWindow->moveCursor(QTextEdit::MoveEnd, QTextCursor::MoveAnchor);
// iterate over the message list and add the messages
MessageList::const_iterator it;
@@ -785,7 +796,7 @@
m_messageWindow->unsetCursor();
// move the cursor to the end of the document
- m_messageWindow->moveCursor(Q3TextEdit::MoveEnd, false);
+ m_messageWindow->moveCursor(QTextEdit::MoveEnd, QTextCursor::MoveAnchor);
// move the cursor to the end of the document
m_messageWindow->ensureCursorVisible();
@@ -827,10 +838,7 @@
{
Q3TextStream stream( &file );
- // save all the paragraphs
- // ZBNOTE: unfortunately just using ->text() doesn't work.
- for (int i = 0; i < m_messageWindow->paragraphs(); i++)
- stream << m_messageWindow->text(i) << endl;
+ stream << m_messageWindow->toPlainText() << endl;
}
}
@@ -1052,8 +1060,8 @@
pSEQPrefs->setPrefBool("WrapText", preferenceName(), m_wrapText);
// set the wrap policy according to the setting
- m_messageWindow->setWordWrap(m_wrapText ?
- Q3TextEdit::WidgetWidth : Q3TextEdit::NoWrap);
+ m_messageWindow->setLineWrapMode(m_wrapText ?
+ QTextEdit::WidgetWidth : QTextEdit::NoWrap);
}
void MessageWindow::setTypeStyle(int id)
@@ -1108,7 +1116,9 @@
if (color.isValid())
{
m_defaultBGColor = color;
- m_messageWindow->setPaper(m_defaultBGColor);
+ QPalette p = m_messageWindow->palette();
+ p.setColor(QPalette::Base, m_defaultBGColor);
+ m_messageWindow->setPalette(p);
pSEQPrefs->setPrefColor("DefaultBGColor", preferenceName(),
m_defaultBGColor);
Modified: showeq/branches/pre_6_0_beta/src/messagewindow.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagewindow.h 2020-10-28 00:32:56 UTC (rev 1084)
+++ showeq/branches/pre_6_0_beta/src/messagewindow.h 2020-10-28 14:22:52 UTC (rev 1085)
@@ -27,7 +27,7 @@
#include <cstdint>
-#include <Q3TextEdit>
+#include <QTextEdit>
#include <QRegExp>
#include <QDialog>
#include <QLabel>
@@ -51,7 +51,7 @@
//----------------------------------------------------------------------
// MessageBrowser
-class MessageBrowser : public Q3TextEdit
+class MessageBrowser : public QTextEdit
{
Q_OBJECT
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-28 00:32:59
|
Revision: 1084
http://sourceforge.net/p/seq/svn/1084
Author: cn187
Date: 2020-10-28 00:32:56 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
Replace Q3ListBox with QListWidget
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
showeq/branches/pre_6_0_beta/src/messagefilterdialog.h
Modified: showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-28 00:32:47 UTC (rev 1083)
+++ showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-28 00:32:56 UTC (rev 1084)
@@ -34,7 +34,7 @@
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
-#include <Q3ListBox>
+#include <QListWidget>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QVBoxLayout>
@@ -42,15 +42,13 @@
//----------------------------------------------------------------------
// MessageFilterListBoxText
-class MessageFilterListBoxText : public Q3ListBoxText
+class MessageFilterListBoxText : public QListWidgetItem
{
public:
- MessageFilterListBoxText(Q3ListBox * listbox,
+ MessageFilterListBoxText(QListWidget * listbox,
const QString & text = QString::null,
uint32_t data = 0);
- MessageFilterListBoxText(Q3ListBox * listbox, Q3ListBoxItem* after,
- const QString & text = QString::null,
- uint32_t data = 0);
+
virtual ~MessageFilterListBoxText();
uint32_t data() { return m_data; }
@@ -60,22 +58,14 @@
uint32_t m_data;
};
-MessageFilterListBoxText::MessageFilterListBoxText(Q3ListBox * listbox,
+MessageFilterListBoxText::MessageFilterListBoxText(QListWidget * listbox,
const QString & text,
uint32_t data)
- : Q3ListBoxText(listbox, text),
+ : QListWidgetItem(text, listbox),
m_data(data)
{
}
-MessageFilterListBoxText::MessageFilterListBoxText(Q3ListBox* listbox,
- Q3ListBoxItem* after,
- const QString& text,
- uint32_t data)
- : Q3ListBoxText(listbox, text, after),
- m_data(data)
-{
-}
MessageFilterListBoxText::~MessageFilterListBoxText()
{
@@ -115,12 +105,14 @@
QLabel* label = new QLabel("&Existing Filters", this);
column1Layout->addWidget(label, 1, Qt::AlignCenter);
- m_existingFilters = new Q3ListBox(this, "existingfilters");
+ m_existingFilters = new QListWidget(this);
column1Layout->addWidget(m_existingFilters, 10);
label->setBuddy(m_existingFilters);
- m_existingFilters->setSelectionMode(Q3ListBox::Single);
- connect(m_existingFilters, SIGNAL(selectionChanged(Q3ListBoxItem*)),
- this, SLOT(existingFilterSelectionChanged(Q3ListBoxItem*)));
+ m_existingFilters->setSelectionMode(QAbstractItemView::SingleSelection);
+ connect(m_existingFilters->selectionModel(),
+ SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
+ this,
+ SLOT(existingFilterSelectionChanged(const QItemSelection&, const QItemSelection&)));
m_new = new QPushButton("Ne&w", this);
column1Layout->addWidget(m_new, 1, Qt::AlignCenter);
@@ -144,11 +136,13 @@
connect(m_pattern, SIGNAL(textChanged(const QString&)),
this, SLOT(anyTextChanged(const QString&)));
- m_messageTypes = new Q3ListBox(m_filterGroup, "messagetypes");
+ m_messageTypes = new QListWidget(m_filterGroup);
newFilterLayout->addRow("&Message Types", m_messageTypes);
- m_messageTypes->setSelectionMode(Q3ListBox::Multi);
- connect(m_messageTypes, SIGNAL(selectionChanged()),
- this, SLOT(messageTypeSelectionChanged()));
+ m_messageTypes->setSelectionMode(QAbstractItemView::MultiSelection);
+ connect(m_messageTypes->selectionModel(),
+ SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
+ this,
+ SLOT(messageTypeSelectionChanged(const QItemSelection&, const QItemSelection&)));
m_delete = new QPushButton("&Delete", m_filterGroup);
m_delete->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
@@ -227,21 +221,21 @@
uint64_t types = 0;
// iterate over the message types
- for (Q3ListBoxItem* currentLBT = m_messageTypes->firstItem();
- currentLBT;
- currentLBT = currentLBT->next())
+ int numTypeRows = m_messageTypes->count();
+ for (int row = 0; row < numTypeRows; ++row)
{
- // if the item isn't selected, add in its type flag, and enable updates
- if (currentLBT->isSelected())
- {
- // get the message type of the selected item
- type = ((MessageFilterListBoxText*)currentLBT)->data();
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*) m_messageTypes->item(row);
- // add its flag to the types
- types |= (uint64_t(1) << type);
- }
- }
+ if (item->isSelected())
+ {
+ // get the message type of the selected item
+ type = item->data();
+ // add its flag to the types
+ types |= (uint64_t(1) << type);
+ }
+ }
+
// create a message filter object
MessageFilter newFilter(m_name->text(), types, QRegExp(m_pattern->text()));
@@ -251,7 +245,7 @@
// add the new filter
m_currentFilterNum = m_filters->addFilter(newFilter);
-
+
// if it is a valid filter, make the new filter the current selection
if (m_currentFilterNum != 0xFF)
{
@@ -259,16 +253,17 @@
m_currentFilter = m_filters->filter(m_currentFilterNum);
// iterate over the existing filters
- for (Q3ListBoxItem* currentLBT = m_existingFilters->firstItem();
- currentLBT;
- currentLBT = currentLBT->next())
+ int numFiltRows = m_existingFilters->count();
+ for (int row = 0; row < numFiltRows; ++row)
{
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*) m_existingFilters->item(row);
// find the current filter
- if (((MessageFilterListBoxText*)currentLBT)->data() == m_currentFilterNum)
+ if (item->data() == m_currentFilterNum)
{
- // make the current filter the selected filter
- m_existingFilters->setSelected(currentLBT, true);
- break;
+ // make the current filter the selected filter
+ item->setSelected(true);
+ m_existingFilters->setCurrentRow(row);
+ break;
}
}
}
@@ -285,12 +280,31 @@
void MessageFilterDialog::updateFilter()
{
- // delete the old filter
- if (m_currentFilter)
- m_filters->remFilter(*m_currentFilter);
+ //Note, this used to happen in the opposite order: delete then add.
+ //But in Qt4, removing the old filter triggers the list selection update,
+ //which causes the previous/next item to be selected, losing the updated
+ //values and instead duplicating the adjacent filter.
+ //
+ //Doing it this way avoids that problem, but as a result it causes the
+ //updated filter to jump to a different position in the list.
+ //
+ //TODO to properly fix this, either we need to do one or both of:
+ // 1) implement a proper "update" that update the existing filter and
+ // list item without removing the old one
+ // 2) Change the filter list to sort by something other than the filter index
+ // Name might be a good choice here.
+ //
+
+ const MessageFilter* oldFilter = m_currentFilter;
+
// add in a new filter
addFilter();
+
+ // delete the old filter
+ if (oldFilter)
+ m_filters->remFilter(*oldFilter);
+
}
void MessageFilterDialog::deleteFilter()
@@ -315,41 +329,53 @@
checkState();
}
-void MessageFilterDialog::messageTypeSelectionChanged()
+void MessageFilterDialog::messageTypeSelectionChanged(
+ const QItemSelection& selected, const QItemSelection& deselected)
{
// check the state whenever the message type selection changed
checkState();
}
-void MessageFilterDialog::existingFilterSelectionChanged(Q3ListBoxItem * item)
+void MessageFilterDialog::existingFilterSelectionChanged(
+ const QItemSelection& selected, const QItemSelection& deselected)
{
- if (item)
+
+ //
+ if (selected.count())
{
- // get the current filter number from the listbox item
- m_currentFilterNum = ((MessageFilterListBoxText*)item)->data();
-
- // get the specified filter
- m_currentFilter = m_filters->filter(m_currentFilterNum);
+ // the filter list only allows selecting one item at a time, so
+ // we can simply grab the first (and only) selection
+ int row = selected.indexes().first().row();
- // set the GroupBox's label
- m_filterGroup->setTitle(m_currentFilter->name() + " &Filter");
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*)m_existingFilters->item(row);
- // setup all the filter values
- m_name->setText(m_currentFilter->name());
- m_pattern->setText(m_currentFilter->regexp().pattern());
+ // get the current filter number from the listbox item
+ m_currentFilterNum = item->data();
- // select all the message types
- uint64_t messageTypes = m_currentFilter->types();
- uint32_t messageType;
- for (Q3ListBoxItem* currentLBT = m_messageTypes->firstItem();
- currentLBT;
- currentLBT = currentLBT->next())
- {
- messageType = ((MessageFilterListBoxText*)currentLBT)->data();
- m_messageTypes->setSelected(currentLBT, ((uint64_t(1) << messageType) & messageTypes) != 0);
- }
+ // get the specified filter
+ m_currentFilter = m_filters->filter(m_currentFilterNum);
+
+ // set the GroupBox's label
+ m_filterGroup->setTitle(m_currentFilter->name() + " &Filter");
+
+ // setup all the filter values
+ m_name->setText(m_currentFilter->name());
+ m_pattern->setText(m_currentFilter->regexp().pattern());
+
+ // select all the message types
+ uint64_t messageTypes = m_currentFilter->types();
+ uint32_t messageType;
+ int numRows = m_messageTypes->count();
+ for (int row = 0; row < numRows; ++row)
+ {
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*) m_messageTypes->item(row);
+
+ messageType = item->data();
+ item->setSelected(((uint64_t(1) << messageType) & messageTypes) != 0);
+ }
+
}
- else // no item selected, clear all filter setup
+ else
clearFilter();
// check the current state
@@ -359,19 +385,20 @@
void MessageFilterDialog::removedFilter(uint32_t mask, uint8_t filter)
{
// iterate over all the existing filters
- for (Q3ListBoxItem* currentLBT = m_existingFilters->firstItem();
- currentLBT;
- currentLBT = currentLBT->next())
+ int numRows = m_existingFilters->count();
+ for (int row = 0; row < numRows; ++row)
{
- // check if this is the removed filter
- if (((MessageFilterListBoxText*)currentLBT)->data() == filter)
- {
- // delete the removed filter's list box item
- delete currentLBT;
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*)m_existingFilters->item(row);
- // nothing more to do
- break;
- }
+ // check if this is the removed filter
+ if (item->data() == filter)
+ {
+ // delete the removed filter's list box item
+ delete m_existingFilters->takeItem(row);
+
+ // nothing more to do
+ break;
+ }
}
}
@@ -381,25 +408,23 @@
if (m_existingFilters->count() == 0)
{
// add the new message filter
- new MessageFilterListBoxText(m_existingFilters, 0,
- filter.name(), filterid);
+ new MessageFilterListBoxText(m_existingFilters, filter.name(), filterid);
return;
}
// iterate over all the existing filters
- for (Q3ListBoxItem* currentLBT = m_existingFilters->firstItem();
- currentLBT;
- currentLBT = currentLBT->next())
+ int numFiltRows = m_existingFilters->count();
+ for (int row = 0; row < numFiltRows; ++row)
{
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*)m_existingFilters->item(row);
// check if this is the removed filter
- if (((MessageFilterListBoxText*)currentLBT)->data() > filterid)
+ if (item->data() > filterid)
{
// add a new message filter at the appropriate location
// NOTE: This maintains list order during an item update
- new MessageFilterListBoxText(m_existingFilters, currentLBT->prev(),
- filter.name(), filterid);
-
+ m_existingFilters->insertItem(row,
+ new MessageFilterListBoxText(nullptr, filter.name(), filterid));
break;
}
else
@@ -406,10 +431,10 @@
{
//if we're at the end of the list and still haven't inserted, we need
//to do it, otherwise, it won't get added to the list.
- if (currentLBT->next() == 0)
+ if (row + 1 == numFiltRows)
{
- new MessageFilterListBoxText(m_existingFilters, currentLBT,
- filter.name(), filterid);
+ m_existingFilters->addItem(
+ new MessageFilterListBoxText(nullptr, filter.name(), filterid));
break;
}
}
@@ -437,7 +462,7 @@
{
uint32_t type;
uint64_t types = 0;
-
+
// buttons should only be enabled for valid message filter content
if (!m_name->text().isEmpty() &&
!m_pattern->text().isEmpty() &&
@@ -444,29 +469,29 @@
QRegExp(m_pattern->text()).isValid())
{
// iterate over all the message types
- for (Q3ListBoxItem* currentLBT = m_messageTypes->firstItem();
- currentLBT;
- currentLBT = currentLBT->next())
+ int numRows = m_messageTypes->count();
+ for (int row = 0; row < numRows; ++row)
{
- // is the current item selected
- if (currentLBT->isSelected())
- {
- // get the items message type
- type = ((MessageFilterListBoxText*)currentLBT)->data();
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*)m_messageTypes->item(row);
+ // is the current item selected
+ if (item->isSelected())
+ {
+ // get the items message type
+ type = item->data();
- // add the message type into the message types
- types |= (uint64_t(1) << type);
+ // add the message type into the message types
+ types |= (uint64_t(1) << type);
- // found a selected item, fields are valid for update
- update = true;
- }
+ // found a selected item, fields are valid for update
+ update = true;
+ }
}
// only enable add if the filter is different from its predecessor
- if ((m_name->text() != m_currentFilter->name()) ||
- (m_pattern->text() != m_currentFilter->regexp().pattern()) ||
- (types != m_currentFilter->types()))
- add = true;
+ if ((m_name->text() != m_currentFilter->name()) ||
+ (m_pattern->text() != m_currentFilter->regexp().pattern()) ||
+ (types != m_currentFilter->types()))
+ add = true;
}
}
@@ -477,17 +502,17 @@
!m_pattern->text().isEmpty())
{
// iterate over all the message types
- for (Q3ListBoxItem* currentLBT = m_messageTypes->firstItem();
- currentLBT;
- currentLBT = currentLBT->next())
+ int numRows = m_messageTypes->count();
+ for (int row = 0; row < numRows; ++row)
{
- // if the item isn't selected, try the next item
- if (!currentLBT->isSelected())
- continue;
-
- // found a selected item, fields are valid for add
- add = true;
- break;
+ MessageFilterListBoxText* item = (MessageFilterListBoxText*)m_messageTypes->item(row);
+ // if the item isn't selected, try the next item
+ if (!item->isSelected())
+ continue;
+
+ // found a selected item, fields are valid for add
+ add = true;
+ break;
}
}
}
Modified: showeq/branches/pre_6_0_beta/src/messagefilterdialog.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagefilterdialog.h 2020-10-28 00:32:47 UTC (rev 1083)
+++ showeq/branches/pre_6_0_beta/src/messagefilterdialog.h 2020-10-28 00:32:56 UTC (rev 1084)
@@ -37,9 +37,10 @@
class QLineEdit;
class QLabel;
class QPushButton;
-class Q3ListBox;
-class Q3ListBoxItem;
+class QListWidget;
+class QListWidgetItem;
class QGroupBox;
+class QItemSelection;
//----------------------------------------------------------------------
// MessageFilterDialog
@@ -59,8 +60,10 @@
protected slots:
void anyTextChanged(const QString& newText);
- void messageTypeSelectionChanged();
- void existingFilterSelectionChanged(Q3ListBoxItem * item);
+ void messageTypeSelectionChanged(const QItemSelection& selected,
+ const QItemSelection& deselected);
+ void existingFilterSelectionChanged(const QItemSelection& selected,
+ const QItemSelection& deselected);
void removedFilter(uint32_t mask, uint8_t filter);
void addedFilter(uint32_t mask, uint8_t filterid, const MessageFilter& filter);
@@ -69,12 +72,12 @@
void checkState();
MessageFilters* m_filters;
- Q3ListBox* m_existingFilters;
+ QListWidget* m_existingFilters;
QPushButton* m_new;
QGroupBox* m_filterGroup;
QLineEdit* m_name;
QLineEdit* m_pattern;
- Q3ListBox* m_messageTypes;
+ QListWidget* m_messageTypes;
QPushButton* m_add;
QPushButton* m_update;
QPushButton* m_delete;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-28 00:32:50
|
Revision: 1083
http://sourceforge.net/p/seq/svn/1083
Author: cn187
Date: 2020-10-28 00:32:47 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
Bring opened/undocked windows to front
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/interface.cpp
Modified: showeq/branches/pre_6_0_beta/src/interface.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-28 00:32:23 UTC (rev 1082)
+++ showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-28 00:32:47 UTC (rev 1083)
@@ -2749,7 +2749,10 @@
if (docked)
widget->dock();
else
+ {
widget->undock();
+ widget->activateWindow();
+ }
// make the widget update it's geometry
widget->updateGeometry();
@@ -5723,6 +5726,7 @@
// make sure it's visible
m_map[i]->show();
+ m_map[i]->activateWindow();
}
void EQInterface::showMessageWindow(int i)
@@ -5772,6 +5776,8 @@
// make sure it's visible
m_messageWindow[i]->show();
+ m_messageWindow[i]->activateWindow();
+
}
void EQInterface::showSpawnList(void)
@@ -5819,6 +5825,7 @@
// make sure it's visible
m_spawnList->show();
+ m_spawnList->activateWindow();
}
void EQInterface::showSpawnList2(void)
@@ -5866,6 +5873,7 @@
// make sure it's visible
m_spawnList2->show();
+ m_spawnList2->activateWindow();
}
void EQInterface::showSpawnPointList(void)
@@ -5907,6 +5915,7 @@
// make sure it's visible
m_spawnPointList->show();
+ m_spawnPointList->activateWindow();
}
void EQInterface::showStatList(void)
@@ -5946,6 +5955,7 @@
// make sure it's visible
m_statList->show();
+ m_statList->activateWindow();
}
void EQInterface::showSkillList(void)
@@ -5985,6 +5995,7 @@
// make sure it's visible
m_skillList->show();
+ m_skillList->activateWindow();
}
void EQInterface::showSpellList(void)
@@ -6034,6 +6045,7 @@
// make sure it's visible
m_spellList->show();
+ m_spellList->activateWindow();
}
void EQInterface::showCompass(void)
@@ -6072,6 +6084,7 @@
// make sure it's visible
m_compass->show();
+ m_compass->activateWindow();
}
void EQInterface::showNetDiag()
@@ -6105,6 +6118,7 @@
// make sure it's visible
m_netDiag->show();
+ m_netDiag->activateWindow();
}
void EQInterface::showGuildList(void)
@@ -6139,6 +6153,7 @@
// make sure it's visible
m_guildListWindow->show();
+ m_guildListWindow->activateWindow();
}
void EQInterface::createFilteredSpawnLog(void)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-28 00:32:33
|
Revision: 1082
http://sourceforge.net/p/seq/svn/1082
Author: cn187
Date: 2020-10-28 00:32:23 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
Replace Q3Frame with QFrame
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/interface.h
showeq/branches/pre_6_0_beta/src/map.cpp
showeq/branches/pre_6_0_beta/src/map.h
showeq/branches/pre_6_0_beta/src/messagewindow.cpp
Modified: showeq/branches/pre_6_0_beta/src/interface.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.h 2020-10-28 00:32:16 UTC (rev 1081)
+++ showeq/branches/pre_6_0_beta/src/interface.h 2020-10-28 00:32:23 UTC (rev 1082)
@@ -25,7 +25,6 @@
#include <QWidget>
#include <QPushButton>
-#include <Q3Frame>
#include <QLabel>
#include <Q3ListView>
#include <QLayout>
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-28 00:32:16 UTC (rev 1081)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-28 00:32:23 UTC (rev 1082)
@@ -76,7 +76,7 @@
#include <QPaintEvent>
#include <QVBoxLayout>
#include <QPolygon>
-#include <Q3Frame>
+#include <QFrame>
#include <QResizeEvent>
#include <QLabel>
#include <QHBoxLayout>
@@ -141,8 +141,8 @@
m_LineColor->setFixedWidth(m_LineColor->sizeHint().width());
row1Layout->addWidget(m_LineColor, 0, Qt::AlignLeft);
- m_ColorPreview = new Q3Frame(this);
- m_ColorPreview->setFrameStyle(Q3Frame::Box|Q3Frame::Raised);
+ m_ColorPreview = new QFrame(this);
+ m_ColorPreview->setFrameStyle(QFrame::Box|QFrame::Raised);
m_ColorPreview->setFixedWidth(50);
m_ColorPreview->setFixedHeight(m_LineColor->sizeHint().height());
m_ColorPreview->setPalette(QPalette(QColor(Qt::gray)));
@@ -204,7 +204,7 @@
m_Map = map;
setMargin( 1 );
setIndent( 0 );
- setFrameStyle( Q3Frame::Plain | Q3Frame::Box );
+ setFrameStyle( QFrame::Plain | QFrame::Box );
setLineWidth( 1 );
setAlignment( Qt::AlignLeft | Qt::AlignTop );
polish();
@@ -4682,7 +4682,7 @@
tmpLabel->setText("You:");
playerLocationBoxLayout->addWidget(tmpLabel);
m_playerLocation = new QLabel(m_playerLocationBox);
- m_playerLocation->setFrameStyle(Q3Frame::Panel | Q3Frame::Sunken);
+ m_playerLocation->setFrameStyle(QFrame::Panel | QFrame::Sunken);
m_playerLocation->setText("0 0 0 ");
m_playerLocation->setMinimumWidth(90);
playerLocationBoxLayout->addWidget(m_playerLocation);
@@ -4710,7 +4710,7 @@
tmpLabel->setText("Cursor:");
mouseLocationBoxLayout->addWidget(tmpLabel);
m_mouseLocation = new QLabel(m_mouseLocationBox);
- m_mouseLocation->setFrameStyle(Q3Frame::Panel | Q3Frame::Sunken);
+ m_mouseLocation->setFrameStyle(QFrame::Panel | QFrame::Sunken);
m_mouseLocation->setText("0 0 ");
m_mouseLocation->setMinimumWidth(90);
mouseLocationBoxLayout->addWidget(m_mouseLocation);
Modified: showeq/branches/pre_6_0_beta/src/map.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.h 2020-10-28 00:32:16 UTC (rev 1081)
+++ showeq/branches/pre_6_0_beta/src/map.h 2020-10-28 00:32:23 UTC (rev 1082)
@@ -57,7 +57,7 @@
#include <QMouseEvent>
#include <QEvent>
#include <QVBoxLayout>
-#include <Q3Frame>
+#include <QFrame>
#include <QPaintEvent>
#include <ctime>
@@ -120,7 +120,7 @@
QComboBox *m_LineColor;
QLineEdit *m_LineName;
- Q3Frame *m_ColorPreview;
+ QFrame *m_ColorPreview;
public slots:
void changeColor(const QString &);
};
Modified: showeq/branches/pre_6_0_beta/src/messagewindow.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-28 00:32:16 UTC (rev 1081)
+++ showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-28 00:32:23 UTC (rev 1082)
@@ -44,7 +44,7 @@
#include <QKeyEvent>
#include <QGridLayout>
#include <QFormLayout>
-#include <Q3Frame>
+#include <QFrame>
#include <QMouseEvent>
#include <QEvent>
@@ -296,8 +296,8 @@
QVBoxLayout * exampleBoxLayout = new QVBoxLayout(exampleBox);
m_example = new QLabel(caption, exampleBox, "example");
- m_example->setFrameShape(Q3Frame::Box);
- m_example->setFrameShadow(Q3Frame::Sunken);
+ m_example->setFrameShape(QFrame::Box);
+ m_example->setFrameShadow(QFrame::Sunken);
if (m_style.color().isValid())
m_example->setPaletteForegroundColor(m_style.color());
else
@@ -474,7 +474,7 @@
setWidget(m_messageWindow);
// set the message window frame style
- m_messageWindow->setFrameStyle(Q3Frame::Panel | Q3Frame::Sunken);
+ m_messageWindow->setFrameStyle(QFrame::Panel | QFrame::Sunken);
// set the current font
m_messageWindow->setCurrentFont(font());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-28 00:32:19
|
Revision: 1081
http://sourceforge.net/p/seq/svn/1081
Author: cn187
Date: 2020-10-28 00:32:16 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
Replace Q3Button with QPushButton
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/category.cpp
showeq/branches/pre_6_0_beta/src/category.h
Modified: showeq/branches/pre_6_0_beta/src/category.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/category.cpp 2020-10-28 00:32:07 UTC (rev 1080)
+++ showeq/branches/pre_6_0_beta/src/category.cpp 2020-10-28 00:32:16 UTC (rev 1081)
@@ -111,7 +111,7 @@
colorLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
row1Layout->addWidget(colorLabel, 0, Qt::AlignLeft);
- m_Color = (Q3Button*) new QPushButton(this, "color");
+ m_Color = new QPushButton(this, "color");
m_Color->setText("...");
m_Color->setFont(labelFont);
connect(m_Color, SIGNAL(clicked()),
Modified: showeq/branches/pre_6_0_beta/src/category.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/category.h 2020-10-28 00:32:07 UTC (rev 1080)
+++ showeq/branches/pre_6_0_beta/src/category.h 2020-10-28 00:32:16 UTC (rev 1081)
@@ -46,7 +46,6 @@
#include <QLabel>
#include <QLayout>
#include <QPushButton>
-#include <Q3Button>
//----------------------------------------------------------------------
// forward declarations
@@ -99,7 +98,7 @@
QLineEdit* m_Name;
QLineEdit* m_Filter;
QLineEdit* m_FilterOut;
- Q3Button* m_Color;
+ QPushButton* m_Color;
};
typedef QList<Category*> CategoryList;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-28 00:32:09
|
Revision: 1080
http://sourceforge.net/p/seq/svn/1080
Author: cn187
Date: 2020-10-28 00:32:07 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
Don't disable map control toggles when controls aren't visible
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/map.cpp
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-28 00:31:56 UTC (rev 1079)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-28 00:32:07 UTC (rev 1080)
@@ -5059,7 +5059,6 @@
void MapFrame::init_Menu(void)
{
QMenu* mapMenu = m_map->menu();
- m_action_topControl_Options->setEnabled(m_topControlBox->isVisible());
m_action_topControl->setChecked(m_topControlBox->isVisible());
if (m_topControlBox->isVisible())
{
@@ -5069,7 +5068,6 @@
m_action_filter->setChecked(m_filterBox->isVisible());
}
- m_action_bottomControl_Options->setEnabled(m_bottomControlBox->isVisible());
m_action_bottomControl->setChecked(m_bottomControlBox->isVisible());
if (m_bottomControlBox->isVisible())
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-28 00:31:59
|
Revision: 1079
http://sourceforge.net/p/seq/svn/1079
Author: cn187
Date: 2020-10-28 00:31:56 +0000 (Wed, 28 Oct 2020)
Log Message:
-----------
Replace Q3VBox/Q3HBox with QVBoxLayout/QHBoxLayout
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/category.h
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/compassframe.h
showeq/branches/pre_6_0_beta/src/experiencelog.cpp
showeq/branches/pre_6_0_beta/src/interface.h
showeq/branches/pre_6_0_beta/src/map.cpp
showeq/branches/pre_6_0_beta/src/map.h
showeq/branches/pre_6_0_beta/src/spawnlist.h
Modified: showeq/branches/pre_6_0_beta/src/category.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/category.h 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/category.h 2020-10-28 00:31:56 UTC (rev 1079)
@@ -45,8 +45,6 @@
#include <QComboBox>
#include <QLabel>
#include <QLayout>
-#include <Q3HBox>
-#include <Q3VBox>
#include <QPushButton>
#include <Q3Button>
Modified: showeq/branches/pre_6_0_beta/src/combatlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-28 00:31:56 UTC (rev 1079)
@@ -26,7 +26,6 @@
#include "diagnosticmessages.h"
#include <QTimer>
-#include <Q3HBox>
#include <QGroupBox>
#include <QMessageBox>
#include <QLayout>
Modified: showeq/branches/pre_6_0_beta/src/compassframe.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/compassframe.cpp 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/compassframe.cpp 2020-10-28 00:31:56 UTC (rev 1079)
@@ -34,7 +34,8 @@
QVBoxLayout* layout = new QVBoxLayout(boxLayout());
m_compass = new Compass (this, "compass");
layout->addWidget(m_compass);
- Q3HBox* coordsbox = new Q3HBox(this);
+ QWidget* coordsbox = new QWidget(this);
+ QHBoxLayout* coordsboxLayout = new QHBoxLayout(coordsbox);
layout->addWidget(coordsbox);
m_compass->setFixedWidth(120);
m_compass->setFixedHeight(120);
@@ -45,39 +46,45 @@
{
// Create the x: label
QLabel *labelx = new QLabel(showeq_params->retarded_coords?"E/W:":"X:",
- coordsbox);
+ this);
labelx->setFixedHeight(labelx->sizeHint().height());
labelx->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
-
+ coordsboxLayout->addWidget(labelx);
+
// Create the xpos label
- m_x = new QLabel("----",coordsbox);
+ m_x = new QLabel("----", this);
m_x->setFixedHeight(m_x->sizeHint().height());
m_x->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
- }
- else
+ coordsboxLayout->addWidget(m_x);
+ }
+ else
{
// Create the y: label
QLabel *labely = new QLabel(showeq_params->retarded_coords?"N/S:":"Y:",
- coordsbox);
+ this);
labely->setFixedHeight(labely->sizeHint().height());
labely->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
-
+ coordsboxLayout->addWidget(labely);
+
// Create the ypos label
- m_y = new QLabel("----",coordsbox);
+ m_y = new QLabel("----", this);
m_y->setFixedHeight(m_y->sizeHint().height());
m_y->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+ coordsboxLayout->addWidget(m_y);
}
}
-
+
// Create the z: label
- QLabel *labelz = new QLabel("Z:",coordsbox);
+ QLabel *labelz = new QLabel("Z:", this);
labelz->setFixedHeight(labelz->sizeHint().height());
labelz->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
-
+ coordsboxLayout->addWidget(labelz);
+
// Create the zpos label
- m_z = new QLabel("----",coordsbox);
- m_z->setFixedHeight(m_z->sizeHint().height());
+ m_z = new QLabel("----", this);
+ m_z->setFixedHeight(m_z->sizeHint().height());
m_z->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+ coordsboxLayout->addWidget(m_z);
// connect
connect(player, SIGNAL(posChanged(int16_t,int16_t,int16_t,
Modified: showeq/branches/pre_6_0_beta/src/compassframe.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/compassframe.h 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/compassframe.h 2020-10-28 00:31:56 UTC (rev 1079)
@@ -23,8 +23,6 @@
#ifndef _COMPASSFRAME_H_
#define _COMPASSFRAME_H_
-#include <Q3HBox>
-#include <Q3VBox>
#include <QLabel>
#include "player.h"
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-28 00:31:56 UTC (rev 1079)
@@ -34,7 +34,6 @@
#include <ctime>
#include <QTimer>
-#include <Q3HBox>
#include <QGroupBox>
#include <QMessageBox>
#include <QFileInfo>
Modified: showeq/branches/pre_6_0_beta/src/interface.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.h 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/interface.h 2020-10-28 00:31:56 UTC (rev 1079)
@@ -32,8 +32,6 @@
#include <QMenuBar>
#include <QMenu>
#include <Q3MainWindow>
-#include <Q3HBox>
-#include <Q3VBox>
#include <QSplitter>
#include <QList>
#include <QTimer>
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-28 00:31:56 UTC (rev 1079)
@@ -1011,14 +1011,19 @@
m_action_drawSizeMenu = addMenu(subMenu);
subMenu = new QMenu("Player FOV");
- Q3HBox* tmpHBox = new Q3HBox(subMenu);
+ QWidget* tmpHBox = new QWidget(subMenu);
+ QHBoxLayout* tmpHBoxLayout = new QHBoxLayout(tmpHBox);
+ tmpHBoxLayout->setContentsMargins(1, 1, 1, 1);
m_fovSpinBoxLabel = new QLabel("Distance:", tmpHBox);
m_fovSpinBox = new QSpinBox(20, 1200, 20, tmpHBox, "FOV");
+ tmpHBoxLayout->addWidget(m_fovSpinBoxLabel);
+ tmpHBoxLayout->addWidget(m_fovSpinBox);
m_fovSpinBox->setValue(m_mapIcons->fovDistance());
connect(m_fovSpinBox, SIGNAL(valueChanged(int)),
m_mapIcons, SLOT(setFOVDistance(int)));
QWidgetAction* fovSpinBoxAction = new QWidgetAction(tmpHBox);
fovSpinBoxAction->setDefaultWidget(tmpHBox);
+
subMenu->addAction(fovSpinBoxAction);
m_action_FOVColor = subMenu->addAction("Color...",
this, SLOT(select_fovColor()));
@@ -4606,14 +4611,15 @@
m_vertical = new QVBoxLayout(boxLayout());
// setup the top control window
- m_topControlBox = new Q3HBox(this);
- m_vertical->addWidget(m_topControlBox);
- m_topControlBox->setSpacing(1);
- m_topControlBox->setMargin(0);
+ m_topControlBox = new QWidget(this);
+ QHBoxLayout* topControlBoxLayout = new QHBoxLayout(m_topControlBox);
+ topControlBoxLayout->setSpacing(1);
+ topControlBoxLayout->setMargin(0);
m_topControlBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
tmpPrefString = "ShowTopControlBox";
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, 1))
m_topControlBox->hide();
+ m_vertical->addWidget(m_topControlBox);
// setup runtime filter
m_filterMgr->registerRuntimeFilter(m_mapPreferenceName,
@@ -4627,26 +4633,37 @@
m_vertical->addWidget(m_map);
// setup bottom control window
- m_bottomControlBox = new Q3HBox(this);
- m_vertical->addWidget(m_bottomControlBox);
- m_bottomControlBox->setSpacing(1);
- m_bottomControlBox->setMargin(0);
+ m_bottomControlBox = new QWidget(this);
+ QHBoxLayout* bottomControlBoxLayout = new QHBoxLayout(m_bottomControlBox);
+ bottomControlBoxLayout->setSpacing(1);
+ bottomControlBoxLayout->setMargin(0);
m_bottomControlBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
tmpPrefString = "ShowBottomControlBox";
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, 1))
m_bottomControlBox->hide();
+ m_vertical->addWidget(m_bottomControlBox);
-
+
// setup Zoom control
- m_zoomBox = new Q3HBox(m_topControlBox);
+ m_zoomBox = new QWidget(m_topControlBox);
+ m_zoomBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ QHBoxLayout* zoomBoxLayout = new QHBoxLayout(m_zoomBox);
+ zoomBoxLayout->setSpacing(1);
+ zoomBoxLayout->setMargin(0);
tmpLabel = new QLabel(m_zoomBox);
tmpLabel->setText("Zoom:");
+ zoomBoxLayout->addWidget(tmpLabel);
m_zoom = new QSpinBox(1, 32, 1, m_zoomBox);
m_zoom->setWrapping(true);
m_zoom->setSuffix("x");
m_zoom->setValue(m_map->zoom());
+ zoomBoxLayout->addWidget(m_zoom);
tmpLabel->setBuddy(m_zoom);
tmpPrefString = "ShowZoom";
+ //minimum width should be the sum of all the minimum widths of the components
+ //minimum height should be the minimum height of the tallest component
+ m_zoomBox->setMinimumSize(tmpLabel->minimumSizeHint().width() + m_zoom->minimumSizeHint().width(),
+ qMax(tmpLabel->minimumSizeHint().height(), m_zoom->minimumSizeHint().height()));
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, 1))
m_zoomBox->hide();
connect(m_zoom, SIGNAL(valueChanged(int)),
@@ -4653,17 +4670,28 @@
m_map, SLOT(setZoom(int)));
connect(m_map, SIGNAL(zoomChanged(int)),
m_zoom, SLOT(setValue(int)));
+ topControlBoxLayout->addWidget(m_zoomBox);
// setup Player Location display
- m_playerLocationBox = new Q3HBox(m_topControlBox);
+ m_playerLocationBox = new QWidget(m_topControlBox);
+ m_playerLocationBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ QHBoxLayout* playerLocationBoxLayout = new QHBoxLayout(m_playerLocationBox);
+ playerLocationBoxLayout->setSpacing(1);
+ playerLocationBoxLayout->setMargin(0);
tmpLabel = new QLabel(m_playerLocationBox);
tmpLabel->setText("You:");
+ playerLocationBoxLayout->addWidget(tmpLabel);
m_playerLocation = new QLabel(m_playerLocationBox);
m_playerLocation->setFrameStyle(Q3Frame::Panel | Q3Frame::Sunken);
m_playerLocation->setText("0 0 0 ");
m_playerLocation->setMinimumWidth(90);
+ playerLocationBoxLayout->addWidget(m_playerLocation);
tmpLabel->setBuddy(m_playerLocation);
tmpPrefString = "ShowPlayerLocation";
+ //minimum width should be the sum of all the minimum widths of the components
+ //minimum height should be the minimum height of the tallest component
+ m_playerLocationBox->setMinimumSize(tmpLabel->minimumSizeHint().width() + m_playerLocation->minimumSizeHint().width(),
+ qMax(tmpLabel->minimumSizeHint().height(), m_playerLocation->minimumSizeHint().height()));
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, false))
m_playerLocationBox->hide();
connect (player, SIGNAL(posChanged(int16_t,int16_t,int16_t,
@@ -4670,30 +4698,52 @@
int16_t,int16_t,int16_t,int32_t)),
this, SLOT(setPlayer(int16_t,int16_t,int16_t,
int16_t,int16_t,int16_t,int32_t)));
+ topControlBoxLayout->addWidget(m_playerLocationBox);
// setup Mouse Location display
- m_mouseLocationBox = new Q3HBox(m_topControlBox);
+ m_mouseLocationBox = new QWidget(m_topControlBox);
+ m_mouseLocationBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ QHBoxLayout* mouseLocationBoxLayout = new QHBoxLayout(m_mouseLocationBox);
+ mouseLocationBoxLayout->setSpacing(1);
+ mouseLocationBoxLayout->setMargin(0);
tmpLabel = new QLabel(m_mouseLocationBox);
tmpLabel->setText("Cursor:");
+ mouseLocationBoxLayout->addWidget(tmpLabel);
m_mouseLocation = new QLabel(m_mouseLocationBox);
m_mouseLocation->setFrameStyle(Q3Frame::Panel | Q3Frame::Sunken);
m_mouseLocation->setText("0 0 ");
- m_mouseLocation->setMinimumWidth(70);
+ m_mouseLocation->setMinimumWidth(90);
+ mouseLocationBoxLayout->addWidget(m_mouseLocation);
tmpLabel->setBuddy(m_mouseLocationBox);
tmpPrefString = "ShowMouseLocation";
+ //minimum width should be the sum of all the minimum widths of the components
+ //minimum height should be the minimum height of the tallest component
+ m_mouseLocationBox->setMinimumSize(tmpLabel->minimumSizeHint().width() +
+ m_mouseLocation->minimumWidth(),
+ qMax(tmpLabel->minimumSizeHint().height(), m_mouseLocation->minimumSizeHint().height()));
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, 1))
m_mouseLocationBox->hide();
connect (m_map, SIGNAL(mouseLocation(int16_t, int16_t)),
this, SLOT(mouseLocation(int16_t, int16_t)));
+ topControlBoxLayout->addWidget(m_mouseLocationBox);
// setup Filter
- m_filterBox = new Q3HBox(m_topControlBox);
+ m_filterBox = new QWidget(m_topControlBox);
+ m_filterBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ QHBoxLayout* filterBoxLayout = new QHBoxLayout(m_filterBox);
+ filterBoxLayout->setSpacing(1);
+ filterBoxLayout->setMargin(0);
tmpLabel = new QLabel(m_filterBox);
tmpLabel->setText("Find:");
+ filterBoxLayout->addWidget(tmpLabel);
m_filter = new MapFilterLineEdit(m_filterBox);
- // m_filter->setAlignment(Qt::AlignCenter);
+ filterBoxLayout->addWidget(m_filter);
tmpLabel->setBuddy(m_filter);
tmpPrefString = "ShowFilter";
+ //minimum width should be the sum of all the minimum widths of the components
+ //minimum height should be the minimum height of the tallest component
+ m_filterBox->setMinimumSize(tmpLabel->minimumSizeHint().width() + m_filter->minimumSizeHint().width(),
+ qMax(tmpLabel->minimumSizeHint().height(), m_filter->minimumSizeHint().height()));
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, 1))
m_filterBox->hide();
#ifdef MAPFRAME_IMMEDIATE_REGEX
@@ -4703,17 +4753,28 @@
connect (m_filter, SIGNAL(returnPressed()),
this, SLOT(filterConfirmed()));
#endif
+ topControlBoxLayout->addWidget(m_filterBox);
// setup Frame Rate control
- m_frameRateBox = new Q3HBox(m_bottomControlBox);
+ m_frameRateBox = new QWidget(m_bottomControlBox);
+ m_frameRateBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ QHBoxLayout* frameRateBoxLayout = new QHBoxLayout(m_frameRateBox);
+ frameRateBoxLayout->setSpacing(1);
+ frameRateBoxLayout->setMargin(0);
tmpLabel = new QLabel(m_frameRateBox);
tmpLabel->setText("Frame Rate:");
+ frameRateBoxLayout->addWidget(tmpLabel);
m_frameRate = new QSpinBox(1, 60, 1, m_frameRateBox);
m_frameRate->setWrapping(true);
m_frameRate->setSuffix(" fps");
m_frameRate->setValue(m_map->frameRate());
+ frameRateBoxLayout->addWidget(m_frameRate);
tmpLabel->setBuddy(m_frameRate);
tmpPrefString = "ShowFrameRate";
+ //minimum width should be the sum of all the minimum widths of the components
+ //minimum height should be the minimum height of the tallest component
+ m_frameRateBox->setMinimumSize(tmpLabel->minimumSizeHint().width() + m_frameRate->minimumSizeHint().width(),
+ qMax(tmpLabel->minimumSizeHint().height(), m_frameRate->minimumSizeHint().height()));
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, 1))
m_frameRateBox->hide();
m_frameRate->setValue(m_map->frameRate());
@@ -4721,18 +4782,40 @@
m_map, SLOT(setFrameRate(int)));
connect(m_map, SIGNAL(frameRateChanged(int)),
m_frameRate, SLOT(setValue(int)));
+ bottomControlBoxLayout->addWidget(m_frameRateBox);
// setup Pan Controls
- m_panBox = new Q3HBox(m_bottomControlBox);
+ m_panBox = new QWidget(m_bottomControlBox);
+ m_panBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ QHBoxLayout* panBoxLayout = new QHBoxLayout(m_panBox);
+ panBoxLayout->setSpacing(1);
+ panBoxLayout->setMargin(0);
tmpLabel = new QLabel(m_panBox);
tmpLabel->setText("Pan X:");
+ QSize panXLabelMinSize = tmpLabel->minimumSizeHint();
+ panBoxLayout->addWidget(tmpLabel);
m_panX = new QSpinBox(-8192, 8192, 16, m_panBox);
m_panX->setValue(m_map->panOffsetX());
+ panBoxLayout->addWidget(m_panX);
tmpLabel = new QLabel(m_panBox);
tmpLabel->setText("Y:");
+ QSize panYLabelMinSize = tmpLabel->minimumSizeHint();
+ panBoxLayout->addWidget(tmpLabel);
m_panY = new QSpinBox(-8192, 8192, 16, m_panBox);
m_panY->setValue(m_map->panOffsetY());
+ panBoxLayout->addWidget(m_panY);
tmpPrefString = "ShowPanControls";
+ //minimum width should be the sum of all the minimum widths of the components
+ //minimum height should be the minimum height of the tallest component
+ m_panBox->setMinimumSize(
+ //width
+ panXLabelMinSize.width() + m_panX->minimumSizeHint().width() +
+ panYLabelMinSize.width() + m_panY->minimumSizeHint().width(),
+ //height
+ qMax(panYLabelMinSize.height(),
+ qMax(m_panY->minimumSizeHint().height(),
+ qMax(panXLabelMinSize.height(),
+ m_panX->minimumSizeHint().height()))));
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString, 1))
m_panBox->hide();
connect(m_panX, SIGNAL(valueChanged(int)),
@@ -4743,17 +4826,41 @@
m_panX, SLOT(setValue(int)));
connect(m_map, SIGNAL(panYChanged(int)),
m_panY, SLOT(setValue(int)));
+ bottomControlBoxLayout->addWidget(m_panBox);
- m_depthControlBox = new Q3HBox(m_bottomControlBox);
+ m_depthControlBox = new QWidget(m_bottomControlBox);
+ m_depthControlBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ QHBoxLayout* depthControlBoxLayout = new QHBoxLayout(m_depthControlBox);
+ depthControlBoxLayout->setSpacing(1);
+ depthControlBoxLayout->setMargin(0);
tmpLabel = new QLabel(m_depthControlBox);
tmpLabel->setText("Head:");
+ QSize depthHeadLabelMinSize = tmpLabel->minimumSizeHint();
+ depthControlBoxLayout->addWidget(tmpLabel);
m_head = new QSpinBox(5, 3000, 10, m_depthControlBox);
m_head->setValue(m_map->headRoom());
+ depthControlBoxLayout->addWidget(m_head);
tmpLabel = new QLabel(m_depthControlBox);
tmpLabel->setText("Floor:");
+ QSize depthFloorLabelMinSize = tmpLabel->minimumSizeHint();
+ depthControlBoxLayout->addWidget(tmpLabel);
m_floor = new QSpinBox(5, 3000, 10, m_depthControlBox);
m_floor->setValue(m_map->floorRoom());
+ depthControlBoxLayout->addWidget(m_floor);
tmpPrefString = "ShowDepthFilterControls";
+ //minimum width should be the sum of all the minimum widths of the components
+ //minimum height should be the minimum height of the tallest component
+ m_depthControlBox->setMinimumSize(
+ //width
+ depthHeadLabelMinSize.width() +
+ m_panX->minimumSizeHint().width() +
+ depthFloorLabelMinSize.width() +
+ m_floor->minimumSizeHint().width(),
+ //height
+ qMax(depthHeadLabelMinSize.height(),
+ qMax(m_panX->minimumSizeHint().height(),
+ qMax(depthFloorLabelMinSize.height(),
+ m_floor->minimumSizeHint().height()))));
if (!pSEQPrefs->getPrefBool(tmpPrefString, prefString,
(m_map->mapLineStyle() == tMap_DepthFiltered)))
m_depthControlBox->hide();
@@ -4765,6 +4872,7 @@
m_map, SLOT(setFloorRoom(int)));
connect(m_map, SIGNAL(floorRoomChanged(int)),
m_floor, SLOT(setValue(int)));
+ bottomControlBoxLayout->addWidget(m_depthControlBox);
// add our own menu items to the maps menu
QMenu* mapMenu = m_map->menu();
Modified: showeq/branches/pre_6_0_beta/src/map.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.h 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/map.h 2020-10-28 00:31:56 UTC (rev 1079)
@@ -50,8 +50,6 @@
// includes required for MapFrame
#include <QLayout>
-#include <Q3VBox>
-#include <Q3HBox>
#include <QSpinBox>
#include <QList>
@@ -749,23 +747,23 @@
QString m_mapPreferenceName;
QVBoxLayout* m_vertical;
- Q3HBox* m_topControlBox;
- Q3HBox* m_zoomBox;
+ QWidget* m_topControlBox;
+ QWidget* m_zoomBox;
QSpinBox* m_zoom;
- Q3HBox* m_playerLocationBox;
+ QWidget* m_playerLocationBox;
QLabel* m_playerLocation;
- Q3HBox* m_mouseLocationBox;
+ QWidget* m_mouseLocationBox;
QLabel* m_mouseLocation;
- Q3HBox* m_filterBox;
+ QWidget* m_filterBox;
MapFilterLineEdit* m_filter;
- Q3HBox* m_bottomControlBox;
- Q3HBox* m_frameRateBox;
+ QWidget* m_bottomControlBox;
+ QWidget* m_frameRateBox;
QSpinBox* m_frameRate;
- Q3HBox* m_panBox;
+ QWidget* m_panBox;
QSpinBox* m_panX;
QSpinBox* m_panY;
- Q3HBox* m_depthControlBox;
+ QWidget* m_depthControlBox;
QSpinBox* m_head;
QSpinBox* m_floor;
QList<QWidget*> m_statusWidgets;
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.h 2020-10-27 04:48:38 UTC (rev 1078)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.h 2020-10-28 00:31:56 UTC (rev 1079)
@@ -54,8 +54,6 @@
#include <QLabel>
#include <QLayout>
-#include <Q3HBox>
-#include <Q3VBox>
#include <QPushButton>
#include "seqwindow.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-27 04:48:43
|
Revision: 1078
http://sourceforge.net/p/seq/svn/1078
Author: cn187
Date: 2020-10-27 04:48:38 +0000 (Tue, 27 Oct 2020)
Log Message:
-----------
Replace unknown/none payload types in zoneopcodes.xml with uint8_t to silence spammy warnings
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/conf/zoneopcodes.xml
Modified: showeq/branches/pre_6_0_beta/conf/zoneopcodes.xml
===================================================================
--- showeq/branches/pre_6_0_beta/conf/zoneopcodes.xml 2020-10-27 04:15:38 UTC (rev 1077)
+++ showeq/branches/pre_6_0_beta/conf/zoneopcodes.xml 2020-10-27 04:48:38 UTC (rev 1078)
@@ -297,15 +297,15 @@
</opcode>
<opcode id="ffff" name="OP_Logout" updated="12/12/12">
<comment></comment>
- <payload dir="server" typename="none" sizechecktype="match"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="match"/>
</opcode>
<opcode id="ffff" name="OP_UIUpdate" updated="05/21/14">
<comment>Seems to be sent to handle a variety of UI updates - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_GroupMemberList" updated="01/16/13">
<comment>List of group members - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="0e68" name="OP_GuildMemberList" updated="08/19/20">
<comment>List of guild members - Variable length</comment>
@@ -313,75 +313,75 @@
</opcode>
<opcode id="1f68" name="OP_ManaUpdate" updated="08/19/20">
<comment>Mana Update opcode - 10 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="02cf" name="OP_EndUpdate" updated="08/19/20">
<comment>Endurance Update opcode - 10 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Marketplace" updated="11/28/12">
<comment>Marketplace data - Guessing variable length 11444 bytes as of 11/28/12</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_MarketplaceSelect" updated="11/28/12">
<comment>Sent when highlighting an item in Marketplace - 80 bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_DzMembers" updated="11/28/12">
<comment>Expedition Members - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Campfire" updated="11/28/12">
<comment>Fellowship campfire information - 1076 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_SelectCampfire" updated="01/16/13">
<comment>Fellowship campfire Choices - Guessing variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Claims" updated="11/28/12">
<comment>Contents of claims window. /claim then refresh to capture packet - Guessing variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_VoiceChat" updated="11/20/15">
<comment>Voice chat server info - Variable length (Data sent when joining group,raid etc)</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_PollQuestions" updated="11/20/15">
<comment>SOE in-game player poll questions - Variable length</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_PollResponses" updated="11/20/15">
<comment>Poll response choices - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_ShroudProgression" updated="11/20/15">
<comment>Unlocked shrouds - 293 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_ShroudTemplates" updated="10/23/12">
<comment>Shroud templates to choose from on shroud NPC - 18983 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Fellowship" updated="03/13/19">
<comment>Fellowship information - 2576 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="7740" name="OP_ExpandedGuildInfo" updated="08/19/20">
<comment>Guild ranks and other misc guild data - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_GuildBank" updated="11/20/15">
<comment>Guild bank contents - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_OpenTradeskillContainer" updated="11/28/12">
<comment>Opens forge, kiln etc - 92 Bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeskillRecipes" updated="11/28/12">
<comment>Learned recipes - 84 Bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeSkillCombine" updated="11/28/12">
<comment>Tradeskill combine using new tradeskill window - 40 Bytes</comment>
@@ -401,99 +401,99 @@
</opcode>
<opcode id="ffff" name="OP_TaskDescription" updated="11/20/15">
<comment>Task descriptions coming down for task window - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TaskActivity" updated="11/20/15">
<comment>Task activity descriptions coming down for task window - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_CompletedTasks" updated="11/20/15">
<comment>Task history for task window - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_CustomTitles" updated="11/20/15">
<comment>List of available titles - 1520 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Animation" updated="11/28/12">
<comment>Combat animation, emote animations etc - 4 bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_WhoAllRequest" updated="11/28/12">
<comment>WhoAllReqCode - 156 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_WhoAllResponse" updated="11/28/12">
<comment>WhoAllOutputCode - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_InspectRequest" updated="11/28/12">
<comment>InspectRequestCode - 8 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_GetGuildMOTD" updated="11/28/12">
<comment>Request guildMOTD - 648 Bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeRequest" updated="11/28/12">
<comment>You request trade session - 8 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeDeny" updated="11/28/12">
<comment>Target not ready to trade - 12 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeRequestAck" updated="11/28/12">
<comment>Trade request recipient is acknowledging they are able to trade - 8 bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_CancelTrade" updated="11/28/12">
<comment>Cancel a trade window - 8 bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_FinishTrade" updated="11/28/12">
<comment>Trade is over - 12 bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeCoins" updated="11/28/12">
<comment>You put coins put in a trade window - 20 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeCoins2" updated="11/28/12">
<comment>Someone else puts coins put in your trade window - 12 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TradeAcceptClick" updated="11/28/12">
<comment>One side clicks Accept on the trade 8 bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_ItemLinkClick" updated="11/28/12">
<comment>Click on itemlinks - 52 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_LootRequest" updated="11/28/12">
<comment>LootCorpseCode - 4 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_LootItem" updated="11/28/12">
<comment>Loot item from corpse - 20 bytes</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_EndLootRequest" updated="11/28/12">
<comment>DoneLootingCode - 4 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Track" updated="11/28/12">
<comment>Tracking data - Variable length</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_AutoAttack" updated="11/28/12">
<comment>Attack on/off - 4 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_AutoAttack2" updated="11/28/12">
<comment>Attack on/off appears to be same as OP_AutoAttack - 4 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_ClickDoor" updated="11/28/12">
<comment>DoorOpenCode click request from client - 16 bytes</comment>
@@ -509,95 +509,95 @@
</opcode>
<opcode id="ffff" name="OP_Jump" updated="11/28/12">
<comment>JumpCode - 0 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TGB" updated="11/28/12">
<comment>Client telling server to set targetgroupbuff - 4 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Lockouts" updated="10/28/14">
<comment>Expedition lockouts</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_RaidInvite" updated="11/28/12">
<comment>Client side raid invite requests 140 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="1fd5" name="OP_RaidJoin" updated="2/21/14">
<comment>Server side raid information - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Feedback" updated="07/18/12">
<comment>Client sending feedback to server - 1148 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_GuildsList" updated="11/28/12">
<comment>Listing of all guilds. Can be triggered by /lfg search?</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_LFGGetMatchesRequest" updated="11/28/12">
<comment>LFG/LFP client request - 16 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_LFGGetMatchesResponse" updated="11/28/12">
<comment>LFG/LFP server response - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_MercenaryList" updated="11/20/15">
<comment>Listing of hired mercenaries - 648 bytes
- <payload dir="server" typename="unknown" sizechecktype="none"/></comment>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/></comment>
</opcode>
<opcode id="ffff" name="OP_ClickInventory" updated="11/28/12">
<comment>Click items from inventory or armor - 16 bytes 5th byte is Slot ID</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_ClickInventoryAck" updated="11/28/12">
<comment>Server acknowledges click from inventory or armor - 20 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_BuffWindow" updated="11/28/12">
<comment>Changes to buff window or song window - 100 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_ClickBuffOff" updated="11/28/12">
<comment>Client clicks off buff - 8 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_HouseAddress" updated="11/20/15">
<comment>House and guildhall address information - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_HouseContents" updated="11/20/15">
<comment>Server sending house information and contents - variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_FriendsList" updated="11/28/12">
<comment>Server sending friends list contents - variable length (Sent when choosing "Welcome" from EQ button)</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_FriendsOnline" updated="11/28/12">
<comment>Friends currently online - variable length (Sent when choosing "Welcome" form EQ button)</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Rewards" updated="11/28/12">
<comment>Server sending pending rewards - variable length</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_FTPNags" updated="11/20/15">
<comment>Free to play nags and other data - Variable length</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="6c6f" name="OP_Find" updated="08/19/20">
<comment>Find window data - 112 bytes</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_ConsiderCorpse" updated="11/28/12">
<comment>ConCorpseCode - 20 bytes</comment>
- <payload dir="client" typename="unknown" sizechecktype="none"/>
+ <payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_TributeUpdate" updated="11/28/12">
<comment>Tribute and trophy skills - Variable length</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<!-- Below are used to help make sense of the logs when searching for opcodes
@@ -604,15 +604,15 @@
Using these marks unknown opcodes in logs for easier reading -->
<opcode id="ffff" name="OP_Unknown1" updated="04/17/13">
<comment>3 byte opcode that spam logs seemingly only when you have someone targeted. Marked here to make reading logs easier</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Unknown2" updated="04/17/13">
<comment>3 byte opcode that spam logs seemingly only when you have someone targeted. Marked here to make reading logs easier</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_Unknown3" updated="04/17/13">
<comment>3 byte opcode that spam logs seemingly only when you have someone targeted. Marked here to make reading logs easier</comment>
- <payload dir="server" typename="unknown" sizechecktype="none"/>
+ <payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
<!-- Below are unverified -->
@@ -710,7 +710,7 @@
</opcode>
<opcode id="ffff" name="OP_ShopEnd" updated="10/27/05">
<comment>old CloseVendorCode</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_SenseTraps" updated="10/27/05">
<comment></comment>
@@ -729,7 +729,7 @@
</opcode>
<opcode id="ffff" name="OP_ShopRequest" updated="10/27/05">
<comment>old OpenVendorCode</comment>
- <payload dir="both" typename="unknown" sizechecktype="none"/>
+ <payload dir="both" typename="uint8_t" sizechecktype="none"/>
</opcode>
<opcode id="ffff" name="OP_FaceChange" updated="10/27/05">
<comment>/face</comment>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-27 04:15:45
|
Revision: 1077
http://sourceforge.net/p/seq/svn/1077
Author: cn187
Date: 2020-10-27 04:15:38 +0000 (Tue, 27 Oct 2020)
Log Message:
-----------
Replace Q3GroupBox/Q3VGroupBox with QGroupBox + QVBoxLayout
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/combatlog.cpp
showeq/branches/pre_6_0_beta/src/experiencelog.cpp
showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
showeq/branches/pre_6_0_beta/src/messagefilterdialog.h
showeq/branches/pre_6_0_beta/src/messagewindow.cpp
Modified: showeq/branches/pre_6_0_beta/src/combatlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-26 05:04:30 UTC (rev 1076)
+++ showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-27 04:15:38 UTC (rev 1077)
@@ -27,7 +27,7 @@
#include <QTimer>
#include <Q3HBox>
-#include <Q3VGroupBox>
+#include <QGroupBox>
#include <QMessageBox>
#include <QLayout>
#include <QLabel>
@@ -306,10 +306,10 @@
{
QWidget *pWidget = new QWidget(m_tab);
- m_layout_offense = new QVBoxLayout(pWidget);
+ m_layout_offense = new QVBoxLayout(pWidget);
- Q3GroupBox *listGBox = new Q3VGroupBox(pWidget);
- m_layout_offense->addWidget(listGBox);
+ QGroupBox *listGBox = new QGroupBox(pWidget);
+ m_layout_offense->addWidget(listGBox);
m_listview_offense = new SEQListView(preferenceName(), listGBox);
m_listview_offense->addColumn("Type");
@@ -333,34 +333,41 @@
m_listview_offense->setMinimumSize(m_listview_offense->sizeHint().width(), 200);
- Q3GroupBox *summaryGBox = new Q3VGroupBox("Summary", pWidget);
+ QHBoxLayout * listGBoxLayout = new QHBoxLayout(listGBox);
+ listGBoxLayout->addWidget(m_listview_offense);
+
+ QGroupBox *summaryGBox = new QGroupBox("Summary", pWidget);
+ QHBoxLayout *summaryGBoxLayout = new QHBoxLayout(summaryGBox);
+
m_layout_offense->addWidget(summaryGBox);
- QWidget *summaryGrid = new QWidget(summaryGBox);
- QGridLayout *summaryGridLayout = new QGridLayout(summaryGBox);
- summaryGridLayout->addWidget(new QLabel("Total Damage:", summaryGrid), 0, 0);
- m_label_offense_totaldamage = new QLabel(summaryGrid);
+ QGridLayout *summaryGridLayout = new QGridLayout();
+
+ summaryGBoxLayout->addLayout(summaryGridLayout);
+
+ summaryGridLayout->addWidget(new QLabel("Total Damage:", summaryGBox), 0, 0);
+ m_label_offense_totaldamage = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_offense_totaldamage, 0, 1);
- summaryGridLayout->addWidget(new QLabel("Avg Melee:", summaryGrid), 0, 2);
- m_label_offense_avgmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg Melee:", summaryGBox), 0, 2);
+ m_label_offense_avgmelee = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_offense_avgmelee, 0, 3);
- summaryGridLayout->addWidget(new QLabel("% from Special:", summaryGrid), 1, 0);
- m_label_offense_percentspecial = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("% from Special:", summaryGBox), 1, 0);
+ m_label_offense_percentspecial = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_offense_percentspecial, 1, 1);
- summaryGridLayout->addWidget(new QLabel("Avg Special:", summaryGrid), 1, 2);
- m_label_offense_avgspecial = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg Special:", summaryGBox), 1, 2);
+ m_label_offense_avgspecial = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_offense_avgspecial, 1, 3);
- summaryGridLayout->addWidget(new QLabel("% from NonMelee:", summaryGrid), 2, 0);
- m_label_offense_percentnonmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("% from NonMelee:", summaryGBox), 2, 0);
+ m_label_offense_percentnonmelee = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_offense_percentnonmelee, 2, 1);
- summaryGridLayout->addWidget(new QLabel("Avg NonMelee:", summaryGrid), 2, 2);
- m_label_offense_avgnonmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg NonMelee:", summaryGBox), 2, 2);
+ m_label_offense_avgnonmelee = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_offense_avgnonmelee, 2, 3);
summaryGridLayout->setColStretch(1, 1);
@@ -367,8 +374,6 @@
summaryGridLayout->setColStretch(3, 1);
summaryGridLayout->setSpacing(5);
- summaryGrid->setLayout(summaryGridLayout);
-
return pWidget;
}
@@ -377,95 +382,108 @@
QWidget *pWidget = new QWidget(m_tab);
m_layout_defense = new QVBoxLayout(pWidget);
- Q3GroupBox *avoidanceGBox = new Q3VGroupBox("Avoidance", pWidget);
- m_layout_defense->addWidget(avoidanceGBox);
+ QGroupBox *avoidanceGBox = new QGroupBox("Avoidance", pWidget);
+ QHBoxLayout *avoidanceGBoxLayout = new QHBoxLayout(avoidanceGBox);
- QWidget *avoidanceGrid = new QWidget(avoidanceGBox);
- QGridLayout * avoidanceGridLayout = new QGridLayout(avoidanceGBox);
+ m_layout_defense->addWidget(avoidanceGBox);
- avoidanceGridLayout->addWidget(new QLabel("Misses:", avoidanceGrid), 0, 0);
- m_label_defense_avoid_misses = new QLabel(avoidanceGrid);
+ QGridLayout * avoidanceGridLayout = new QGridLayout();
+
+ avoidanceGBoxLayout->addLayout(avoidanceGridLayout);
+
+ avoidanceGridLayout->addWidget(new QLabel("Misses:", avoidanceGBox), 0, 0);
+ m_label_defense_avoid_misses = new QLabel(avoidanceGBox);
avoidanceGridLayout->addWidget(m_label_defense_avoid_misses, 0, 1);
- avoidanceGridLayout->addWidget(new QLabel("Blocks:", avoidanceGrid), 0, 2);
- m_label_defense_avoid_block = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Blocks:", avoidanceGBox), 0, 2);
+ m_label_defense_avoid_block = new QLabel(avoidanceGBox);
avoidanceGridLayout->addWidget(m_label_defense_avoid_block, 0, 3);
- avoidanceGridLayout->addWidget(new QLabel("Parries:", avoidanceGrid), 0, 4);
- m_label_defense_avoid_parry = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Parries:", avoidanceGBox), 0, 4);
+ m_label_defense_avoid_parry = new QLabel(avoidanceGBox);
avoidanceGridLayout->addWidget(m_label_defense_avoid_parry, 0, 5);
- avoidanceGridLayout->addWidget(new QLabel("Ripostes:", avoidanceGrid), 1, 0);
- m_label_defense_avoid_riposte = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Ripostes:", avoidanceGBox), 1, 0);
+ m_label_defense_avoid_riposte = new QLabel(avoidanceGBox);
avoidanceGridLayout->addWidget(m_label_defense_avoid_riposte, 1, 1);
- avoidanceGridLayout->addWidget(new QLabel("Dodges", avoidanceGrid), 1, 2);
- m_label_defense_avoid_dodge = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Dodges", avoidanceGBox), 1, 2);
+ m_label_defense_avoid_dodge = new QLabel(avoidanceGBox);
avoidanceGridLayout->addWidget(m_label_defense_avoid_dodge, 1, 3);
- avoidanceGridLayout->addWidget(new QLabel("Total:", avoidanceGrid), 1, 4);
- m_label_defense_avoid_total = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Total:", avoidanceGBox), 1, 4);
+ m_label_defense_avoid_total = new QLabel(avoidanceGBox);
avoidanceGridLayout->addWidget(m_label_defense_avoid_total, 1, 5);
+ avoidanceGridLayout->addItem(new QSpacerItem(1,1), 2, 0, 1, 6);
+
avoidanceGridLayout->setColStretch(1, 1);
avoidanceGridLayout->setColStretch(3, 1);
avoidanceGridLayout->setColStretch(5, 1);
+ avoidanceGridLayout->setRowStretch(2, 1);
avoidanceGridLayout->setSpacing(5);
- avoidanceGrid->setLayout(avoidanceGridLayout);
+ QGroupBox *mitigationGBox = new QGroupBox("Mitigation", pWidget);
+ QHBoxLayout *mitigationGBoxLayout = new QHBoxLayout(mitigationGBox);
- Q3GroupBox *mitigationGBox = new Q3VGroupBox("Mitigation", pWidget);
- m_layout_defense->addWidget(mitigationGBox);
+ m_layout_defense->addWidget(mitigationGBox);
- QWidget *mitigationGrid = new QWidget(mitigationGBox);
- QGridLayout *mitigationGridLayout = new QGridLayout(mitigationGBox);
+ QGridLayout *mitigationGridLayout = new QGridLayout();
- mitigationGridLayout->addWidget(new QLabel("Avg. Hit:", mitigationGrid), 0, 0);
- m_label_defense_mitigate_avghit = new QLabel(mitigationGrid);
+ mitigationGBoxLayout->addLayout(mitigationGridLayout);
+
+ mitigationGridLayout->addWidget(new QLabel("Avg. Hit:", mitigationGBox), 0, 0);
+ m_label_defense_mitigate_avghit = new QLabel(mitigationGBox);
mitigationGridLayout->addWidget(m_label_defense_mitigate_avghit, 0, 1);
- mitigationGridLayout->addWidget(new QLabel("Min:", mitigationGrid), 0, 2);
- m_label_defense_mitigate_minhit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(new QLabel("Min:", mitigationGBox), 0, 2);
+ m_label_defense_mitigate_minhit = new QLabel(mitigationGBox);
mitigationGridLayout->addWidget(m_label_defense_mitigate_minhit, 0, 3);
- mitigationGridLayout->addWidget(new QLabel("Max:", mitigationGrid), 0, 4);
- m_label_defense_mitigate_maxhit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(new QLabel("Max:", mitigationGBox), 0, 4);
+ m_label_defense_mitigate_maxhit = new QLabel(mitigationGBox);
mitigationGridLayout->addWidget(m_label_defense_mitigate_maxhit, 0, 5);
+ mitigationGridLayout->addItem(new QSpacerItem(1,1), 1, 0, 1, 6);
+
mitigationGridLayout->setColStretch(1, 1);
mitigationGridLayout->setColStretch(3, 1);
mitigationGridLayout->setColStretch(5, 1);
+ mitigationGridLayout->setRowStretch(1, 1);
mitigationGridLayout->setSpacing(5);
- mitigationGrid->setLayout(mitigationGridLayout);
- Q3GroupBox *summaryGBox = new Q3VGroupBox("Summary", pWidget);
- m_layout_defense->addWidget(summaryGBox);
+ QGroupBox *summaryGBox = new QGroupBox("Summary", pWidget);
+ QHBoxLayout *summaryGBoxLayout = new QHBoxLayout(summaryGBox);
- QWidget *summaryGrid = new QWidget(summaryGBox);
- QGridLayout *summaryGridLayout = new QGridLayout(summaryGBox);
+ m_layout_defense->addWidget(summaryGBox);
- summaryGridLayout->addWidget(new QLabel("Mob Attacks:", summaryGrid), 0, 0);
- m_label_defense_summary_mobattacks = new QLabel(summaryGrid);
+ QGridLayout *summaryGridLayout = new QGridLayout();
+
+ summaryGBoxLayout->addLayout(summaryGridLayout);
+
+ summaryGridLayout->addWidget(new QLabel("Mob Attacks:", summaryGBox), 0, 0);
+ m_label_defense_summary_mobattacks = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_defense_summary_mobattacks, 0, 1);
- summaryGridLayout->addWidget(new QLabel("% Avoided:", summaryGrid), 0, 2);
- m_label_defense_summary_percentavoided = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("% Avoided:", summaryGBox), 0, 2);
+ m_label_defense_summary_percentavoided = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_defense_summary_percentavoided, 0, 3);
- summaryGridLayout->addWidget(new QLabel("Total Damage:", summaryGrid), 0, 4);
- m_label_defense_summary_totaldamage = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Total Damage:", summaryGBox), 0, 4);
+ m_label_defense_summary_totaldamage = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_defense_summary_totaldamage, 0, 5);
+ summaryGridLayout->addItem(new QSpacerItem(1,1), 2, 0, 1, 6);
+
summaryGridLayout->setColStretch(1, 1);
summaryGridLayout->setColStretch(3, 1);
summaryGridLayout->setColStretch(5, 1);
+ summaryGridLayout->setRowStretch(1, 1);
summaryGridLayout->setSpacing(5);
- summaryGrid->setLayout(summaryGridLayout);
-
return pWidget;
}
@@ -475,7 +493,7 @@
m_layout_mob = new QVBoxLayout(pWidget);
- Q3GroupBox *listGBox = new Q3VGroupBox(pWidget);
+ QGroupBox *listGBox = new QGroupBox(pWidget);
m_layout_mob->addWidget(listGBox);
m_listview_mob = new SEQListView(preferenceName(), listGBox);
@@ -500,26 +518,32 @@
m_listview_mob->setMinimumSize(m_listview_mob->sizeHint().width(), 200);
- Q3GroupBox *summaryGBox = new Q3VGroupBox("Summary", pWidget);
+ QHBoxLayout *listGBoxLayout = new QHBoxLayout(listGBox);
+ listGBoxLayout->addWidget(m_listview_mob);
+
+ QGroupBox *summaryGBox = new QGroupBox("Summary", pWidget);
+ QHBoxLayout *summaryGBoxLayout = new QHBoxLayout(summaryGBox);
+
m_layout_mob->addWidget(summaryGBox);
- QWidget *summaryGrid = new QWidget(summaryGBox);
- QGridLayout *summaryGridLayout = new QGridLayout(summaryGBox);
+ QGridLayout *summaryGridLayout = new QGridLayout();
- summaryGridLayout->addWidget(new QLabel("Total Mobs", summaryGrid), 0, 0);
- m_label_mob_totalmobs = new QLabel(summaryGrid);
+ summaryGBoxLayout->addLayout(summaryGridLayout);
+
+ summaryGridLayout->addWidget(new QLabel("Total Mobs", summaryGBox), 0, 0);
+ m_label_mob_totalmobs = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_mob_totalmobs, 0, 1);
- summaryGridLayout->addWidget(new QLabel("Avg DPS:", summaryGrid), 0, 2);
- m_label_mob_avgdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg DPS:", summaryGBox), 0, 2);
+ m_label_mob_avgdps = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_mob_avgdps, 0, 3);
- summaryGridLayout->addWidget(new QLabel("Current DPS:", summaryGrid), 1, 0);
- m_label_mob_currentdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Current DPS:", summaryGBox), 1, 0);
+ m_label_mob_currentdps = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_mob_currentdps, 1, 1);
- summaryGridLayout->addWidget(new QLabel("Last DPS:", summaryGrid), 1, 2);
- m_label_mob_lastdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Last DPS:", summaryGBox), 1, 2);
+ m_label_mob_lastdps = new QLabel(summaryGBox);
summaryGridLayout->addWidget(m_label_mob_lastdps, 1, 3);
summaryGridLayout->setColStretch(1, 1);
@@ -526,9 +550,7 @@
summaryGridLayout->setColStretch(3, 1);
summaryGridLayout->setSpacing(5);
- summaryGrid->setLayout(summaryGridLayout);
-
return pWidget;
}
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-26 05:04:30 UTC (rev 1076)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-27 04:15:38 UTC (rev 1077)
@@ -35,7 +35,7 @@
#include <QTimer>
#include <Q3HBox>
-#include <Q3VGroupBox>
+#include <QGroupBox>
#include <QMessageBox>
#include <QFileInfo>
#include <QResizeEvent>
@@ -210,7 +210,7 @@
//m_layout->addSpacing( m_menu_bar->height() + 5 );
m_layout->addWidget(m_menu_bar);
- Q3GroupBox *listGBox = new Q3VGroupBox( "Experience Log", this );
+ QGroupBox *listGBox = new QGroupBox( "Experience Log", this );
m_layout->addWidget( listGBox );
m_exp_listview = new SEQListView(preferenceName(), listGBox);
@@ -228,43 +228,49 @@
m_exp_listview->setMinimumSize( m_exp_listview->sizeHint().width(),
200 );
- Q3GroupBox *statsGBox = new Q3VGroupBox( "Statistics", this );
+ QHBoxLayout * listGBoxLayout = new QHBoxLayout(listGBox);
+ listGBoxLayout->addWidget(m_exp_listview);
+
+ QGroupBox *statsGBox = new QGroupBox( "Statistics", this );
+ QHBoxLayout *statsGBoxLayout = new QHBoxLayout(statsGBox);
+
m_layout->addWidget( statsGBox );
- QWidget *statsGrid = new QWidget(statsGBox);
- QGridLayout *statsGridLayout = new QGridLayout(statsGBox);
+ QGridLayout *statsGridLayout = new QGridLayout();
- statsGridLayout->addWidget(new QLabel("Total Experience Received:", statsGrid), 0, 0);
- m_total_received = new QLabel(statsGrid);
+ statsGBoxLayout->addLayout(statsGridLayout);
+
+ statsGridLayout->addWidget(new QLabel("Total Experience Received:", statsGBox), 0, 0);
+ m_total_received = new QLabel(statsGBox);
statsGridLayout->addWidget(m_total_received, 0, 1);
- statsGridLayout->addWidget(new QLabel("Play Time:", statsGrid), 0, 2);
- m_play_time = new QLabel(statsGrid);
+ statsGridLayout->addWidget(new QLabel("Play Time:", statsGBox), 0, 2);
+ m_play_time = new QLabel(statsGBox);
statsGridLayout->addWidget(m_play_time, 0, 3);
- statsGridLayout->addWidget(new QLabel("Total Mobs Killed:", statsGrid), 1, 0);
- m_mob_count = new QLabel(statsGrid);
+ statsGridLayout->addWidget(new QLabel("Total Mobs Killed:", statsGBox), 1, 0);
+ m_mob_count = new QLabel(statsGBox);
statsGridLayout->addWidget(m_mob_count, 1, 1);
- m_experience_rate_label = new QLabel( "Experience Rate (per minute):", statsGrid );
+ m_experience_rate_label = new QLabel( "Experience Rate (per minute):", statsGBox );
statsGridLayout->addWidget(m_experience_rate_label, 1, 2);
- m_experience_rate = new QLabel(statsGrid);
+ m_experience_rate = new QLabel(statsGBox);
statsGridLayout->addWidget(m_experience_rate, 1, 3);
- statsGridLayout->addWidget(new QLabel("Average Experience per Mob:", statsGrid), 2, 0);
- m_average_per_mob = new QLabel(statsGrid);
+ statsGridLayout->addWidget(new QLabel("Average Experience per Mob:", statsGBox), 2, 0);
+ m_average_per_mob = new QLabel(statsGBox);
statsGridLayout->addWidget(m_average_per_mob, 2, 1);
- statsGridLayout->addWidget(new QLabel( "Estimated Kills To Level:", statsGrid), 2, 2);
- m_kills_to_level = new QLabel(statsGrid);
+ statsGridLayout->addWidget(new QLabel( "Estimated Kills To Level:", statsGBox), 2, 2);
+ m_kills_to_level = new QLabel(statsGBox);
statsGridLayout->addWidget(m_kills_to_level, 2, 3);
- statsGridLayout->addWidget(new QLabel( "Experience Remaining:", statsGrid), 3, 0);
- m_experience_remaining = new QLabel(statsGrid);
+ statsGridLayout->addWidget(new QLabel( "Experience Remaining:", statsGBox), 3, 0);
+ m_experience_remaining = new QLabel(statsGBox);
statsGridLayout->addWidget(m_experience_remaining, 3, 1);
- statsGridLayout->addWidget(new QLabel( "Estimated Time To Level:", statsGrid ), 3, 2);
- m_time_to_level = new QLabel(statsGrid);
+ statsGridLayout->addWidget(new QLabel( "Estimated Time To Level:", statsGBox ), 3, 2);
+ m_time_to_level = new QLabel(statsGBox);
statsGridLayout->addWidget(m_time_to_level, 3, 3);
statsGridLayout->setColStretch( 1, 1 );
@@ -271,8 +277,6 @@
statsGridLayout->setColStretch( 3, 1 );
statsGridLayout->setSpacing( 5 );
- statsGrid->setLayout(statsGridLayout);
-
updateAverage( );
// timer to update the average xp
Modified: showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-26 05:04:30 UTC (rev 1076)
+++ showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-27 04:15:38 UTC (rev 1077)
@@ -30,7 +30,7 @@
#include <QString>
#include <QRegExp>
#include <QLayout>
-#include <Q3GroupBox>
+#include <QGroupBox>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
@@ -37,8 +37,8 @@
#include <Q3ListBox>
#include <QHBoxLayout>
#include <QGridLayout>
-#include <Q3Frame>
#include <QVBoxLayout>
+#include <QFormLayout>
//----------------------------------------------------------------------
// MessageFilterListBoxText
@@ -106,9 +106,9 @@
this, SLOT(addedFilter(uint32_t, uint8_t, const MessageFilter&)));
// setup the dialog
- QVBoxLayout* outerLayout = new QVBoxLayout(this, 5, -1, "outerlayout");
- QHBoxLayout* columnLayout = new QHBoxLayout(outerLayout, -1, "columns");
- QVBoxLayout* column1Layout = new QVBoxLayout(5, "column1");
+ QVBoxLayout* outerLayout = new QVBoxLayout(this);
+ QHBoxLayout* columnLayout = new QHBoxLayout(outerLayout);
+ QVBoxLayout* column1Layout = new QVBoxLayout();
columnLayout->addLayout(column1Layout, 1);
// layout 1st column
@@ -127,57 +127,60 @@
connect(m_new, SIGNAL(clicked()),
this, SLOT(newFilter()));
- m_filterGroup = new Q3GroupBox(1, Qt::Vertical,
- "New &Filter", this, "filtergroup");
+ m_filterGroup = new QGroupBox("New &Filter", this);
columnLayout->addWidget(m_filterGroup, 5);
- Q3Frame* dummy = new Q3Frame(m_filterGroup, "dummy");
+ QVBoxLayout *filterGBoxLayout = new QVBoxLayout(m_filterGroup);
+ QHBoxLayout *filterButtonLayout = new QHBoxLayout();
+ QFormLayout* newFilterLayout = new QFormLayout();
- QGridLayout* filterLayout = new QGridLayout(dummy, 8, 3, 5, -1, "filterlayout");
-
- label = new QLabel("&Name", dummy);
- filterLayout->addWidget(label, 0, 0, Qt::AlignLeft | Qt::AlignVCenter);
- m_name = new QLineEdit(dummy, "name");
- filterLayout->addMultiCellWidget(m_name, 0, 0, 1, 2);
- label->setBuddy(m_name);
+ m_name = new QLineEdit(m_filterGroup, "name");
+ newFilterLayout->addRow("&Name", m_name);
connect(m_name, SIGNAL(textChanged(const QString&)),
this, SLOT(anyTextChanged(const QString&)));
- label = new QLabel("&Pattern", dummy);
- filterLayout->addWidget(label, 1, 0, Qt::AlignLeft | Qt::AlignVCenter);
- m_pattern = new QLineEdit(dummy, "pattern");
- filterLayout->addMultiCellWidget(m_pattern, 1, 1, 1, 2);
- label->setBuddy(m_pattern);
+ m_pattern = new QLineEdit(m_filterGroup, "pattern");
+ newFilterLayout->addRow("&Pattern", m_pattern);
connect(m_pattern, SIGNAL(textChanged(const QString&)),
this, SLOT(anyTextChanged(const QString&)));
- label = new QLabel("&Message Types", dummy);
- filterLayout->addWidget(label, 2, 0, Qt::AlignLeft | Qt::AlignVCenter);
- m_messageTypes = new Q3ListBox(dummy, "messagetypes");
- filterLayout->addMultiCellWidget(m_messageTypes, 2, 6, 1, 2);
- label->setBuddy(m_messageTypes);
+ m_messageTypes = new Q3ListBox(m_filterGroup, "messagetypes");
+ newFilterLayout->addRow("&Message Types", m_messageTypes);
m_messageTypes->setSelectionMode(Q3ListBox::Multi);
connect(m_messageTypes, SIGNAL(selectionChanged()),
this, SLOT(messageTypeSelectionChanged()));
- m_delete = new QPushButton("&Delete", dummy);
- filterLayout->addWidget(m_delete, 7, 0, Qt::AlignCenter);
+ m_delete = new QPushButton("&Delete", m_filterGroup);
+ m_delete->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ filterButtonLayout->addWidget(m_delete);
m_delete->setEnabled(false);
connect(m_delete, SIGNAL(clicked()),
this, SLOT(deleteFilter()));
- m_update = new QPushButton("&Update", dummy);
- filterLayout->addWidget(m_update, 7, 1, Qt::AlignCenter);
+ m_update = new QPushButton("&Update", m_filterGroup);
+ m_update->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ filterButtonLayout->addWidget(m_update);
m_update->setEnabled(false);
connect(m_update, SIGNAL(clicked()),
this, SLOT(updateFilter()));
- m_add = new QPushButton("&Add", dummy);
- filterLayout->addWidget(m_add, 7, 2, Qt::AlignCenter);
+ m_add = new QPushButton("&Add", m_filterGroup);
+ m_add->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ filterButtonLayout->addWidget(m_add);
m_add->setEnabled(false);
connect(m_add, SIGNAL(clicked()),
this, SLOT(addFilter()));
+ filterButtonLayout->setAlignment(Qt::AlignCenter);
+ filterButtonLayout->insertStretch(0, 1);
+ filterButtonLayout->insertStretch(2, 1);
+ filterButtonLayout->insertStretch(4, 1);
+ filterButtonLayout->insertStretch(6, 1);
+
+ newFilterLayout->addRow(filterButtonLayout);
+
+ filterGBoxLayout->addLayout(newFilterLayout, 2);
+
QPushButton* close = new QPushButton("&Close", this);
outerLayout->addWidget(close, 1, Qt::AlignCenter);
connect(close, SIGNAL(clicked()),
Modified: showeq/branches/pre_6_0_beta/src/messagefilterdialog.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagefilterdialog.h 2020-10-26 05:04:30 UTC (rev 1076)
+++ showeq/branches/pre_6_0_beta/src/messagefilterdialog.h 2020-10-27 04:15:38 UTC (rev 1077)
@@ -39,7 +39,7 @@
class QPushButton;
class Q3ListBox;
class Q3ListBoxItem;
-class Q3GroupBox;
+class QGroupBox;
//----------------------------------------------------------------------
// MessageFilterDialog
@@ -71,7 +71,7 @@
MessageFilters* m_filters;
Q3ListBox* m_existingFilters;
QPushButton* m_new;
- Q3GroupBox* m_filterGroup;
+ QGroupBox* m_filterGroup;
QLineEdit* m_name;
QLineEdit* m_pattern;
Q3ListBox* m_messageTypes;
Modified: showeq/branches/pre_6_0_beta/src/messagewindow.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-26 05:04:30 UTC (rev 1076)
+++ showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-27 04:15:38 UTC (rev 1077)
@@ -36,7 +36,7 @@
#include <QCheckBox>
#include <QLabel>
#include <QLineEdit>
-#include <Q3GroupBox>
+#include <QGroupBox>
#include <QFileDialog>
#include <QFile>
#include <Q3TextStream>
@@ -43,6 +43,7 @@
#include <QHBoxLayout>
#include <QKeyEvent>
#include <QGridLayout>
+#include <QFormLayout>
#include <Q3Frame>
#include <QMouseEvent>
#include <QEvent>
@@ -250,9 +251,9 @@
m_defaultBGColor(bgColor)
{
setCaption(caption);
-
+
// setup the GUI
- QGridLayout* grid = new QGridLayout(this, 6, 2);
+ QFormLayout* grid = new QFormLayout(this);
// sets margin around the grid
grid->setMargin(10);
@@ -265,10 +266,7 @@
connect(m_color, SIGNAL(clicked()),
this, SLOT(selectColor()));
- grid->addWidget(m_color, 0, 1);
- QLabel* label = new QLabel("&Color", this);
- label->setBuddy(m_color);
- grid->addWidget(label, 0, 0);
+ grid->addRow("&Color", m_color);
m_bgColor = new QPushButton("...", this, "backgroundcolor");
if (m_style.bgColor().isValid())
@@ -278,10 +276,7 @@
connect(m_bgColor, SIGNAL(clicked()),
this, SLOT(selectBGColor()));
- grid->addWidget(m_bgColor, 1,1);
- label = new QLabel("&Background Color", this);
- label->setBuddy(m_bgColor);
- grid->addWidget(label, 1, 0);
+ grid->addRow("&Background Color", m_bgColor);
m_useDefaultFont = new QCheckBox("Use &Default Font",
this, "usedefaultfont");
@@ -288,19 +283,17 @@
m_useDefaultFont->setChecked(m_style.useDefaultFont());
connect(m_useDefaultFont, SIGNAL(toggled(bool)),
this, SLOT(useDefaultFontToggled(bool)));
- grid->addWidget(m_useDefaultFont, 2, 0);
-
+
m_font = new QPushButton("&Font", this, "font");
m_font->setEnabled(!m_style.useDefaultFont());
- grid->addWidget(m_font, 2, 1);
connect(m_font, SIGNAL(clicked()),
this, SLOT(selectFont()));
- grid->addRowSpacing(3, 10);
+ grid->addRow(m_useDefaultFont, m_font);
- Q3GroupBox* exampleBox = new Q3GroupBox(1, Qt::Horizontal, "Example",
- this, "examplebox");
- grid->addMultiCellWidget(exampleBox, 4, 4, 0, 2);
+ QGroupBox* exampleBox = new QGroupBox("Example", this);
+ exampleBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ QVBoxLayout * exampleBoxLayout = new QVBoxLayout(exampleBox);
m_example = new QLabel(caption, exampleBox, "example");
m_example->setFrameShape(Q3Frame::Box);
@@ -318,10 +311,15 @@
else
m_example->setFont(m_style.font());
- grid->addRowSpacing(5, 0);
+ exampleBoxLayout->addWidget(m_example);
+ exampleBoxLayout->addItem(new QSpacerItem(10, 10, QSizePolicy::Preferred, QSizePolicy::Expanding));
- QHBoxLayout* layout = new QHBoxLayout(grid);
- grid->addMultiCell(layout, 6, 6, 0, 2);
+ grid->addRow(exampleBox);
+
+ grid->setSpacing(5);
+
+ QHBoxLayout* layout = new QHBoxLayout();
+ grid->addRow(layout);
layout->addStretch();
QPushButton* ok = new QPushButton("OK", this);
connect(ok, SIGNAL(clicked()),
@@ -335,6 +333,7 @@
cancel->setDefault(true);
layout->addWidget(cancel);
layout->addStretch();
+
}
MessageTypeStyleDialog::~MessageTypeStyleDialog()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-26 05:04:37
|
Revision: 1076
http://sourceforge.net/p/seq/svn/1076
Author: cn187
Date: 2020-10-26 05:04:30 +0000 (Mon, 26 Oct 2020)
Log Message:
-----------
Replace Q3Grid with QGridLayout
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/combatlog.cpp
showeq/branches/pre_6_0_beta/src/experiencelog.cpp
Modified: showeq/branches/pre_6_0_beta/src/combatlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-26 05:04:16 UTC (rev 1075)
+++ showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-26 05:04:30 UTC (rev 1076)
@@ -25,7 +25,6 @@
#include "util.h"
#include "diagnosticmessages.h"
-#include <Q3Grid>
#include <QTimer>
#include <Q3HBox>
#include <Q3VGroupBox>
@@ -337,30 +336,39 @@
Q3GroupBox *summaryGBox = new Q3VGroupBox("Summary", pWidget);
m_layout_offense->addWidget(summaryGBox);
- Q3Grid *summaryGrid = new Q3Grid(4, summaryGBox);
+ QWidget *summaryGrid = new QWidget(summaryGBox);
+ QGridLayout *summaryGridLayout = new QGridLayout(summaryGBox);
- new QLabel("Total Damage:", summaryGrid);
- m_label_offense_totaldamage = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Total Damage:", summaryGrid), 0, 0);
+ m_label_offense_totaldamage = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_offense_totaldamage, 0, 1);
- new QLabel("Avg Melee:", summaryGrid);
- m_label_offense_avgmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg Melee:", summaryGrid), 0, 2);
+ m_label_offense_avgmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_offense_avgmelee, 0, 3);
- new QLabel("% from Special:", summaryGrid);
- m_label_offense_percentspecial = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("% from Special:", summaryGrid), 1, 0);
+ m_label_offense_percentspecial = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_offense_percentspecial, 1, 1);
- new QLabel("Avg Special:", summaryGrid);
- m_label_offense_avgspecial = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg Special:", summaryGrid), 1, 2);
+ m_label_offense_avgspecial = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_offense_avgspecial, 1, 3);
- new QLabel("% from NonMelee:", summaryGrid);
- m_label_offense_percentnonmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("% from NonMelee:", summaryGrid), 2, 0);
+ m_label_offense_percentnonmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_offense_percentnonmelee, 2, 1);
- new QLabel("Avg NonMelee:", summaryGrid);
- m_label_offense_avgnonmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg NonMelee:", summaryGrid), 2, 2);
+ m_label_offense_avgnonmelee = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_offense_avgnonmelee, 2, 3);
- ((QGridLayout *)summaryGrid->layout())->setColStretch(1, 1);
- ((QGridLayout *)summaryGrid->layout())->setColStretch(3, 1);
- summaryGrid->layout()->setSpacing(5);
+ summaryGridLayout->setColStretch(1, 1);
+ summaryGridLayout->setColStretch(3, 1);
+ summaryGridLayout->setSpacing(5);
+ summaryGrid->setLayout(summaryGridLayout);
+
return pWidget;
}
@@ -372,69 +380,92 @@
Q3GroupBox *avoidanceGBox = new Q3VGroupBox("Avoidance", pWidget);
m_layout_defense->addWidget(avoidanceGBox);
- Q3Grid *avoidanceGrid = new Q3Grid(6, avoidanceGBox);
+ QWidget *avoidanceGrid = new QWidget(avoidanceGBox);
+ QGridLayout * avoidanceGridLayout = new QGridLayout(avoidanceGBox);
- new QLabel("Misses:", avoidanceGrid);
- m_label_defense_avoid_misses = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Misses:", avoidanceGrid), 0, 0);
+ m_label_defense_avoid_misses = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(m_label_defense_avoid_misses, 0, 1);
- new QLabel("Blocks:", avoidanceGrid);
- m_label_defense_avoid_block = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Blocks:", avoidanceGrid), 0, 2);
+ m_label_defense_avoid_block = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(m_label_defense_avoid_block, 0, 3);
- new QLabel("Parries:", avoidanceGrid);
- m_label_defense_avoid_parry = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Parries:", avoidanceGrid), 0, 4);
+ m_label_defense_avoid_parry = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(m_label_defense_avoid_parry, 0, 5);
- new QLabel("Ripostes:", avoidanceGrid);
- m_label_defense_avoid_riposte = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Ripostes:", avoidanceGrid), 1, 0);
+ m_label_defense_avoid_riposte = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(m_label_defense_avoid_riposte, 1, 1);
- new QLabel("Dodges", avoidanceGrid);
- m_label_defense_avoid_dodge = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Dodges", avoidanceGrid), 1, 2);
+ m_label_defense_avoid_dodge = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(m_label_defense_avoid_dodge, 1, 3);
- new QLabel("Total:", avoidanceGrid);
- m_label_defense_avoid_total = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(new QLabel("Total:", avoidanceGrid), 1, 4);
+ m_label_defense_avoid_total = new QLabel(avoidanceGrid);
+ avoidanceGridLayout->addWidget(m_label_defense_avoid_total, 1, 5);
- ((QGridLayout *)avoidanceGrid->layout())->setColStretch(1, 1);
- ((QGridLayout *)avoidanceGrid->layout())->setColStretch(3, 1);
- ((QGridLayout *)avoidanceGrid->layout())->setColStretch(5, 1);
- avoidanceGrid->layout()->setSpacing(5);
+ avoidanceGridLayout->setColStretch(1, 1);
+ avoidanceGridLayout->setColStretch(3, 1);
+ avoidanceGridLayout->setColStretch(5, 1);
+ avoidanceGridLayout->setSpacing(5);
+ avoidanceGrid->setLayout(avoidanceGridLayout);
+
+
Q3GroupBox *mitigationGBox = new Q3VGroupBox("Mitigation", pWidget);
m_layout_defense->addWidget(mitigationGBox);
- Q3Grid *mitigationGrid = new Q3Grid(6, mitigationGBox);
+ QWidget *mitigationGrid = new QWidget(mitigationGBox);
+ QGridLayout *mitigationGridLayout = new QGridLayout(mitigationGBox);
- new QLabel("Avg. Hit:", mitigationGrid);
- m_label_defense_mitigate_avghit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(new QLabel("Avg. Hit:", mitigationGrid), 0, 0);
+ m_label_defense_mitigate_avghit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(m_label_defense_mitigate_avghit, 0, 1);
- new QLabel("Min:", mitigationGrid);
- m_label_defense_mitigate_minhit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(new QLabel("Min:", mitigationGrid), 0, 2);
+ m_label_defense_mitigate_minhit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(m_label_defense_mitigate_minhit, 0, 3);
- new QLabel("Max:", mitigationGrid);
- m_label_defense_mitigate_maxhit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(new QLabel("Max:", mitigationGrid), 0, 4);
+ m_label_defense_mitigate_maxhit = new QLabel(mitigationGrid);
+ mitigationGridLayout->addWidget(m_label_defense_mitigate_maxhit, 0, 5);
- ((QGridLayout *)mitigationGrid->layout())->setColStretch(1, 1);
- ((QGridLayout *)mitigationGrid->layout())->setColStretch(3, 1);
- ((QGridLayout *)mitigationGrid->layout())->setColStretch(5, 1);
- mitigationGrid->layout()->setSpacing(5);
+ mitigationGridLayout->setColStretch(1, 1);
+ mitigationGridLayout->setColStretch(3, 1);
+ mitigationGridLayout->setColStretch(5, 1);
+ mitigationGridLayout->setSpacing(5);
+ mitigationGrid->setLayout(mitigationGridLayout);
+
+
Q3GroupBox *summaryGBox = new Q3VGroupBox("Summary", pWidget);
m_layout_defense->addWidget(summaryGBox);
- Q3Grid *summaryGrid = new Q3Grid(6, summaryGBox);
+ QWidget *summaryGrid = new QWidget(summaryGBox);
+ QGridLayout *summaryGridLayout = new QGridLayout(summaryGBox);
- new QLabel("Mob Attacks:", summaryGrid);
- m_label_defense_summary_mobattacks = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Mob Attacks:", summaryGrid), 0, 0);
+ m_label_defense_summary_mobattacks = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_defense_summary_mobattacks, 0, 1);
- new QLabel("% Avoided:", summaryGrid);
- m_label_defense_summary_percentavoided = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("% Avoided:", summaryGrid), 0, 2);
+ m_label_defense_summary_percentavoided = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_defense_summary_percentavoided, 0, 3);
- new QLabel("Total Damage:", summaryGrid);
- m_label_defense_summary_totaldamage = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Total Damage:", summaryGrid), 0, 4);
+ m_label_defense_summary_totaldamage = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_defense_summary_totaldamage, 0, 5);
- ((QGridLayout *)summaryGrid->layout())->setColStretch(1, 1);
- ((QGridLayout *)summaryGrid->layout())->setColStretch(3, 1);
- ((QGridLayout *)summaryGrid->layout())->setColStretch(5, 1);
- summaryGrid->layout()->setSpacing(5);
+ summaryGridLayout->setColStretch(1, 1);
+ summaryGridLayout->setColStretch(3, 1);
+ summaryGridLayout->setColStretch(5, 1);
+ summaryGridLayout->setSpacing(5);
+ summaryGrid->setLayout(summaryGridLayout);
+
return pWidget;
}
@@ -472,25 +503,32 @@
Q3GroupBox *summaryGBox = new Q3VGroupBox("Summary", pWidget);
m_layout_mob->addWidget(summaryGBox);
- Q3Grid *summaryGrid = new Q3Grid(4, summaryGBox);
+ QWidget *summaryGrid = new QWidget(summaryGBox);
+ QGridLayout *summaryGridLayout = new QGridLayout(summaryGBox);
- new QLabel("Total Mobs", summaryGrid);
- m_label_mob_totalmobs = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Total Mobs", summaryGrid), 0, 0);
+ m_label_mob_totalmobs = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_mob_totalmobs, 0, 1);
- new QLabel("Avg DPS:", summaryGrid);
- m_label_mob_avgdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Avg DPS:", summaryGrid), 0, 2);
+ m_label_mob_avgdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_mob_avgdps, 0, 3);
- new QLabel("Current DPS:", summaryGrid);
- m_label_mob_currentdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Current DPS:", summaryGrid), 1, 0);
+ m_label_mob_currentdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_mob_currentdps, 1, 1);
- new QLabel("Last DPS:", summaryGrid);
- m_label_mob_lastdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(new QLabel("Last DPS:", summaryGrid), 1, 2);
+ m_label_mob_lastdps = new QLabel(summaryGrid);
+ summaryGridLayout->addWidget(m_label_mob_lastdps, 1, 3);
- ((QGridLayout *)summaryGrid->layout())->setColStretch(1, 1);
- ((QGridLayout *)summaryGrid->layout())->setColStretch(3, 1);
- summaryGrid->layout()->setSpacing(5);
+ summaryGridLayout->setColStretch(1, 1);
+ summaryGridLayout->setColStretch(3, 1);
+ summaryGridLayout->setSpacing(5);
+ summaryGrid->setLayout(summaryGridLayout);
+
return pWidget;
}
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-26 05:04:16 UTC (rev 1075)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-26 05:04:30 UTC (rev 1076)
@@ -33,7 +33,6 @@
#include <cstdio>
#include <ctime>
-#include <Q3Grid>
#include <QTimer>
#include <Q3HBox>
#include <Q3VGroupBox>
@@ -231,43 +230,49 @@
Q3GroupBox *statsGBox = new Q3VGroupBox( "Statistics", this );
m_layout->addWidget( statsGBox );
-
- Q3Grid *statsGrid = new Q3Grid( 4, statsGBox );
- new QLabel( "Total Experience Received:",
- statsGrid );
- m_total_received = new QLabel( statsGrid );
+ QWidget *statsGrid = new QWidget(statsGBox);
+ QGridLayout *statsGridLayout = new QGridLayout(statsGBox);
- new QLabel( "Play Time:", statsGrid );
- m_play_time = new QLabel( statsGrid );
+ statsGridLayout->addWidget(new QLabel("Total Experience Received:", statsGrid), 0, 0);
+ m_total_received = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_total_received, 0, 1);
- new QLabel( "Total Mobs Killed:", statsGrid );
- m_mob_count = new QLabel( statsGrid );
+ statsGridLayout->addWidget(new QLabel("Play Time:", statsGrid), 0, 2);
+ m_play_time = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_play_time, 0, 3);
+ statsGridLayout->addWidget(new QLabel("Total Mobs Killed:", statsGrid), 1, 0);
+ m_mob_count = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_mob_count, 1, 1);
+
m_experience_rate_label = new QLabel( "Experience Rate (per minute):", statsGrid );
- m_experience_rate = new QLabel( statsGrid );
+ statsGridLayout->addWidget(m_experience_rate_label, 1, 2);
+ m_experience_rate = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_experience_rate, 1, 3);
- new QLabel( "Average Experience per Mob:",
- statsGrid );
- m_average_per_mob = new QLabel( statsGrid );
+ statsGridLayout->addWidget(new QLabel("Average Experience per Mob:", statsGrid), 2, 0);
+ m_average_per_mob = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_average_per_mob, 2, 1);
- new QLabel( "Estimated Kills To Level:",
- statsGrid );
- m_kills_to_level = new QLabel( statsGrid );
+ statsGridLayout->addWidget(new QLabel( "Estimated Kills To Level:", statsGrid), 2, 2);
+ m_kills_to_level = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_kills_to_level, 2, 3);
- new QLabel( "Experience Remaining:",
- statsGrid );
- m_experience_remaining = new QLabel( statsGrid );
+ statsGridLayout->addWidget(new QLabel( "Experience Remaining:", statsGrid), 3, 0);
+ m_experience_remaining = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_experience_remaining, 3, 1);
- new QLabel( "Estimated Time To Level:",
- statsGrid );
- m_time_to_level = new QLabel( statsGrid );
+ statsGridLayout->addWidget(new QLabel( "Estimated Time To Level:", statsGrid ), 3, 2);
+ m_time_to_level = new QLabel(statsGrid);
+ statsGridLayout->addWidget(m_time_to_level, 3, 3);
- // ewww, why can't we just get it from QGrid? :(
- ((QGridLayout *)statsGrid->layout())->setColStretch( 1, 1 );
- ((QGridLayout *)statsGrid->layout())->setColStretch( 3, 1 );
- statsGrid->layout()->setSpacing( 5 );
+ statsGridLayout->setColStretch( 1, 1 );
+ statsGridLayout->setColStretch( 3, 1 );
+ statsGridLayout->setSpacing( 5 );
+ statsGrid->setLayout(statsGridLayout);
+
updateAverage( );
// timer to update the average xp
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-26 05:04:19
|
Revision: 1075
http://sourceforge.net/p/seq/svn/1075
Author: cn187
Date: 2020-10-26 05:04:16 +0000 (Mon, 26 Oct 2020)
Log Message:
-----------
Replace Q3GridLayout with QGridLayout
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/combatlog.cpp
showeq/branches/pre_6_0_beta/src/experiencelog.cpp
showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
showeq/branches/pre_6_0_beta/src/messagewindow.cpp
showeq/branches/pre_6_0_beta/src/netdiag.cpp
Modified: showeq/branches/pre_6_0_beta/src/combatlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-26 05:04:02 UTC (rev 1074)
+++ showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-26 05:04:16 UTC (rev 1075)
@@ -32,7 +32,7 @@
#include <QMessageBox>
#include <QLayout>
#include <QLabel>
-#include <Q3GridLayout>
+#include <QGridLayout>
#include <QMenu>
#include <QVBoxLayout>
#include <cstdio>
@@ -357,8 +357,8 @@
new QLabel("Avg NonMelee:", summaryGrid);
m_label_offense_avgnonmelee = new QLabel(summaryGrid);
- ((Q3GridLayout *)summaryGrid->layout())->setColStretch(1, 1);
- ((Q3GridLayout *)summaryGrid->layout())->setColStretch(3, 1);
+ ((QGridLayout *)summaryGrid->layout())->setColStretch(1, 1);
+ ((QGridLayout *)summaryGrid->layout())->setColStretch(3, 1);
summaryGrid->layout()->setSpacing(5);
return pWidget;
@@ -392,9 +392,9 @@
new QLabel("Total:", avoidanceGrid);
m_label_defense_avoid_total = new QLabel(avoidanceGrid);
- ((Q3GridLayout *)avoidanceGrid->layout())->setColStretch(1, 1);
- ((Q3GridLayout *)avoidanceGrid->layout())->setColStretch(3, 1);
- ((Q3GridLayout *)avoidanceGrid->layout())->setColStretch(5, 1);
+ ((QGridLayout *)avoidanceGrid->layout())->setColStretch(1, 1);
+ ((QGridLayout *)avoidanceGrid->layout())->setColStretch(3, 1);
+ ((QGridLayout *)avoidanceGrid->layout())->setColStretch(5, 1);
avoidanceGrid->layout()->setSpacing(5);
Q3GroupBox *mitigationGBox = new Q3VGroupBox("Mitigation", pWidget);
@@ -411,9 +411,9 @@
new QLabel("Max:", mitigationGrid);
m_label_defense_mitigate_maxhit = new QLabel(mitigationGrid);
- ((Q3GridLayout *)mitigationGrid->layout())->setColStretch(1, 1);
- ((Q3GridLayout *)mitigationGrid->layout())->setColStretch(3, 1);
- ((Q3GridLayout *)mitigationGrid->layout())->setColStretch(5, 1);
+ ((QGridLayout *)mitigationGrid->layout())->setColStretch(1, 1);
+ ((QGridLayout *)mitigationGrid->layout())->setColStretch(3, 1);
+ ((QGridLayout *)mitigationGrid->layout())->setColStretch(5, 1);
mitigationGrid->layout()->setSpacing(5);
Q3GroupBox *summaryGBox = new Q3VGroupBox("Summary", pWidget);
@@ -430,9 +430,9 @@
new QLabel("Total Damage:", summaryGrid);
m_label_defense_summary_totaldamage = new QLabel(summaryGrid);
- ((Q3GridLayout *)summaryGrid->layout())->setColStretch(1, 1);
- ((Q3GridLayout *)summaryGrid->layout())->setColStretch(3, 1);
- ((Q3GridLayout *)summaryGrid->layout())->setColStretch(5, 1);
+ ((QGridLayout *)summaryGrid->layout())->setColStretch(1, 1);
+ ((QGridLayout *)summaryGrid->layout())->setColStretch(3, 1);
+ ((QGridLayout *)summaryGrid->layout())->setColStretch(5, 1);
summaryGrid->layout()->setSpacing(5);
return pWidget;
@@ -486,8 +486,8 @@
new QLabel("Last DPS:", summaryGrid);
m_label_mob_lastdps = new QLabel(summaryGrid);
- ((Q3GridLayout *)summaryGrid->layout())->setColStretch(1, 1);
- ((Q3GridLayout *)summaryGrid->layout())->setColStretch(3, 1);
+ ((QGridLayout *)summaryGrid->layout())->setColStretch(1, 1);
+ ((QGridLayout *)summaryGrid->layout())->setColStretch(3, 1);
summaryGrid->layout()->setSpacing(5);
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-26 05:04:02 UTC (rev 1074)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-26 05:04:16 UTC (rev 1075)
@@ -40,7 +40,7 @@
#include <QMessageBox>
#include <QFileInfo>
#include <QResizeEvent>
-#include <Q3GridLayout>
+#include <QGridLayout>
#include <QLabel>
#include <QMenu>
#include <QVBoxLayout>
@@ -264,8 +264,8 @@
m_time_to_level = new QLabel( statsGrid );
// ewww, why can't we just get it from QGrid? :(
- ((Q3GridLayout *)statsGrid->layout())->setColStretch( 1, 1 );
- ((Q3GridLayout *)statsGrid->layout())->setColStretch( 3, 1 );
+ ((QGridLayout *)statsGrid->layout())->setColStretch( 1, 1 );
+ ((QGridLayout *)statsGrid->layout())->setColStretch( 3, 1 );
statsGrid->layout()->setSpacing( 5 );
updateAverage( );
Modified: showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-26 05:04:02 UTC (rev 1074)
+++ showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-26 05:04:16 UTC (rev 1075)
@@ -36,7 +36,7 @@
#include <QPushButton>
#include <Q3ListBox>
#include <QHBoxLayout>
-#include <Q3GridLayout>
+#include <QGridLayout>
#include <Q3Frame>
#include <QVBoxLayout>
@@ -133,7 +133,7 @@
Q3Frame* dummy = new Q3Frame(m_filterGroup, "dummy");
- Q3GridLayout* filterLayout = new Q3GridLayout(dummy, 8, 3, 5, -1, "filterlayout");
+ QGridLayout* filterLayout = new QGridLayout(dummy, 8, 3, 5, -1, "filterlayout");
label = new QLabel("&Name", dummy);
filterLayout->addWidget(label, 0, 0, Qt::AlignLeft | Qt::AlignVCenter);
Modified: showeq/branches/pre_6_0_beta/src/messagewindow.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-26 05:04:02 UTC (rev 1074)
+++ showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-26 05:04:16 UTC (rev 1075)
@@ -42,7 +42,7 @@
#include <Q3TextStream>
#include <QHBoxLayout>
#include <QKeyEvent>
-#include <Q3GridLayout>
+#include <QGridLayout>
#include <Q3Frame>
#include <QMouseEvent>
#include <QEvent>
@@ -119,7 +119,7 @@
setCaption(caption);
// setup the GUI
- Q3GridLayout* grid = new Q3GridLayout(this, 5, 2);
+ QGridLayout* grid = new QGridLayout(this, 5, 2);
// sets margin around the grid
grid->setMargin(5);
@@ -252,7 +252,7 @@
setCaption(caption);
// setup the GUI
- Q3GridLayout* grid = new Q3GridLayout(this, 6, 2);
+ QGridLayout* grid = new QGridLayout(this, 6, 2);
// sets margin around the grid
grid->setMargin(10);
Modified: showeq/branches/pre_6_0_beta/src/netdiag.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/netdiag.cpp 2020-10-26 05:04:02 UTC (rev 1074)
+++ showeq/branches/pre_6_0_beta/src/netdiag.cpp 2020-10-26 05:04:16 UTC (rev 1075)
@@ -22,7 +22,7 @@
#include <QPushButton>
#include <QShortcut>
-#include <Q3GridLayout>
+#include <QGridLayout>
#include <QLabel>
#include "main.h"
@@ -37,7 +37,7 @@
{
// setResizeEnabled(false);
// get preferences
- Q3GridLayout* tmpGrid = new Q3GridLayout(boxLayout(), 26, 9);
+ QGridLayout* tmpGrid = new QGridLayout(boxLayout(), 26, 9);
tmpGrid->addColSpacing(3, 5);
tmpGrid->addColSpacing(6, 5);
tmpGrid->addRowSpacing(1, 5);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-26 05:04:05
|
Revision: 1074
http://sourceforge.net/p/seq/svn/1074
Author: cn187
Date: 2020-10-26 05:04:02 +0000 (Mon, 26 Oct 2020)
Log Message:
-----------
Replace Q3*BoxLayout with Q*BoxLayout
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/category.cpp
showeq/branches/pre_6_0_beta/src/combatlog.cpp
showeq/branches/pre_6_0_beta/src/combatlog.h
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/experiencelog.h
showeq/branches/pre_6_0_beta/src/guildlist.cpp
showeq/branches/pre_6_0_beta/src/map.cpp
showeq/branches/pre_6_0_beta/src/map.h
showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
showeq/branches/pre_6_0_beta/src/messagewindow.cpp
showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
Modified: showeq/branches/pre_6_0_beta/src/category.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/category.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/category.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -39,10 +39,10 @@
#include <cstdio>
#include <QColorDialog>
-#include <Q3HBoxLayout>
-#include <Q3BoxLayout>
+#include <QHBoxLayout>
+#include <QBoxLayout>
#include <QLabel>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
// ------------------------------------------------------
// Category
@@ -99,12 +99,12 @@
QFont labelFont;
labelFont.setBold(true);
- Q3BoxLayout* topLayout = new Q3VBoxLayout(this);
- Q3BoxLayout* row4Layout = new Q3HBoxLayout(topLayout);
- Q3BoxLayout* row3Layout = new Q3HBoxLayout(topLayout);
- Q3BoxLayout* row2Layout = new Q3HBoxLayout(topLayout);
- Q3BoxLayout* row1Layout = new Q3HBoxLayout(topLayout);
- Q3BoxLayout* row0Layout = new Q3HBoxLayout(topLayout);
+ QBoxLayout* topLayout = new QVBoxLayout(this);
+ QBoxLayout* row4Layout = new QHBoxLayout(topLayout);
+ QBoxLayout* row3Layout = new QHBoxLayout(topLayout);
+ QBoxLayout* row2Layout = new QHBoxLayout(topLayout);
+ QBoxLayout* row1Layout = new QHBoxLayout(topLayout);
+ QBoxLayout* row0Layout = new QHBoxLayout(topLayout);
QLabel *colorLabel = new QLabel ("Color", this);
colorLabel->setFont(labelFont);
Modified: showeq/branches/pre_6_0_beta/src/combatlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -34,7 +34,7 @@
#include <QLabel>
#include <Q3GridLayout>
#include <QMenu>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
#include <cstdio>
#include <ctime>
@@ -271,7 +271,7 @@
#ifdef DEBUGCOMBAT
seqDebug("CombatWindow::initUI: starting...");
#endif
- Q3VBoxLayout* layout = new Q3VBoxLayout(boxLayout());
+ QVBoxLayout* layout = new QVBoxLayout(boxLayout());
m_menu_bar = new QMenuBar(this);
layout->addWidget(m_menu_bar);
@@ -307,7 +307,7 @@
{
QWidget *pWidget = new QWidget(m_tab);
- m_layout_offense = new Q3VBoxLayout(pWidget);
+ m_layout_offense = new QVBoxLayout(pWidget);
Q3GroupBox *listGBox = new Q3VGroupBox(pWidget);
m_layout_offense->addWidget(listGBox);
@@ -367,7 +367,7 @@
QWidget* CombatWindow::initDefenseWidget()
{
QWidget *pWidget = new QWidget(m_tab);
- m_layout_defense = new Q3VBoxLayout(pWidget);
+ m_layout_defense = new QVBoxLayout(pWidget);
Q3GroupBox *avoidanceGBox = new Q3VGroupBox("Avoidance", pWidget);
m_layout_defense->addWidget(avoidanceGBox);
@@ -442,7 +442,7 @@
{
QWidget *pWidget = new QWidget(m_tab);
- m_layout_mob = new Q3VBoxLayout(pWidget);
+ m_layout_mob = new QVBoxLayout(pWidget);
Q3GroupBox *listGBox = new Q3VGroupBox(pWidget);
m_layout_mob->addWidget(listGBox);
Modified: showeq/branches/pre_6_0_beta/src/combatlog.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.h 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/combatlog.h 2020-10-26 05:04:02 UTC (rev 1074)
@@ -33,7 +33,7 @@
# include <QLayout>
# include <QMenuBar>
#include <QMenu>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
# include <sys/time.h>
# include <sys/types.h>
@@ -211,9 +211,9 @@
QWidget* m_widget_mob;
QTabWidget* m_tab;
- Q3VBoxLayout* m_layout_offense;
- Q3VBoxLayout* m_layout_defense;
- Q3VBoxLayout* m_layout_mob;
+ QVBoxLayout* m_layout_offense;
+ QVBoxLayout* m_layout_defense;
+ QVBoxLayout* m_layout_mob;
SEQListView* m_listview_offense;
SEQListView* m_listview_mob;
Modified: showeq/branches/pre_6_0_beta/src/compassframe.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/compassframe.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/compassframe.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -22,7 +22,7 @@
#include <QFont>
#include <QLayout>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
#include <QLabel>
#include "main.h"
@@ -31,7 +31,7 @@
CompassFrame::CompassFrame(Player* player, QWidget* parent, const char* name)
: SEQWindow("Compass", "ShowEQ - Compass", parent, name)
{
- Q3VBoxLayout* layout = new Q3VBoxLayout(boxLayout());
+ QVBoxLayout* layout = new QVBoxLayout(boxLayout());
m_compass = new Compass (this, "compass");
layout->addWidget(m_compass);
Q3HBox* coordsbox = new Q3HBox(this);
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -43,7 +43,7 @@
#include <Q3GridLayout>
#include <QLabel>
#include <QMenu>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
#define DEBUGEXP
@@ -204,7 +204,7 @@
m_view_menu->insertItem( "ZEM View Options", m_ZEM_menu );
m_view_menu->insertItem( "Calculate ZEM on next kill", this, SLOT(calcZEMNextKill()) );
- m_layout = new Q3VBoxLayout(boxLayout());
+ m_layout = new QVBoxLayout(boxLayout());
m_menu_bar = new QMenuBar( this );
m_menu_bar->insertItem( "&View", m_view_menu );
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.h 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.h 2020-10-26 05:04:02 UTC (rev 1074)
@@ -35,7 +35,7 @@
#include <QLayout>
#include <QMenuBar>
#include <QResizeEvent>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
#include <QMenu>
#include <cstdint>
@@ -133,7 +133,7 @@
GroupMgr* m_group;
ZoneMgr* m_zoneMgr;
- Q3VBoxLayout *m_layout;
+ QVBoxLayout *m_layout;
SEQListView *m_exp_listview;
Modified: showeq/branches/pre_6_0_beta/src/guildlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -34,9 +34,9 @@
#include <QLineEdit>
#include <QLabel>
#include <QLayout>
-#include <Q3HBoxLayout>
-#include <Q3BoxLayout>
-#include <Q3VBoxLayout>
+#include <QHBoxLayout>
+#include <QBoxLayout>
+#include <QVBoxLayout>
//----------------------------------------------------------------------
// GuildListItem
@@ -164,8 +164,8 @@
m_showAlts = pSEQPrefs->getPrefBool("ShowAlts", preferenceName(), true);
- Q3BoxLayout* vLayout = new Q3VBoxLayout(boxLayout());
- Q3HBoxLayout* hLayout= new Q3HBoxLayout(vLayout);
+ QBoxLayout* vLayout = new QVBoxLayout(boxLayout());
+ QHBoxLayout* hLayout= new QHBoxLayout(vLayout);
// Guild Name
m_guildName = new QLabel("Guild", this);
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -72,14 +72,14 @@
#include <QInputDialog>
#endif
-#include <Q3BoxLayout>
+#include <QBoxLayout>
#include <QPaintEvent>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
#include <QPolygon>
#include <Q3Frame>
#include <QResizeEvent>
#include <QLabel>
-#include <Q3HBoxLayout>
+#include <QHBoxLayout>
#include <Q3TextStream>
#include <QMouseEvent>
@@ -108,9 +108,9 @@
QFont labelFont;
labelFont.setBold(true);
- Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
- Q3BoxLayout *row2Layout = new Q3HBoxLayout(topLayout);
- Q3BoxLayout *row1Layout = new Q3HBoxLayout(topLayout);
+ QBoxLayout *topLayout = new QVBoxLayout(this);
+ QBoxLayout *row2Layout = new QHBoxLayout(topLayout);
+ QBoxLayout *row1Layout = new QHBoxLayout(topLayout);
QLabel *colorLabel = new QLabel ("Color", this);
colorLabel->setFont(labelFont);
@@ -4603,7 +4603,7 @@
QLabel* tmpLabel;
// setup the vertical box
- m_vertical = new Q3VBoxLayout(boxLayout());
+ m_vertical = new QVBoxLayout(boxLayout());
// setup the top control window
m_topControlBox = new Q3HBox(this);
Modified: showeq/branches/pre_6_0_beta/src/map.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.h 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/map.h 2020-10-26 05:04:02 UTC (rev 1074)
@@ -58,7 +58,7 @@
#include <QResizeEvent>
#include <QMouseEvent>
#include <QEvent>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
#include <Q3Frame>
#include <QPaintEvent>
@@ -748,7 +748,7 @@
QString m_mapPreferenceName;
- Q3VBoxLayout* m_vertical;
+ QVBoxLayout* m_vertical;
Q3HBox* m_topControlBox;
Q3HBox* m_zoomBox;
QSpinBox* m_zoom;
Modified: showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/messagefilterdialog.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -35,10 +35,10 @@
#include <QLineEdit>
#include <QPushButton>
#include <Q3ListBox>
-#include <Q3HBoxLayout>
+#include <QHBoxLayout>
#include <Q3GridLayout>
#include <Q3Frame>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
//----------------------------------------------------------------------
// MessageFilterListBoxText
@@ -106,9 +106,9 @@
this, SLOT(addedFilter(uint32_t, uint8_t, const MessageFilter&)));
// setup the dialog
- Q3VBoxLayout* outerLayout = new Q3VBoxLayout(this, 5, -1, "outerlayout");
- Q3HBoxLayout* columnLayout = new Q3HBoxLayout(outerLayout, -1, "columns");
- Q3VBoxLayout* column1Layout = new Q3VBoxLayout(5, "column1");
+ QVBoxLayout* outerLayout = new QVBoxLayout(this, 5, -1, "outerlayout");
+ QHBoxLayout* columnLayout = new QHBoxLayout(outerLayout, -1, "columns");
+ QVBoxLayout* column1Layout = new QVBoxLayout(5, "column1");
columnLayout->addLayout(column1Layout, 1);
// layout 1st column
Modified: showeq/branches/pre_6_0_beta/src/messagewindow.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/messagewindow.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -40,7 +40,7 @@
#include <QFileDialog>
#include <QFile>
#include <Q3TextStream>
-#include <Q3HBoxLayout>
+#include <QHBoxLayout>
#include <QKeyEvent>
#include <Q3GridLayout>
#include <Q3Frame>
@@ -139,7 +139,7 @@
m_findBackwards = new QCheckBox("Find &Backwards", this);
grid->addWidget(m_findBackwards, 3, 1);
- Q3HBoxLayout* layout = new Q3HBoxLayout(grid);
+ QHBoxLayout* layout = new QHBoxLayout(grid);
grid->addMultiCell(layout, 5, 5, 0, 2);
layout->addStretch();
m_find = new QPushButton("&Find", this);
@@ -320,7 +320,7 @@
grid->addRowSpacing(5, 0);
- Q3HBoxLayout* layout = new Q3HBoxLayout(grid);
+ QHBoxLayout* layout = new QHBoxLayout(grid);
grid->addMultiCell(layout, 6, 6, 0, 2);
layout->addStretch();
QPushButton* ok = new QPushButton("OK", this);
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-25 23:56:27 UTC (rev 1073)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-26 05:04:02 UTC (rev 1074)
@@ -31,10 +31,10 @@
#include <QSpinBox>
#include <QTimer>
#include <QLayout>
-#include <Q3HBoxLayout>
-#include <Q3BoxLayout>
+#include <QHBoxLayout>
+#include <QBoxLayout>
#include <QMenu>
-#include <Q3VBoxLayout>
+#include <QVBoxLayout>
SpawnListWindow2::SpawnListWindow2(Player* player,
SpawnShell* spawnShell,
@@ -65,8 +65,8 @@
int fpm = pSEQPrefs->getPrefInt("FPM", preferenceName(), 10);
m_delay = 60000L / fpm;
- Q3BoxLayout* vLayout = new Q3VBoxLayout(boxLayout());
- Q3HBoxLayout* hLayout= new Q3HBoxLayout(vLayout);
+ QBoxLayout* vLayout = new QVBoxLayout(boxLayout());
+ QHBoxLayout* hLayout= new QHBoxLayout(vLayout);
// create the spawn list combo box
m_categoryCombo = new QComboBox(false, this, "spawnlistcombo");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 23:56:34
|
Revision: 1073
http://sourceforge.net/p/seq/svn/1073
Author: cn187
Date: 2020-10-25 23:56:27 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3PointArray with QPolygon
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/map.cpp
showeq/branches/pre_6_0_beta/src/mapcore.cpp
showeq/branches/pre_6_0_beta/src/mapcore.h
showeq/branches/pre_6_0_beta/src/mapicon.cpp
showeq/branches/pre_6_0_beta/src/pointarray.h
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-25 23:56:03 UTC (rev 1072)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-25 23:56:27 UTC (rev 1073)
@@ -75,7 +75,7 @@
#include <Q3BoxLayout>
#include <QPaintEvent>
#include <Q3VBoxLayout>
-#include <Q3PointArray>
+#include <QPolygon>
#include <Q3Frame>
#include <QResizeEvent>
#include <QLabel>
@@ -3703,7 +3703,7 @@
const ItemMap& itemMap = m_spawnShell->spawns();
ItemConstIterator it(itemMap);
const Item* item;
- Q3PointArray atri(3);
+ QPolygon atri(3);
QString spawnNameText;
QFontMetrics fm(param.font());
EQPoint spawnOffset;
Modified: showeq/branches/pre_6_0_beta/src/mapcore.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/mapcore.cpp 2020-10-25 23:56:03 UTC (rev 1072)
+++ showeq/branches/pre_6_0_beta/src/mapcore.cpp 2020-10-25 23:56:27 UTC (rev 1073)
@@ -43,7 +43,7 @@
#include <QFileInfo>
#include <QFile>
#include <QRegExp>
-#include <Q3PointArray>
+#include <QPolygon>
#include <QByteArray>
#include <QPixmap>
@@ -308,7 +308,7 @@
const QString& color,
uint32_t size)
: MapCommon(name, color),
- Q3PointArray(size),
+ QPolygon(size),
m_z(0),
m_heightSet(false)
{
@@ -319,7 +319,7 @@
uint32_t size,
int16_t z)
: MapCommon(name, color),
- Q3PointArray(size),
+ QPolygon(size),
m_z(z),
m_heightSet(true)
{
Modified: showeq/branches/pre_6_0_beta/src/mapcore.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/mapcore.h 2020-10-25 23:56:03 UTC (rev 1072)
+++ showeq/branches/pre_6_0_beta/src/mapcore.h 2020-10-25 23:56:27 UTC (rev 1073)
@@ -46,7 +46,7 @@
#include <QFont>
#include <QPixmap>
#include <QList>
-#include <Q3PointArray>
+#include <QPolygon>
#include "point.h"
#include "pointarray.h"
@@ -449,7 +449,7 @@
//----------------------------------------------------------------------
// MapLineL
-class MapLineL : public MapCommon, public Q3PointArray
+class MapLineL : public MapCommon, public QPolygon
{
public:
MapLineL();
@@ -463,7 +463,7 @@
void setZPos(uint16_t z)
{ m_z = z; m_heightSet = true; }
- void calcBounds() { m_bounds = Q3PointArray::boundingRect(); }
+ void calcBounds() { m_bounds = QPolygon::boundingRect(); }
private:
int16_t m_z;
Modified: showeq/branches/pre_6_0_beta/src/mapicon.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/mapicon.cpp 2020-10-25 23:56:03 UTC (rev 1072)
+++ showeq/branches/pre_6_0_beta/src/mapicon.cpp 2020-10-25 23:56:27 UTC (rev 1073)
@@ -32,7 +32,7 @@
#include <QPoint>
#include <QTimer>
#include <Q3TextStream>
-#include <Q3PointArray>
+#include <QPolygon>
//----------------------------------------------------------------------
// constants
@@ -511,7 +511,7 @@
void MapIcon::paintUpTriangle(QPainter&p, const QPoint& point,
int size, int sizeWH)
{
- Q3PointArray atri(3);
+ QPolygon atri(3);
atri.setPoint(0, point.x(), point.y() - size);
atri.setPoint(1, point.x() + size, point.y() + size);
atri.setPoint(2, point.x() - size, point.y() + size);
@@ -521,7 +521,7 @@
void MapIcon::paintRightTriangle(QPainter&p, const QPoint& point,
int size, int sizeWH)
{
- Q3PointArray atri(3);
+ QPolygon atri(3);
atri.setPoint(0, point.x() + size, point.y());
atri.setPoint(1, point.x() - size, point.y() + size);
atri.setPoint(2, point.x() - size, point.y() - size);
@@ -531,7 +531,7 @@
void MapIcon::paintDownTriangle(QPainter&p, const QPoint& point,
int size, int sizeWH)
{
- Q3PointArray atri(3);
+ QPolygon atri(3);
atri.setPoint(0, point.x(), point.y() + size);
atri.setPoint(1, point.x() + size, point.y() - size);
atri.setPoint(2, point.x() - size, point.y() - size);
@@ -541,7 +541,7 @@
void MapIcon::paintLeftTriangle(QPainter&p, const QPoint& point,
int size, int sizeWH)
{
- Q3PointArray atri(3);
+ QPolygon atri(3);
atri.setPoint(0, point.x() - size, point.y());
atri.setPoint(1, point.x() + size, point.y() + size);
atri.setPoint(2, point.x() + size, point.y() - size);
@@ -561,7 +561,7 @@
void MapIcon::paintDiamond(QPainter&p, const QPoint& point,
int size, int sizeWH)
{
- Q3PointArray diamond(4);
+ QPolygon diamond(4);
diamond.setPoint(0, point.x(), point.y() + size);
diamond.setPoint(1, point.x() + size, point.y());
diamond.setPoint(2, point.x(), point.y() - size);
Modified: showeq/branches/pre_6_0_beta/src/pointarray.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/pointarray.h 2020-10-25 23:56:03 UTC (rev 1072)
+++ showeq/branches/pre_6_0_beta/src/pointarray.h 2020-10-25 23:56:27 UTC (rev 1073)
@@ -41,7 +41,7 @@
#endif
#include <QVector>
#include <QPoint>
-#include <Q3PointArray>
+#include <QPolygon>
// Point3DArray
template <class _T>
@@ -69,7 +69,7 @@
bool setPoints(uint32_t nPoints, _T firstx, _T firsty, _T firstz, ...);
bool putPoints(uint32_t index, uint32_t nPoints, const _T* points);
bool putPoints(uint32_t index, uint32_t nPoints, _T firstx, _T firsty, _T firstz, ...);
- Q3PointArray getQPointArray();
+ QPolygon getQPointArray();
};
template <class _T> inline
@@ -228,10 +228,10 @@
}
template <class _T> inline
-Q3PointArray Point3DArray<_T>::getQPointArray()
+QPolygon Point3DArray<_T>::getQPointArray()
{
// create a temporary QPointArray of the same size as this array
- Q3PointArray tmp(QVector<Point3D<_T> >::size());
+ QPolygon tmp(QVector<Point3D<_T> >::size());
// copy each Point3D<_T> as a QPoint into the temporary QPointArray
for (uint32_t i = 0; i < QVector<Point3D<_T> >::size(); i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 23:56:05
|
Revision: 1072
http://sourceforge.net/p/seq/svn/1072
Author: cn187
Date: 2020-10-25 23:56:03 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace QMemArray with QVector
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/pointarray.h
Modified: showeq/branches/pre_6_0_beta/src/pointarray.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/pointarray.h 2020-10-25 23:55:53 UTC (rev 1071)
+++ showeq/branches/pre_6_0_beta/src/pointarray.h 2020-10-25 23:56:03 UTC (rev 1072)
@@ -39,18 +39,18 @@
#else
#include <cstdint>
#endif
-#include <Q3MemArray>
+#include <QVector>
#include <QPoint>
#include <Q3PointArray>
// Point3DArray
template <class _T>
-class Point3DArray : public Q3MemArray<Point3D<_T> >
+class Point3DArray : public QVector<Point3D<_T> >
{
public:
Point3DArray() {};
- Point3DArray(int size) : Q3MemArray<Point3D<_T> > (size) {}
- Point3DArray(const Point3DArray<_T>& array) : Q3MemArray<Point3D<_T> > (array) {}
+ Point3DArray(int size) : QVector<Point3D<_T> > (size) {}
+ Point3DArray(const Point3DArray<_T>& array) : QVector<Point3D<_T> > (array) {}
Point3DArray(uint32_t nPoints, const _T* points);
~Point3DArray() {};
@@ -81,10 +81,10 @@
template <class _T> inline
QRect Point3DArray<_T>::boundingRect() const
{
- if (Q3MemArray<Point3D<_T> >::isEmpty())
+ if (QVector<Point3D<_T> >::isEmpty())
return QRect(0, 0, 0, 0);
- Point3D<_T>* d = Q3MemArray<Point3D<_T> >::data();
+ const Point3D<_T>* d = QVector<Point3D<_T> >::constData();
_T minX, maxX, minY, maxY;
minX = maxX = d->x();
@@ -92,7 +92,7 @@
uint32_t i;
for (++d, i = 1;
- i < Q3MemArray<Point3D<_T> >::size();
+ i < QVector<Point3D<_T> >::size();
i++, d++)
{
if (d->x() < minX)
@@ -111,7 +111,7 @@
template <class _T> inline
void Point3DArray<_T>::point(uint32_t index, _T* x, _T* y, _T* z) const
{
- Point3D<_T> p = Q3MemArray<Point3D<_T> >::at(index);
+ Point3D<_T> p = QVector<Point3D<_T> >::at(index);
*x = p.x();
*y = p. y();
*z = p. z();
@@ -120,25 +120,25 @@
template <class _T> inline
const Point3D<_T>& Point3DArray<_T>::point(uint32_t index) const
{
- return Q3MemArray<Point3D<_T> >::at(index);
+ return QVector<Point3D<_T> >::at(index);
}
template <class _T> inline
void Point3DArray<_T>::setPoint(uint32_t index, _T x, _T y, _T z)
{
- Q3MemArray<Point3D<_T> >::at(index) = Point3D<_T>(x, y, z);
+ QVector<Point3D<_T> >::operator[](index) = Point3D<_T>(x, y, z);
}
template <class _T> inline
void Point3DArray<_T>::setPoint(uint32_t index, const Point3D<_T>& p)
{
- Q3MemArray<Point3D<_T> >::at(index) = p;
+ QVector<Point3D<_T> >::operator[](index) = p;
}
template <class _T> inline
bool Point3DArray<_T>::setPoints(uint32_t nPoints, const _T* points)
{
- if (!Q3MemArray<Point3D<_T> >::resize(nPoints))
+ if (!QVector<Point3D<_T> >::resize(nPoints))
return false;
for (uint32_t i = 0;
@@ -153,7 +153,7 @@
bool Point3DArray<_T>::setPoints(uint32_t nPoints,
_T firstx, _T firsty, _T firstz, ...)
{
- if (!Q3MemArray<Point3D<_T> >::resize(nPoints))
+ if (!QVector<Point3D<_T> >::resize(nPoints))
return false;
setPoint( 0, firstx, firsty, firstz);
@@ -183,8 +183,8 @@
template <class _T> inline
bool Point3DArray<_T>::putPoints(uint32_t index, uint32_t nPoints, const _T* points)
{
- if ((index + nPoints) > Q3MemArray<Point3D<_T> >::size())
- if (!Q3MemArray<Point3D<_T> >::resize(index + nPoints))
+ if ((index + nPoints) > QVector<Point3D<_T> >::size())
+ if (!QVector<Point3D<_T> >::resize(index + nPoints))
return false;
for (uint32_t i = index;
@@ -199,8 +199,8 @@
bool Point3DArray<_T>::putPoints(uint32_t index, uint32_t nPoints,
_T firstx, _T firsty, _T firstz, ...)
{
- if ((index + nPoints) > Q3MemArray<Point3D<_T> >::size())
- if (!Q3MemArray<Point3D<_T> >::resize(index + nPoints))
+ if ((index + nPoints) > QVector<Point3D<_T> >::size())
+ if (!QVector<Point3D<_T> >::resize(index + nPoints))
return false;
setPoint( 0, firstx, firsty, firstz);
@@ -231,10 +231,10 @@
Q3PointArray Point3DArray<_T>::getQPointArray()
{
// create a temporary QPointArray of the same size as this array
- Q3PointArray tmp(Q3MemArray<Point3D<_T> >::size());
+ Q3PointArray tmp(QVector<Point3D<_T> >::size());
// copy each Point3D<_T> as a QPoint into the temporary QPointArray
- for (uint32_t i = 0; i < Q3MemArray<Point3D<_T> >::size(); i++)
+ for (uint32_t i = 0; i < QVector<Point3D<_T> >::size(); i++)
tmp.setPoint(i, point(i).qpoint());
// return the temporary QPointArray
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 23:55:56
|
Revision: 1071
http://sourceforge.net/p/seq/svn/1071
Author: cn187
Date: 2020-10-25 23:55:53 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3ValueVector with QVector
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/eqstr.cpp
showeq/branches/pre_6_0_beta/src/interface.cpp
showeq/branches/pre_6_0_beta/src/message.h
Modified: showeq/branches/pre_6_0_beta/src/eqstr.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/eqstr.cpp 2020-10-25 23:55:46 UTC (rev 1070)
+++ showeq/branches/pre_6_0_beta/src/eqstr.cpp 2020-10-25 23:55:53 UTC (rev 1071)
@@ -31,7 +31,7 @@
#include <QRegExp>
#include <QFile>
#include <QStringList>
-#include <Q3ValueVector>
+#include <QVector>
#include <QString>
EQStr::EQStr()
@@ -160,7 +160,7 @@
}
else
{
- Q3ValueVector<QString> argList;
+ QVector<QString> argList;
argList.reserve(5); // reserve space for 5 elements to handle most common sizes
//Adjusted to handle prepended string length 05/28/2019
Modified: showeq/branches/pre_6_0_beta/src/interface.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 23:55:46 UTC (rev 1070)
+++ showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 23:55:53 UTC (rev 1071)
@@ -77,7 +77,6 @@
#include <QLabel>
#include <QPushButton>
#include <QList>
-#include <Q3ValueVector>
#include <QStatusBar>
#include <QLineEdit>
#include <QMessageBox>
Modified: showeq/branches/pre_6_0_beta/src/message.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/message.h 2020-10-25 23:55:46 UTC (rev 1070)
+++ showeq/branches/pre_6_0_beta/src/message.h 2020-10-25 23:55:53 UTC (rev 1071)
@@ -29,7 +29,6 @@
#include <QString>
#include <QDateTime>
-#include <Q3ValueVector>
//----------------------------------------------------------------------
// constants
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 23:55:49
|
Revision: 1070
http://sourceforge.net/p/seq/svn/1070
Author: cn187
Date: 2020-10-25 23:55:46 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3CString with QByteArray and QString
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/eqstr.cpp
showeq/branches/pre_6_0_beta/src/mapcore.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.h
showeq/branches/pre_6_0_beta/src/packetstream.cpp
showeq/branches/pre_6_0_beta/src/spells.cpp
Modified: showeq/branches/pre_6_0_beta/src/eqstr.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/eqstr.cpp 2020-10-25 23:55:40 UTC (rev 1069)
+++ showeq/branches/pre_6_0_beta/src/eqstr.cpp 2020-10-25 23:55:46 UTC (rev 1070)
@@ -32,7 +32,7 @@
#include <QFile>
#include <QStringList>
#include <Q3ValueVector>
-#include <Q3CString>
+#include <QString>
EQStr::EQStr()
: m_messageStrings(),
@@ -61,11 +61,11 @@
return false;
}
- // allocate a QCString large enough to hold the entire file
- Q3CString textData(formatFile.size() + 1);
-
+ // allocate a QByteArray large enough to hold the entire file
+ QByteArray textData(formatFile.size() + 1, '\0');
+
// read in the entire file
- formatFile.readBlock(textData.data(), textData.size());
+ formatFile.read(textData.data(), textData.size());
// construct a regex to deal with either style line termination
QRegExp lineTerm("[\r\n]{1,2}");
Modified: showeq/branches/pre_6_0_beta/src/mapcore.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/mapcore.cpp 2020-10-25 23:55:40 UTC (rev 1069)
+++ showeq/branches/pre_6_0_beta/src/mapcore.cpp 2020-10-25 23:55:46 UTC (rev 1070)
@@ -44,7 +44,7 @@
#include <QFile>
#include <QRegExp>
#include <Q3PointArray>
-#include <Q3CString>
+#include <QByteArray>
#include <QPixmap>
//----------------------------------------------------------------------
@@ -514,11 +514,11 @@
// note the file name
m_fileName = filename;
- // allocate memory in a QCString to hold the entire file contents
- Q3CString textData(mapFile.size() + 1);
+ // allocate memory in a QByteArray to hold the entire file contents
+ QByteArray textData(mapFile.size() + 1, '\0');
// read the file as one big chunk
- mapFile.readBlock(textData.data(), textData.size());
+ mapFile.read(textData.data(), textData.size());
// construct a regex to deal with either style line termination
QRegExp lineTerm("[\r\n]{1,2}");
@@ -958,13 +958,13 @@
// note the file name
m_fileName = filename;
-
- // allocate memory in a QCString to hold the entire file contents
- Q3CString textData(mapFile.size() + 1);
-
+
+ // allocate memory in a QByteArray to hold the entire file contents
+ QByteArray textData(mapFile.size() + 1, '\0');
+
// read the file as one big chunk
- mapFile.readBlock(textData.data(), textData.size());
-
+ mapFile.read(textData.data(), textData.size());
+
// construct a regex to deal with either style line termination
QRegExp lineTerm("[\r\n]{1,2}");
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 23:55:40 UTC (rev 1069)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 23:55:46 UTC (rev 1070)
@@ -29,7 +29,7 @@
#include <QFile>
#include <QXmlAttributes>
#include <Q3TextStream>
-#include <Q3CString>
+#include <QByteArray>
#include <map>
@@ -355,7 +355,7 @@
}
OrderedMap::iterator oit;
- Q3CString opcodeString(256);
+ QString opcodeString;
static const char* dirStrs[] = { "client", "server", "both", };
static const char* sztStrs[] = { "none", "match", "modulus", };
@@ -383,8 +383,8 @@
cit != comments.end(); ++cit)
out << indent << "<comment>" << *cit << "</comment>" << endl;
- Q3CString dirStr;
- Q3CString sztStr;
+ QByteArray dirStr;
+ QByteArray sztStr;
// iterate over the payloads
QListIterator<EQPacketPayload*> pit(*currentOPCode);
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 23:55:40 UTC (rev 1069)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 23:55:46 UTC (rev 1070)
@@ -31,7 +31,7 @@
#include <QList>
#include <QHash>
#include <QByteArray>
-#include <Q3CString>
+#include <QString>
#include <QStringList>
#include <Q3TextStream>
@@ -102,8 +102,8 @@
public:
EQPacketPayload();
~EQPacketPayload();
-
- const Q3CString& typeName() const;
+
+ const QString& typeName() const;
bool setType(const EQPacketTypeDB& db, const char* typeName);
size_t typeSize() const;
EQSizeCheckType sizeCheckType() const;
@@ -114,7 +114,7 @@
bool match(const uint8_t* data, size_t size, uint8_t dir) const;
protected:
- Q3CString m_typeName;
+ QString m_typeName;
size_t m_typeSize;
EQSizeCheckType m_sizeCheckType;
uint8_t m_dir;
@@ -124,7 +124,7 @@
typedef QList<EQPacketPayload*> EQPayloadList;
typedef QListIterator<EQPacketPayload*> EQPayloadListIterator;
-inline const Q3CString& EQPacketPayload::typeName() const
+inline const QString& EQPacketPayload::typeName() const
{
return m_typeName;
}
Modified: showeq/branches/pre_6_0_beta/src/packetstream.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetstream.cpp 2020-10-25 23:55:40 UTC (rev 1069)
+++ showeq/branches/pre_6_0_beta/src/packetstream.cpp 2020-10-25 23:55:46 UTC (rev 1070)
@@ -28,7 +28,7 @@
#include "diagnosticmessages.h"
#include <cstdio>
-#include <Q3CString>
+#include <QString>
//----------------------------------------------------------------------
// Macros
@@ -159,7 +159,7 @@
if (!dispatch)
{
// construct a name for the dispatch
- Q3CString dispatchName(256);
+ QString dispatchName(256, '\0');
dispatchName.sprintf("PacketDispatch:%s:%s:%d:%s:%d",
(const char*)name(), (const char*)opcodeName,
payload->dir(), (const char*)payload->typeName(),
@@ -475,10 +475,10 @@
{
if (payload->sizeCheckType() == SZC_Match)
tempStr += QString(" sizeof(%1):%2")
- .arg(payload->typeName().data()).arg(payload->typeSize());
+ .arg(payload->typeName()).arg(payload->typeSize());
else if (payload->sizeCheckType() == SZC_Modulus)
tempStr += QString(" modulus of sizeof(%1):%2")
- .arg(payload->typeName().data()).arg(payload->typeSize());
+ .arg(payload->typeName()).arg(payload->typeSize());
}
}
Modified: showeq/branches/pre_6_0_beta/src/spells.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spells.cpp 2020-10-25 23:55:40 UTC (rev 1069)
+++ showeq/branches/pre_6_0_beta/src/spells.cpp 2020-10-25 23:55:46 UTC (rev 1070)
@@ -38,7 +38,7 @@
#include <QFile>
#include <QQueue>
#include <QRegExp>
-#include <Q3CString>
+#include <QByteArray>
static inline int16_t min(const int16_t& __a, const int16_t& __b)
{
@@ -261,11 +261,11 @@
// Queue to temporarily store our Spells until we know the maxSpell
QQueue<Spell*> spellQueue;
- // allocate memory in a QCString to hold the entire file contents
- Q3CString textData(spellsFile.size() + 1);
+ // allocate memory in a QByteArray to hold the entire file contents
+ QByteArray textData(spellsFile.size() + 1, '\0');
// read the file as one big chunk
- spellsFile.readBlock(textData.data(), textData.size());
+ spellsFile.read(textData.data(), textData.size());
// construct a regex to deal with either style line termination
QRegExp lineTerm("[\r\n]{1,2}");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 23:55:41
|
Revision: 1069
http://sourceforge.net/p/seq/svn/1069
Author: cn187
Date: 2020-10-25 23:55:40 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3PtrQueue with QQueue
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/spells.cpp
Modified: showeq/branches/pre_6_0_beta/src/spells.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spells.cpp 2020-10-25 22:16:10 UTC (rev 1068)
+++ showeq/branches/pre_6_0_beta/src/spells.cpp 2020-10-25 23:55:40 UTC (rev 1069)
@@ -36,7 +36,7 @@
#include <QString>
#include <QStringList>
#include <QFile>
-#include <Q3PtrQueue>
+#include <QQueue>
#include <QRegExp>
#include <Q3CString>
@@ -258,10 +258,9 @@
// open the spell file if possible
if (spellsFile.open(QIODevice::ReadOnly))
{
- // QPtrQueue to temporarily store our Spells until we know the maxSpell
- Q3PtrQueue<Spell> spellQueue;
- spellQueue.setAutoDelete(false);
-
+ // Queue to temporarily store our Spells until we know the maxSpell
+ QQueue<Spell*> spellQueue;
+
// allocate memory in a QCString to hold the entire file contents
Q3CString textData(spellsFile.size() + 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 22:16:13
|
Revision: 1068
http://sourceforge.net/p/seq/svn/1068
Author: cn187
Date: 2020-10-25 22:16:10 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3PtrList with QList
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/category.cpp
showeq/branches/pre_6_0_beta/src/category.h
showeq/branches/pre_6_0_beta/src/cgiconv.h
showeq/branches/pre_6_0_beta/src/combatlog.cpp
showeq/branches/pre_6_0_beta/src/combatlog.h
showeq/branches/pre_6_0_beta/src/experiencelog.cpp
showeq/branches/pre_6_0_beta/src/experiencelog.h
showeq/branches/pre_6_0_beta/src/filter.cpp
showeq/branches/pre_6_0_beta/src/filter.h
showeq/branches/pre_6_0_beta/src/interface.cpp
showeq/branches/pre_6_0_beta/src/interface.h
showeq/branches/pre_6_0_beta/src/map.h
showeq/branches/pre_6_0_beta/src/mapcore.cpp
showeq/branches/pre_6_0_beta/src/mapcore.h
showeq/branches/pre_6_0_beta/src/mapicon.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.h
showeq/branches/pre_6_0_beta/src/packetstream.cpp
showeq/branches/pre_6_0_beta/src/spawn.cpp
showeq/branches/pre_6_0_beta/src/spawn.h
showeq/branches/pre_6_0_beta/src/spawnlist.cpp
showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
Modified: showeq/branches/pre_6_0_beta/src/category.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/category.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/category.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -174,24 +174,13 @@
CategoryMgr::CategoryMgr(QObject* parent, const char* name)
: QObject(parent, name)
{
- m_categories.setAutoDelete(false);
reloadCategories();
}
CategoryMgr::~CategoryMgr()
{
- // Clear the categories list. Since AutoDelete is off. This is manual.
- if (m_categories.first())
- {
- Category* deleteMe;
-
- while ((deleteMe = m_categories.current()))
- {
- m_categories.remove();
-
- delete deleteMe;
- }
- }
+ qDeleteAll(m_categories);
+ m_categories.clear();
}
const CategoryList CategoryMgr::findCategories(const QString& filterString,
@@ -201,10 +190,13 @@
// iterate over all the categories looking for a match
CategoryListIterator it(m_categories);
- for (Category* curCategory = it.toFirst();
- curCategory != NULL;
- curCategory = ++it)
+ Category* curCategory;
+ while (it.hasNext())
{
+ curCategory = it.next();
+ if (!curCategory)
+ break;
+
// if it matches the category add it to the dictionary
if (curCategory->isFiltered(filterString, level))
tmpList.append(curCategory);
@@ -248,10 +240,11 @@
emit delCategory(cat);
// remove the category from the list
- m_categories.remove(cat);
-
- // delete the category
- delete cat;
+ // note: indexOf shouldn't modify the input string, but gcc is giving
+ // const errors anyway. So we'll work around it.
+ int i = m_categories.indexOf(const_cast<Category*>(cat));
+ if (i != -1)
+ delete m_categories.takeAt(i);
}
}
@@ -372,10 +365,13 @@
QString prefBaseName;
CategoryListIterator it(m_categories);
- for (Category* curCategory = it.toFirst();
- curCategory != NULL;
- curCategory = ++it)
+ Category* curCategory;
+ while(it.hasNext())
{
+ curCategory = it.next();
+ if (!curCategory)
+ break;
+
prefBaseName.sprintf("Category%d_", count++);
pSEQPrefs->setPrefString(prefBaseName + "Name", section,
curCategory->name());
Modified: showeq/branches/pre_6_0_beta/src/category.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/category.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/category.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -37,7 +37,7 @@
#include <QString>
#include <QColor>
-#include <Q3PtrList>
+#include <QList>
// stuff needed for CategoryDlg
#include <QDialog>
@@ -104,9 +104,9 @@
Q3Button* m_Color;
};
-typedef Q3PtrList<Category> CategoryList;
-typedef Q3PtrListIterator<Category> CategoryListIterator;
-typedef Q3PtrListIterator<const Category> CategoryListConstIterator;
+typedef QList<Category*> CategoryList;
+typedef QListIterator<Category*> CategoryListIterator;
+typedef QListIterator<const Category*> CategoryListConstIterator;
// ------------------------------------------------------
// CategoryMgr
Modified: showeq/branches/pre_6_0_beta/src/cgiconv.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/cgiconv.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/cgiconv.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -29,7 +29,7 @@
#define CGICONV_H
#include <QString>
-#include <Q3PtrList>
+#include <QList>
// class for handling POST action CGI forms
class CGI
@@ -104,7 +104,7 @@
QString value;
};
- typedef Q3PtrList<CGIParam> CGIParamList;
+ typedef QList<CGIParam*> CGIParamList;
// unescape the URL (decodes x-www-form-urlencoded)
QString unescapeURL(QString url);
Modified: showeq/branches/pre_6_0_beta/src/combatlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/combatlog.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -239,6 +239,12 @@
delete m_combat_defense_record;
m_combat_defense_record = 0;
}
+
+ qDeleteAll(m_combat_offense_list);
+ m_combat_offense_list.clear();
+
+ qDeleteAll(m_combat_mob_list);
+ m_combat_mob_list.clear();
}
CombatWindow::CombatWindow(Player* player,
@@ -255,9 +261,7 @@
so this is a good place to initialize some things which
otherwise won't be. */
- m_combat_offense_list.setAutoDelete(true);
m_combat_defense_record = new CombatDefenseRecord(player);
- m_combat_mob_list.setAutoDelete(true);
initUI();
}
@@ -535,9 +539,14 @@
CombatOffenseRecord *pRecord;
- for(pRecord = m_combat_offense_list.first(); pRecord != 0; pRecord = m_combat_offense_list.next())
- {
- int iType = pRecord->getType();
+ QList<CombatOffenseRecord*>::iterator it;
+ for(it = m_combat_offense_list.begin(); it != m_combat_offense_list.end(); ++it)
+ {
+ pRecord = *it;
+ if (!pRecord)
+ break;
+
+ int iType = pRecord->getType();
int iSpell = pRecord->getSpell();
int iHits = pRecord->getHits();
int iMisses = pRecord->getMisses();
@@ -722,9 +731,13 @@
CombatMobRecord *pRecord;
- for(pRecord = m_combat_mob_list.first(); pRecord != 0; pRecord = m_combat_mob_list.next())
- {
- int iID = pRecord->getID();
+ QList<CombatMobRecord*>::iterator it;
+ for(it = m_combat_mob_list.begin(); it != m_combat_mob_list.end(); ++it)
+ {
+ pRecord = *it;
+ if (!pRecord)
+ break;
+ int iID = pRecord->getID();
int iDuration = pRecord->getDuration() / 1000;
int iDamageGiven = pRecord->getDamageGiven();
double dDPS = pRecord->getDPS();
@@ -815,10 +828,15 @@
CombatOffenseRecord *pRecord;
- for(pRecord = m_combat_offense_list.first(); pRecord != 0; pRecord = m_combat_offense_list.next())
- {
- // Belith -- Lets match spells up as well
- if(pRecord->getType() == iType && pRecord->getType() != 231)
+ QList<CombatOffenseRecord*>::iterator it;
+
+ for(it = m_combat_offense_list.begin(); it != m_combat_offense_list.end(); ++it)
+ {
+ pRecord = *it;
+ if (!pRecord)
+ break;
+ // Belith -- Lets match spells up as well
+ if(pRecord->getType() == iType && pRecord->getType() != 231)
{
bFoundRecord = true;
break;
@@ -896,9 +914,14 @@
CombatMobRecord *pRecord;
- for(pRecord = m_combat_mob_list.first(); pRecord != 0; pRecord = m_combat_mob_list.next())
- {
- if(pRecord->getID() == iMobID)
+ QList<CombatMobRecord*>::iterator it;
+ for(it = m_combat_mob_list.begin(); it != m_combat_mob_list.end(); ++it)
+ {
+ pRecord = *it;
+ if (!pRecord)
+ break;
+
+ if(pRecord->getID() == iMobID)
{
bFoundRecord = true;
break;
@@ -971,6 +994,7 @@
"&OK", "&Cancel", QString::null, 1, 1 ) )
{
case 0:
+ qDeleteAll(m_combat_mob_list);
m_combat_mob_list.clear();
updateMob();
break;
@@ -987,6 +1011,7 @@
"&OK", "&Cancel", QString::null, 1, 1 ) )
{
case 0:
+ qDeleteAll(m_combat_offense_list);
m_combat_offense_list.clear();
updateOffense();
break;
Modified: showeq/branches/pre_6_0_beta/src/combatlog.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/combatlog.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/combatlog.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -26,7 +26,7 @@
# include <QObject>
# include <QWidget>
# include <QTabWidget>
-# include <Q3PtrList>
+# include <QList>
# include <Q3ListView>
# include <QComboBox>
# include <QLabel>
@@ -244,9 +244,9 @@
QLabel* m_label_mob_currentdps;
QLabel* m_label_mob_lastdps;
- Q3PtrList<CombatOffenseRecord> m_combat_offense_list;
+ QList<CombatOffenseRecord*> m_combat_offense_list;
CombatDefenseRecord *m_combat_defense_record;
- Q3PtrList<CombatMobRecord> m_combat_mob_list;
+ QList<CombatMobRecord*> m_combat_mob_list;
QMenuBar *m_menu_bar;
QMenu *m_clear_menu;
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -154,6 +154,9 @@
{
if (m_log)
::fclose(m_log);
+
+ qDeleteAll(m_exp_list);
+ m_exp_list.clear();
}
ExperienceWindow::ExperienceWindow(const DataLocationMgr* dataLocMgr,
@@ -288,9 +291,6 @@
fileInfo = m_dataLocMgr->findWriteFile("logs", "newexp.log");
m_newExpLogFile = fileInfo.absFilePath();
-
- // Clear the exp list on removes and deletes.
- m_exp_list.setAutoDelete(true);
}
void ExperienceWindow::savePrefs()
@@ -428,22 +428,25 @@
// start at the end, add up the xp & mob count until we hit the
// beginning of list
// or the time cutoff
- Q3PtrListIterator<ExperienceRecord> it(m_exp_list);
+ QListIterator<ExperienceRecord*> it(m_exp_list);
int mob_count = 0;
time_t first_kill_time = 0;
- it.toLast();
- while ( it.current() && it.current()->getTime() >= time_cutoff )
+ ExperienceRecord* rec;
+
+ it.toBack();
+ while (it.hasPrevious())
{
+ rec = it.previous();
+ if (rec->getTime() < time_cutoff)
+ break;
- total_exp+=it.current()->getExpGained();
+ total_exp+=rec->getExpGained();
mob_count++;
- if ( it.current()->getTime() < first_kill_time || !first_kill_time )
- first_kill_time = it.current()->getTime();
-
- --it;
+ if ( rec->getTime() < first_kill_time || !first_kill_time )
+ first_kill_time = rec->getTime();
}
// calculate the number of minutes that have passed
Modified: showeq/branches/pre_6_0_beta/src/experiencelog.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/experiencelog.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/experiencelog.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -37,7 +37,6 @@
#include <QResizeEvent>
#include <Q3VBoxLayout>
#include <QMenu>
-#include <Q3PtrList>
#include <cstdint>
#include <cstdio>
@@ -143,7 +142,7 @@
*m_experience_remaining, *m_play_time,
*m_experience_rate, *m_kills_to_level, *m_time_to_level;
- Q3PtrList<ExperienceRecord> m_exp_list;
+ QList<ExperienceRecord*> m_exp_list;
QMenuBar *m_menu_bar;
QMenu *m_view_menu, *m_exp_rate_menu, *m_ZEM_menu;
Modified: showeq/branches/pre_6_0_beta/src/filter.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/filter.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/filter.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -290,8 +290,12 @@
// iterate over the filters checking for a match
FilterListIterator it(m_filterItems);
- for (re = it.toFirst(); re != NULL; re = ++it)
+ while(it.hasNext())
{
+ re = it.next();
+ if (!re)
+ break;
+
if (re->isFiltered(filterString, level))
return true;
}
@@ -315,9 +319,15 @@
FilterListIterator it(m_filterItems);
// iterate over the filter items, saving them as we go along.
- for (re = it.toFirst(); re != NULL; re = ++it)
- re->save(indent, out);
+ while(it.hasNext())
+ {
+ re = it.next();
+ if (!re)
+ break;
+ re->save(indent, out);
+ }
+
// decrease indent
indent.remove(0, 4);
@@ -336,8 +346,12 @@
// Find a match in the list and the one previous to it
//while(re)
FilterListIterator it(m_filterItems);
- for (re = it.toFirst(); re != NULL; re = ++it)
+ while (it.hasNext())
{
+ re = it.next();
+ if (!re)
+ break;
+
if (re->name() == filterPattern) // if match
{
// remove the filter
@@ -411,9 +425,15 @@
FilterItem* re;
FilterListIterator it(m_filterItems);
- for (re = it.toFirst(); re != NULL; re = ++it)
+ while(it.hasNext())
+ {
+ re = it.next();
+ if (!re)
+ break;
+
if (re->name() == filterPattern)
return re;
+ }
return NULL;
}
@@ -428,8 +448,12 @@
#endif
FilterListIterator it(m_filterItems);
- for (re = it.toFirst(); re != NULL; re = ++it)
+ while(it.hasNext())
{
+ re = it.next();
+ if (!re)
+ break;
+
if (re->minLevel() || re->maxLevel())
seqInfo("\t'%s' (%d, %d)",
(const char*)re->name().utf8(), re->minLevel(), re->maxLevel());
Modified: showeq/branches/pre_6_0_beta/src/filter.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/filter.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/filter.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -32,7 +32,7 @@
#include <sys/types.h>
#include <QString>
-#include <Q3PtrList>
+#include <QList>
#include <QRegExp>
#include <QXmlAttributes>
#include <Q3TextStream>
@@ -48,8 +48,8 @@
//--------------------------------------------------
// typedefs
-typedef Q3PtrList<FilterItem> FilterList;
-typedef Q3PtrListIterator<FilterItem> FilterListIterator;
+typedef QList<FilterItem*> FilterList;
+typedef QListIterator<FilterItem*> FilterListIterator;
typedef std::map<uint32_t, QString> FilterTypeMap;
typedef std::map<uint32_t, Filter*> FilterMap;
Modified: showeq/branches/pre_6_0_beta/src/interface.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -97,7 +97,6 @@
#include <QCleanlooksStyle>
#include <QMenu>
#include <QWidgetAction>
-#include <Q3PtrList>
// this define is used to diagnose the order with which zone packets are rcvd
#define ZONE_ORDER_DIAG
@@ -5030,14 +5029,16 @@
out << "M," << spawn->realName() << ",blue," << trackList.count();
//iterate over the track, writing out the points
- for (trackPoint = trackIt.current();
- trackPoint;
- trackPoint = ++trackIt)
- {
- out << "," << trackPoint->x()
- << "," << trackPoint->y()
- << "," << trackPoint->z();
- }
+ while (trackIt.hasNext())
+ {
+ trackPoint = trackIt.next();
+ if (!trackPoint)
+ break;
+
+ out << "," << trackPoint->x()
+ << "," << trackPoint->y()
+ << "," << trackPoint->z();
+ }
out << endl;
}
Modified: showeq/branches/pre_6_0_beta/src/interface.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -37,7 +37,6 @@
#include <QSplitter>
#include <QList>
#include <QTimer>
-#include <Q3PtrList>
#include <QMessageBox>
#include <Q3TabDialog>
#include <QSpinBox>
Modified: showeq/branches/pre_6_0_beta/src/map.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/map.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -53,7 +53,7 @@
#include <Q3VBox>
#include <Q3HBox>
#include <QSpinBox>
-#include <Q3PtrList>
+#include <QList>
#include <QResizeEvent>
#include <QMouseEvent>
@@ -768,8 +768,8 @@
Q3HBox* m_depthControlBox;
QSpinBox* m_head;
QSpinBox* m_floor;
- Q3PtrList<QWidget> m_statusWidgets;
-
+ QList<QWidget*> m_statusWidgets;
+
QAction* m_action_topControl;
QAction* m_action_bottomControl;
QAction* m_action_zoom;
Modified: showeq/branches/pre_6_0_beta/src/mapcore.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/mapcore.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/mapcore.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -431,12 +431,6 @@
// MapData
MapData::MapData()
{
- // make all lists auto delete
- m_lLines.setAutoDelete(true);
- m_mLines.setAutoDelete(true);
- m_locations.setAutoDelete(true);
- m_aggros.setAutoDelete(true);
-
// clear the structure
clear();
}
@@ -443,6 +437,17 @@
MapData::~MapData()
{
+ qDeleteAll(m_lLines);
+ m_lLines.clear();
+
+ qDeleteAll(m_mLines);
+ m_mLines.clear();
+
+ qDeleteAll(m_locations);
+ m_locations.clear();
+
+ qDeleteAll(m_aggros);
+ m_aggros.clear();
}
void MapData::clear()
@@ -1176,11 +1181,12 @@
bool heightSet = false;
int16_t lastHeightSet = 0;
MapLineL* currentLineL;
- Q3PtrListIterator<MapLineL> mlit(m_lLines);
- for (currentLineL = mlit.toFirst();
- currentLineL != NULL;
- currentLineL = ++mlit)
+ QList<MapLineL*>::const_iterator mlit = m_lLines.begin();
+ for (mlit = m_lLines.begin();
+ mlit != m_lLines.end() && *mlit != NULL;
+ ++mlit)
{
+ currentLineL = *mlit;
// was the global height set?
if (currentLineL->heightSet())
{
@@ -1216,11 +1222,12 @@
// write out the M (3D) lines
MapLineM* currentLineM;
- Q3PtrListIterator<MapLineM> mmit(m_mLines);
- for (currentLineM = mmit.toFirst();
- currentLineM;
- currentLineM = ++mmit)
+ QList<MapLineM*>::const_iterator mmit = m_mLines.begin();
+ for (mmit = m_mLines.begin();
+ mmit != m_mLines.end() && *mmit != NULL;
+ ++mmit)
{
+ currentLineM = *mmit;
// write out the start of the line info
fprintf (fh, "M,%s,%s,%d",
(const char*)currentLineM->name(),
@@ -1240,10 +1247,10 @@
}
// write out location information
- Q3PtrListIterator<MapLocation> lit(m_locations);
- for(; lit.current(); ++lit)
+ QList<MapLocation*>::const_iterator lit = m_locations.begin();
+ for(; lit != m_locations.end() && *lit != NULL; ++lit)
{
- MapLocation* currentLoc = lit.current();
+ MapLocation* currentLoc = *lit;
if (!currentLoc->heightSet())
fprintf (fh, "P,%s,%s,%d,%d\n",
@@ -1261,11 +1268,11 @@
}
// write out aggro information
- Q3PtrListIterator<MapAggro> ait(m_aggros);
- for (; ait.current(); ++ait)
+ QList<MapAggro*>::const_iterator ait = m_aggros.begin();
+ for (; ait != m_aggros.end() && *ait != NULL; ++ait)
{
- MapAggro* currentAggro = ait.current();
-
+ MapAggro* currentAggro = *ait;
+
fprintf (fh, "A,%s,%d\n",
(const char*)currentAggro->name(), currentAggro->range());
}
@@ -1305,11 +1312,10 @@
float z1;
QString name;
MapLineL* currentLineL;
- Q3PtrListIterator<MapLineL> mlit(m_lLines);
- for (currentLineL = mlit.toFirst();
- currentLineL != NULL;
- currentLineL = ++mlit)
+ QList<MapLineL*>::const_iterator mlit = m_lLines.begin();
+ for (; mlit != m_lLines.end() && *mlit != NULL; ++mlit)
{
+ currentLineL = *mlit;
z1 = float(currentLineL->z());
const QColor& color = currentLineL->color();
@@ -1339,11 +1345,10 @@
// write out the M (3D) lines
MapLineM* currentLineM;
- Q3PtrListIterator<MapLineM> mmit(m_mLines);
- for (currentLineM = mmit.toFirst();
- currentLineM;
- currentLineM = ++mmit)
+ QList<MapLineM*>::const_iterator mmit = m_mLines.begin();
+ for (; mmit != m_mLines.end() && *mmit != NULL; ++mmit)
{
+ currentLineM = *mmit;
const QColor& color = currentLineM->color();
r = color.red();
g = color.green();
@@ -1367,12 +1372,11 @@
}
// write out location information
- Q3PtrListIterator<MapLocation> lit(m_locations);
+ QList<MapLocation*>::const_iterator lit = m_locations.begin();
MapLocation* currentLoc;
- for(currentLoc = lit.toFirst();
- currentLoc;
- currentLoc = ++lit)
+ for (; lit != m_locations.end() && *lit != NULL; ++lit)
{
+ currentLoc = *lit;
const QColor& color = currentLoc->color();
// convert spaces to underscores
@@ -1398,11 +1402,10 @@
bool MapData::isAggro(const QString& name, uint16_t* range) const
{
MapAggro* aggro;
- Q3PtrListIterator<MapAggro> ait(m_aggros);
- for (aggro = ait.toFirst();
- aggro != NULL;
- aggro = ++ait)
+ QList<MapAggro*>::const_iterator ait = m_aggros.begin();
+ for (; ait != m_aggros.end() && *ait != NULL; ++ait)
{
+ aggro = *ait;
// does the name match this aggro?
if (name.find(aggro->name(), 0, false) != -1)
{
@@ -1528,11 +1531,12 @@
{
// first scale down the L lines
MapLineL* currentLineL;
- Q3PtrListIterator<MapLineL> mlit(m_lLines);
- for (currentLineL = mlit.toFirst();
- currentLineL != NULL;
- currentLineL = ++mlit)
+ QList<MapLineL*>::const_iterator mlit = m_lLines.begin();
+ for (; mlit != m_lLines.end() && *mlit != NULL; ++mlit)
+ {
+ currentLineL = *mlit;
currentLineL->setZPos(currentLineL->z() / factor);
+ }
// finish off by scaling down the M lines
MapLineM* currentLineM;
@@ -1539,11 +1543,10 @@
MapPoint* mData;
size_t numPoints;
size_t i;
- Q3PtrListIterator<MapLineM> mmit(m_mLines);
- for (currentLineM = mmit.toFirst();
- currentLineM;
- currentLineM = ++mmit)
+ QList<MapLineM*>::const_iterator mmit = m_mLines.begin();
+ for (; mmit != m_mLines.end() && *mmit != NULL; ++mmit)
{
+ currentLineM = *mmit;
// get the number of points in the line
numPoints = currentLineM->size();
@@ -1559,11 +1562,12 @@
{
// first scale down the L lines
MapLineL* currentLineL;
- Q3PtrListIterator<MapLineL> mlit(m_lLines);
- for (currentLineL = mlit.toFirst();
- currentLineL != NULL;
- currentLineL = ++mlit)
+ QList<MapLineL*>::const_iterator mlit = m_lLines.begin();
+ for (; mlit != m_lLines.end() && *mlit != NULL; ++mlit)
+ {
+ currentLineL = *mlit;
currentLineL->setZPos(currentLineL->z() * factor);
+ }
// finish off by scaling down the M lines
MapLineM* currentLineM;
@@ -1570,11 +1574,10 @@
MapPoint* mData;
size_t numPoints;
size_t i;
- Q3PtrListIterator<MapLineM> mmit(m_mLines);
- for (currentLineM = mmit.toFirst();
- currentLineM;
- currentLineM = ++mmit)
+ QList<MapLineM*>::const_iterator mmit = m_mLines.begin();
+ for (; mmit != m_mLines.end() && *mmit != NULL; ++mmit)
{
+ currentLineM = *mmit;
// get the number of points in the line
numPoints = currentLineM->size();
@@ -1710,11 +1713,10 @@
MapPoint* mData;
// first paint the L lines
- Q3PtrListIterator<MapLineL> mlit(m_lLines);
- for (currentLineL = mlit.toFirst();
- currentLineL != NULL;
- currentLineL = ++mlit)
+ QList<MapLineL*>::const_iterator mlit = m_lLines.begin();
+ for (; mlit != m_lLines.end() && *mlit != NULL; ++mlit)
{
+ currentLineL = *mlit;
// if line is outside the currently visible region, skip it.
if (!currentLineL->boundingRect().intersects(screenBounds))
continue;
@@ -1761,11 +1763,10 @@
}
// then paint the M lines
- Q3PtrListIterator<MapLineM> mmit(m_mLines);
- for (currentLineM = mmit.toFirst();
- currentLineM;
- currentLineM = ++mmit)
+ QList<MapLineM*>::const_iterator mmit = m_mLines.begin();
+ for (; mmit != m_mLines.end() && *mmit != NULL; ++mmit)
{
+ currentLineM = *mmit;
// if line is outside the currently visible region, skip it.
if (!currentLineM->boundingRect().intersects(screenBounds))
continue;
@@ -1846,11 +1847,10 @@
MapPoint playerPos = param.player();
// first paint the L lines
- Q3PtrListIterator<MapLineL> mlit(m_lLines);
- for (currentLineL = mlit.toFirst();
- currentLineL != NULL;
- currentLineL = ++mlit)
+ QList<MapLineL*>::const_iterator mlit = m_lLines.begin();
+ for (; mlit != m_lLines.end() && *mlit != NULL; ++mlit)
{
+ currentLineL = *mlit;
// if line is outside the currently visible region, skip it.
if (!currentLineL->boundingRect().intersects(screenBounds))
continue;
@@ -1904,11 +1904,10 @@
}
// then paint the M lines
- Q3PtrListIterator<MapLineM> mmit(m_mLines);
- for (currentLineM = mmit.toFirst();
- currentLineM;
- currentLineM = ++mmit)
+ QList<MapLineM*>::const_iterator mmit = m_mLines.begin();
+ for (; mmit != m_mLines.end() && *mmit != NULL; ++mmit)
{
+ currentLineM = *mmit;
// if line is outside the currently visible region, skip it.
if (!currentLineM->boundingRect().intersects(screenBounds))
continue;
@@ -2005,11 +2004,10 @@
double botb = 255 - (botm * playerPos.z());
// first paint the L lines
- Q3PtrListIterator<MapLineL> mlit(m_lLines);
- for (currentLineL = mlit.toFirst();
- currentLineL != NULL;
- currentLineL = ++mlit)
+ QList<MapLineL*>::const_iterator mlit = m_lLines.begin();
+ for (; mlit != m_lLines.end() && *mlit != NULL; ++mlit)
{
+ currentLineL = *mlit;
// if line is outside the currently visible region, skip it.
if (!currentLineL->boundingRect().intersects(screenBounds))
continue;
@@ -2080,11 +2078,10 @@
}
// then paint the M lines
- Q3PtrListIterator<MapLineM> mmit(m_mLines);
- for (currentLineM = mmit.toFirst();
- currentLineM;
- currentLineM = ++mmit)
+ QList<MapLineM*>::const_iterator mmit = m_mLines.begin();
+ for (; mmit != m_mLines.end() && *mmit != NULL; ++mmit)
{
+ currentLineM = *mmit;
// if line is outside the currently visible region, skip it.
if (!currentLineM->boundingRect().intersects(screenBounds))
continue;
@@ -2176,10 +2173,10 @@
p.setFont(param.font());
// iterate over all the map locations
- Q3PtrListIterator<MapLocation> lit(m_locations);
- for(; lit.current(); ++lit)
+ QList<MapLocation*>::const_iterator lit = m_locations.begin();
+ for (; lit != m_locations.end() && *lit != NULL; ++lit)
{
- MapLocation* currentLoc = lit.current();
+ MapLocation* currentLoc = *lit;
// set the color
QColor color(currentLoc->color());
Modified: showeq/branches/pre_6_0_beta/src/mapcore.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/mapcore.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/mapcore.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -45,7 +45,7 @@
#include <QColor>
#include <QFont>
#include <QPixmap>
-#include <Q3PtrList>
+#include <QList>
#include <Q3PointArray>
#include "point.h"
@@ -556,10 +556,10 @@
int16_t minY() const { return m_minY; }
int16_t maxX() const { return m_maxX; }
int16_t maxY() const { return m_maxY; }
- Q3PtrList<MapLineL>& lLines() { return m_lLines; }
- Q3PtrList<MapLineM>& mLines() { return m_mLines; }
- Q3PtrList<MapLocation>& locations() { return m_locations; }
- Q3PtrList<MapAggro>& aggros() { return m_aggros; }
+ QList<MapLineL*>& lLines() { return m_lLines; }
+ QList<MapLineM*>& mLines() { return m_mLines; }
+ QList<MapLocation*>& locations() { return m_locations; }
+ QList<MapAggro*>& aggros() { return m_aggros; }
const QPixmap& image() const { return m_image; }
bool imageLoaded() const { return m_imageLoaded; }
bool mapLoaded() const { return m_mapLoaded; }
@@ -604,12 +604,12 @@
QString m_fileName;
QString m_zoneLongName;
QString m_zoneShortName;
- Q3PtrList<MapLineL> m_lLines;
- Q3PtrList<MapLineM> m_mLines;
+ QList<MapLineL*> m_lLines;
+ QList<MapLineM*> m_mLines;
MapLineM* m_editLineM;
- Q3PtrList<MapLocation> m_locations;
+ QList<MapLocation*> m_locations;
MapLocation* m_editLocation;
- Q3PtrList<MapAggro> m_aggros;
+ QList<MapAggro*> m_aggros;
uint8_t m_zoneZEM;
QPixmap m_image;
bool m_imageLoaded;
Modified: showeq/branches/pre_6_0_beta/src/mapicon.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/mapicon.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/mapicon.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -1024,7 +1024,7 @@
{
SpawnTrackListIterator trackIt(spawn->trackList());
- const SpawnTrackPoint* trackPoint = trackIt.current();
+ const SpawnTrackPoint* trackPoint = trackIt.next();
if (trackPoint)
{
if (!mapIcon.useWalkPathPen())
@@ -1036,9 +1036,13 @@
x_1 = trackPoint->x();
y_1 = trackPoint->y();
-
- while ((trackPoint = ++trackIt) != NULL)
+
+ while (trackIt.hasNext())
{
+ trackPoint = trackIt.next();
+ if (!trackPoint)
+ break;
+
x_2 = trackPoint->x();
y_2 = trackPoint->y();
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -226,7 +226,6 @@
: m_opcode(0),
m_implicitLen(0)
{
- setAutoDelete(true);
}
EQPacketOPCode::EQPacketOPCode(uint16_t opcode, const QString& name)
@@ -234,7 +233,6 @@
m_implicitLen(0),
m_name(name)
{
- setAutoDelete(true);
}
EQPacketOPCode::EQPacketOPCode(const EQPacketOPCode& opcode)
@@ -243,11 +241,12 @@
m_name(opcode.m_name),
m_updated(opcode.m_updated)
{
- setAutoDelete(true);
}
EQPacketOPCode::~EQPacketOPCode()
{
+ qDeleteAll(*this);
+ clear();
}
EQPacketPayload* EQPacketOPCode::find(const uint8_t* data, size_t size, uint8_t dir) const
@@ -256,14 +255,14 @@
// iterate over the payloads until a matching one is found
EQPayloadListIterator it(*this);
- while ((payload = it.current()) != 0)
+ while (it.hasNext())
{
+ payload = it.next();
+ if (!payload)
+ break;
// if a match is found, return it.
if (payload->match(data, size, dir))
return payload;
-
- // iterate to the next payload
- ++it;
}
// no matches, return 0
@@ -388,9 +387,13 @@
Q3CString sztStr;
// iterate over the payloads
- Q3PtrListIterator<EQPacketPayload> pit(*currentOPCode);
- while ((currentPayload = pit.current()) != 0)
+ QListIterator<EQPacketPayload*> pit(*currentOPCode);
+ while (pit.hasNext())
{
+ currentPayload = pit.next();
+ if (!currentPayload)
+ break;
+
// output the payload
out << indent << "<payload dir=\"" << dirStrs[currentPayload->dir()-1]
<< "\" typename=\"" << currentPayload->typeName()
@@ -397,8 +400,6 @@
<< "\" sizechecktype=\""
<< sztStrs[currentPayload->sizeCheckType()]
<< "\"/>" << endl;
-
- ++pit;
}
// decrease the indent
@@ -468,14 +469,16 @@
fprintf(stderr, "\t\t%d payload(s)\n", current->count());
- Q3PtrListIterator<EQPacketPayload> pit(*current);
- while ((currentPayload = pit.current()) != 0)
+ QListIterator<EQPacketPayload*> pit(*current);
+ while (pit.hasNext())
{
+ currentPayload = pit.next();
+ if (!currentPayload)
+ break;
+
seqInfo("\t\t\tdir=%d typename=%s size=%d sizechecktype=%d",
currentPayload->dir(), (const char*)currentPayload->typeName(),
currentPayload->typeSize(), currentPayload->sizeCheckType());
-
- ++pit;
}
}
}
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -28,7 +28,7 @@
#include <cstdint>
#include <QObject>
-#include <Q3PtrList>
+#include <QList>
#include <QHash>
#include <QByteArray>
#include <Q3CString>
@@ -121,8 +121,8 @@
};
// Payload list typedef
-typedef Q3PtrList<EQPacketPayload> EQPayloadList;
-typedef Q3PtrListIterator<EQPacketPayload> EQPayloadListIterator;
+typedef QList<EQPacketPayload*> EQPayloadList;
+typedef QListIterator<EQPacketPayload*> EQPayloadListIterator;
inline const Q3CString& EQPacketPayload::typeName() const
{
Modified: showeq/branches/pre_6_0_beta/src/packetstream.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetstream.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/packetstream.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -127,15 +127,16 @@
// try to find a matching payload for this opcode
EQPayloadListIterator pit(*opcode);
- while ((payload = pit.current()) != 0)
+ while (pit.hasNext())
{
+ payload = pit.next();
+ if (!payload)
+ break;
// if all the parameters match, then use this payload
if ((payload->dir() & m_dir) &&
(payload->typeName() == payloadType) &&
(payload->sizeCheckType() == szt))
break;
-
- ++pit;
}
// if no payload found, create one and issue a warning
@@ -424,8 +425,11 @@
// iterate over the payloads in the opcode entry, and dispatch matches
EQPayloadListIterator pit(*opcodeEntry);
bool found = false;
- while ((payload = pit.current()) != 0)
+ while (pit.hasNext())
{
+ payload = pit.next();
+ if (!payload)
+ break;
// see if this packet matches
if (payload->match(data, len, m_dir))
{
@@ -450,9 +454,6 @@
dispatch->activate(data, len, m_dir);
}
}
-
- // go to next possible payload
- ++pit;
}
#ifdef PACKET_PAYLOAD_SIZE_DIAG
@@ -462,11 +463,14 @@
tempStr.sprintf("%s (%#04x) (dataLen: %lu) doesn't match:",
(const char*)opcodeEntry->name(), opcodeEntry->opcode(),
len);
-
- for (payload = pit.toFirst();
- payload != 0;
- payload = ++pit)
+
+ pit.toFront();
+ while (pit.hasNext())
{
+ payload = pit.next();
+ if (!payload)
+ break;
+
if (payload->dir() & m_dir)
{
if (payload->sizeCheckType() == SZC_Match)
Modified: showeq/branches/pre_6_0_beta/src/spawn.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawn.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/spawn.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -317,9 +317,6 @@
Spawn::Spawn(const spawnStruct* s)
: Item(tSpawn, s->spawnId)
{
- // turn on auto delete for the track list
- m_spawnTrackList.setAutoDelete(true);
-
// have update initialize everything
update(s);
}
@@ -360,9 +357,6 @@
setGM(0);
setConsidered(false);
- // turn on auto delete for the track list
- m_spawnTrackList.setAutoDelete(true);
-
// Finally, note when this update ocurred
updateLast();
}
@@ -416,17 +410,12 @@
setDeltas(s->deltaX(), s->deltaY(), s->deltaZ());
setHeading(s->heading(), s->deltaHeading());
setConsidered(s->considered());
-
- // the new copy will own the spawn track list
- m_spawnTrackList.setAutoDelete(false);
- m_spawnTrackList = s->m_spawnTrackList;
- s->m_spawnTrackList.setAutoDelete(false);
- m_spawnTrackList.setAutoDelete(true);
}
Spawn::~Spawn()
{
// clear out the spawn track list
+ qDeleteAll(m_spawnTrackList);
m_spawnTrackList.clear();
}
@@ -588,13 +577,13 @@
// only insert if the change includes either an x or y change, not just z
if ((count == 0) ||
- ((m_spawnTrackList.getLast()->x() != x) ||
- (m_spawnTrackList.getLast()->y() != y)))
+ ((m_spawnTrackList.last()->x() != x) ||
+ (m_spawnTrackList.last()->y() != y)))
{
// if the walk path length is limited, make sure not to exceed the limit
if ((walkpathlength > 0) &&
- (count > 2) && (count > walkpathlength))
- m_spawnTrackList.removeFirst();
+ (count > 2) && (count > walkpathlength))
+ delete m_spawnTrackList.takeFirst();
// append the new entry to the end of the list
m_spawnTrackList.append(new SpawnTrackPoint(x, y, z));
Modified: showeq/branches/pre_6_0_beta/src/spawn.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawn.h 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/spawn.h 2020-10-25 22:16:10 UTC (rev 1068)
@@ -41,7 +41,7 @@
#include <cmath>
#include <ctime>
-#include <Q3PtrList>
+#include <QList>
#include <QDateTime>
#include <QDataStream>
@@ -113,8 +113,8 @@
// type definitions
typedef Point3D<int16_t> EQPoint;
typedef EQPoint SpawnTrackPoint;
-typedef Q3PtrList<SpawnTrackPoint> SpawnTrackList;
-typedef Q3PtrListIterator<SpawnTrackPoint> SpawnTrackListIterator;
+typedef QList<SpawnTrackPoint*> SpawnTrackList;
+typedef QListIterator<SpawnTrackPoint*> SpawnTrackListIterator;
//----------------------------------------------------------------------
// constants
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -381,9 +381,12 @@
SpawnListItem* catlitem;
// iterate over all the categories
- for(cat = cit.toFirst(); cat != NULL; cat = ++cit)
- {
- // skip filtered spawns, if this isn't a filtered filter category
+ while(cit.hasNext())
+ {
+ cat = cit.next();
+ if (!cat)
+ break;
+
if ((item->filterFlags() & FILTER_FLAG_FILTERED) &&
!cat->isFilteredFilter())
{
@@ -435,18 +438,11 @@
SpawnListItem *j = NULL;
// create a list of items to be deleted
- Q3PtrList<Q3ListViewItem>* delList = new Q3PtrList<Q3ListViewItem>();
+ QList<Q3ListViewItem*>* delList = new QList<Q3ListViewItem*>();
- // set the list to automatically delete the items placed in it when it is
- // cleared/deleted...
- delList->setAutoDelete(true);
-
// create a list of categories to be updated
- Q3PtrList<const Category> catUpdateList;
+ QList<const Category*> catUpdateList;
- // make sure it doesn't attempt to delete the category
- catUpdateList.setAutoDelete(false);
-
const Category* cat;
// start at the top of the list
@@ -491,11 +487,15 @@
} while (j);
// delete the list of items to be deleted, which auto-deletes the items
+ qDeleteAll(*delList);
+ delList->clear();
delete delList;
// now iterate over the updated categories and update them
- for (cat = catUpdateList.first(); cat != 0; cat = catUpdateList.next())
+ QList<const Category*>::iterator cit;
+ for (cit = catUpdateList.begin(); cit != catUpdateList.end() && *cit != NULL; ++cit)
{
+ cat = *cit;
// retrieve the category list item
SpawnListItem* catlitem = m_categoryListItems.value((void*)cat, nullptr);
@@ -725,8 +725,12 @@
CategoryListIterator it(m_categoryMgr->getCategories());
SpawnListItem* litem;
const Category* cat;
- for (cat = it.toFirst(); cat != NULL; cat = ++it)
+ while (it.hasNext())
{
+ cat = it.next();
+ if (!cat)
+ break;
+
// create the spawn list item
litem = new SpawnListItem(this);
@@ -976,52 +980,60 @@
while (it.hasNext())
{
it.next();
- // get the item from the list
- item = it.value();
- if (!item)
- break;
+ // get the item from the list
+ item = it.value();
+ if (!item)
+ break;
- // retrieve the filter string
- filterStr = filterString(item, flags);
+ // retrieve the filter string
+ filterStr = filterString(item, flags);
- // iterate over all the categories
- for(cat = cit.toFirst(); cat != NULL; cat = ++cit)
- {
- // skip filtered spawns
- if ((item->filterFlags() & FILTER_FLAG_FILTERED) &&
- !cat->isFilteredFilter())
- continue;
+ // iterate over all the categories
+ while (cit.hasNext())
+ {
+ cat = cit.next();
+ if (!cat)
+ break;
- // if item is a spawn, get its level
- if ((item->type() == tSpawn) || (item->type() == tPlayer))
- level = ((Spawn*)item)->level();
+ // skip filtered spawns
+ if ((item->filterFlags() & FILTER_FLAG_FILTERED) &&
+ !cat->isFilteredFilter())
+ continue;
- // does this spawn match the category
- if (cat->isFiltered(filterStr, level))
- {
- // retrieve the category list item
- catlitem = m_categoryListItems.value((void*)cat, nullptr);
+ // if item is a spawn, get its level
+ if ((item->type() == tSpawn) || (item->type() == tPlayer))
+ level = ((Spawn*)item)->level();
- // yes, add it
- litem = new SpawnListItem(catlitem);
+ // does this spawn match the category
+ if (cat->isFiltered(filterStr, level))
+ {
+ // retrieve the category list item
+ catlitem = m_categoryListItems.value((void*)cat, nullptr);
- // set up the list item
- litem->setShellItem(item);
- litem->update(m_player, tSpawnChangedALL);
-
- // color the spawn
- litem->pickTextColor(item, m_player, cat->color());
- }
- }
+ // yes, add it
+ litem = new SpawnListItem(catlitem);
+
+ // set up the list item
+ litem->setShellItem(item);
+ litem->update(m_player, tSpawnChangedALL);
+
+ // color the spawn
+ litem->pickTextColor(item, m_player, cat->color());
+ }
+ }
}
}
// done adding items, now iterate over all the categories and
// update the counts
- for(cat = cit.toFirst(); cat != NULL; cat = ++cit)
+ while (cit.hasNext())
{
- catlitem = m_categoryListItems.value((void*)cat, nullptr);
- catlitem->updateTitle(cat->name());
+ cat = cit.next();
+ if (!cat)
+ break;
+
+ catlitem = m_categoryListItems.value((void*)cat, nullptr);
+ catlitem->updateTitle(cat->name());
}
}
else
@@ -1038,18 +1050,18 @@
while (it.hasNext())
{
it.next();
- // get the item from the list
- item = it.value();
- if (!item)
- break;
+ // get the item from the list
+ item = it.value();
+ if (!item)
+ break;
- // just create a new SpawnListItem
- litem = new SpawnListItem(this);
- litem->setShellItem(item);
-
- // color spawn
- litem->pickTextColor(item, m_player);
- litem->update(m_player, tSpawnChangedALL);
+ // just create a new SpawnListItem
+ litem = new SpawnListItem(this);
+ litem->setShellItem(item);
+
+ // color spawn
+ litem->pickTextColor(item, m_player);
+ litem->update(m_player, tSpawnChangedALL);
}
}
}
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-25 19:42:18 UTC (rev 1067)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-25 22:16:10 UTC (rev 1068)
@@ -470,8 +470,14 @@
// fill in the category combo box
CategoryListIterator it(m_categoryMgr->getCategories());
const Category* cat;
- for (cat = it.toFirst(); cat != NULL; cat = ++it)
+ while(it.hasNext())
+ {
+ cat = it.next();
+ if (!cat)
+ break;
+
m_categoryCombo->insertItem(cat->name());
+ }
int n = pSEQPrefs->getPrefInt("CurrentCategory", preferenceName(), 0);
m_categoryCombo->setCurrentItem(n);
@@ -724,11 +730,13 @@
void SpawnListWindow2::categorySelected(int index)
{
CategoryListIterator it(m_categoryMgr->getCategories());
- Category* cat = it.toFirst();
+ Category* cat = nullptr;
int i = 0;
- while ((cat != NULL) && (i < index))
+ while (it.hasNext() && (i < index))
{
- cat = ++it;
+ cat = it.next();
+ if (!cat)
+ break;
++i;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 19:42:21
|
Revision: 1067
http://sourceforge.net/p/seq/svn/1067
Author: cn187
Date: 2020-10-25 19:42:18 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3ValueList with QList
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/interface.cpp
showeq/branches/pre_6_0_beta/src/interface.h
showeq/branches/pre_6_0_beta/src/messages.h
showeq/branches/pre_6_0_beta/src/spawnlist.cpp
showeq/branches/pre_6_0_beta/src/spawnlist.h
showeq/branches/pre_6_0_beta/src/spelllist.cpp
showeq/branches/pre_6_0_beta/src/spelllist.h
showeq/branches/pre_6_0_beta/src/spellshell.cpp
showeq/branches/pre_6_0_beta/src/spellshell.h
Modified: showeq/branches/pre_6_0_beta/src/interface.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 19:42:18 UTC (rev 1067)
@@ -76,7 +76,7 @@
#include <QApplication>
#include <QLabel>
#include <QPushButton>
-#include <Q3ValueList>
+#include <QList>
#include <Q3ValueVector>
#include <QStatusBar>
#include <QLineEdit>
Modified: showeq/branches/pre_6_0_beta/src/interface.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 19:42:18 UTC (rev 1067)
@@ -35,7 +35,7 @@
#include <Q3HBox>
#include <Q3VBox>
#include <QSplitter>
-#include <Q3ValueList>
+#include <QList>
#include <QTimer>
#include <Q3PtrList>
#include <QMessageBox>
Modified: showeq/branches/pre_6_0_beta/src/messages.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/messages.h 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/messages.h 2020-10-25 19:42:18 UTC (rev 1067)
@@ -31,7 +31,7 @@
#include <QObject>
#include <QString>
-#include <Q3ValueList>
+#include <QList>
//----------------------------------------------------------------------
// forward declarations
@@ -39,7 +39,7 @@
//----------------------------------------------------------------------
// MessageList
-typedef Q3ValueList<MessageEntry> MessageList;
+typedef QList<MessageEntry> MessageList;
//----------------------------------------------------------------------
// Messages
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 19:42:18 UTC (rev 1067)
@@ -49,7 +49,6 @@
#endif
#include <cmath>
#include <regex.h>
-//Added by qt3to4:
#include <QMenu>
// ------------------------------------------------------
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.h 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.h 2020-10-25 19:42:18 UTC (rev 1067)
@@ -44,7 +44,6 @@
#include <cstdio>
#include <sys/time.h>
-#include <Q3ValueList>
#include <Q3ListView>
#include <QHash>
#include <Q3TextStream>
Modified: showeq/branches/pre_6_0_beta/src/spelllist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spelllist.cpp 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/spelllist.cpp 2020-10-25 19:42:18 UTC (rev 1067)
@@ -28,7 +28,7 @@
#include <QPainter>
#include <QLayout>
-#include <Q3ValueList>
+#include <QList>
#include <QMenu>
#include "spelllist.h"
@@ -197,7 +197,7 @@
if (!item)
return NULL;
- Q3ValueList<SpellListItem *>::Iterator it;
+ QList<SpellListItem *>::Iterator it;
for(it = m_spellList.begin(); it != m_spellList.end(); it++) {
if ((*it)->item() == item)
break;
@@ -259,7 +259,7 @@
SpellListItem* SpellList::Find(const SpellItem *item)
{
if (item) {
- Q3ValueList<SpellListItem*>::Iterator it;
+ QList<SpellListItem*>::Iterator it;
for(it = m_spellList.begin(); it != m_spellList.end(); ++it) {
if ((*it)->item() == item)
return (*it);
Modified: showeq/branches/pre_6_0_beta/src/spelllist.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spelllist.h 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/spelllist.h 2020-10-25 19:42:18 UTC (rev 1067)
@@ -29,7 +29,7 @@
#ifndef SPELLLIST_H
#define SPELLLIST_H
-#include <Q3ValueList>
+#include <QList>
#include <Q3ListView>
#include <Q3PopupMenu>
#include <ctime>
@@ -109,8 +109,8 @@
private:
void selectAndOpen(SpellListItem *);
SpellShell* m_spellShell;
- Q3ValueList<QString> m_categoryList;
- Q3ValueList<SpellListItem *> m_spellList;
+ QList<QString> m_categoryList;
+ QList<SpellListItem *> m_spellList;
QMenu *m_menu;
int mid_spellName, mid_spellId;
Modified: showeq/branches/pre_6_0_beta/src/spellshell.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spellshell.cpp 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/spellshell.cpp 2020-10-25 19:42:18 UTC (rev 1067)
@@ -30,8 +30,7 @@
#include "packetcommon.h"
#include "spawn.h"
#include "diagnosticmessages.h"
-//Added by qt3to4:
-#include <Q3ValueList>
+#include <QList>
//#define DIAG_SPELLSHELL 1
@@ -138,7 +137,7 @@
SpellItem* SpellShell::findSpell(uint16_t spellId,
uint16_t targetId, const QString& targetName)
{
- for(Q3ValueList<SpellItem*>::Iterator it = m_spellList.begin();
+ for(QList<SpellItem*>::Iterator it = m_spellList.begin();
it != m_spellList.end();
it++)
{
@@ -156,7 +155,7 @@
SpellItem* SpellShell::findSpell(int spell_id)
{
- for(Q3ValueList<SpellItem*>::Iterator it = m_spellList.begin();
+ for(QList<SpellItem*>::Iterator it = m_spellList.begin();
it != m_spellList.end();
it++)
{
@@ -174,7 +173,7 @@
emit clearSpells();
m_lastPlayerSpell = 0;
- for(Q3ValueList<SpellItem*>::Iterator it = m_spellList.begin();
+ for(QList<SpellItem*>::Iterator it = m_spellList.begin();
it != m_spellList.end(); it++)
delete (*it);
@@ -454,7 +453,7 @@
if (b) {
// Can't really tell which spell/target, so just delete the last one
- for(Q3ValueList<SpellItem*>::Iterator it = m_spellList.begin();
+ for(QList<SpellItem*>::Iterator it = m_spellList.begin();
it != m_spellList.end(); it++) {
if ((*it)->spellName() == spell) {
(*it)->setDuration(0);
@@ -468,7 +467,7 @@
{
m_lastPlayerSpell = 0;
SpellItem* spell;
- for(Q3ValueList<SpellItem*>::Iterator it = m_spellList.begin();
+ for(QList<SpellItem*>::Iterator it = m_spellList.begin();
it != m_spellList.end(); it++)
{
spell = *it;
@@ -497,7 +496,7 @@
m_lastPlayerSpell = 0;
}
- Q3ValueList<SpellItem*>::Iterator it = m_spellList.begin();
+ QList<SpellItem*>::Iterator it = m_spellList.begin();
while(it != m_spellList.end())
{
spell = *it;
@@ -525,7 +524,7 @@
{
SpellItem* spell;
- Q3ValueList<SpellItem*>::Iterator it = m_spellList.begin();
+ QList<SpellItem*>::Iterator it = m_spellList.begin();
while (it != m_spellList.end())
{
spell = *it;
Modified: showeq/branches/pre_6_0_beta/src/spellshell.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spellshell.h 2020-10-25 19:42:12 UTC (rev 1066)
+++ showeq/branches/pre_6_0_beta/src/spellshell.h 2020-10-25 19:42:18 UTC (rev 1067)
@@ -30,7 +30,7 @@
#define SPELLSHELL_H
#include <QTimer>
-#include <Q3ValueList>
+#include <QList>
#include <Q3ListView>
#include <ctime>
#include <cstdio>
@@ -218,7 +218,7 @@
Player* m_player;
SpawnShell* m_spawnShell;
Spells* m_spells;
- Q3ValueList<SpellItem *> m_spellList;
+ QList<SpellItem *> m_spellList;
SpellItem* m_lastPlayerSpell;
QTimer *m_timer;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 19:42:13
|
Revision: 1066
http://sourceforge.net/p/seq/svn/1066
Author: cn187
Date: 2020-10-25 19:42:12 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3StrList with QList
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/map.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.h
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-25 17:59:46 UTC (rev 1065)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-25 19:42:12 UTC (rev 1066)
@@ -62,7 +62,7 @@
#include <QColorDialog>
#include <QFontDialog>
#include <QTimer>
-#include <Q3StrList>
+#include <QStringList>
#include <QImage>
#include <QImageWriter>
#include <QMenu>
@@ -4561,10 +4561,11 @@
void Map::saveMapImage(void)
{
- Q3StrList formats(QImageWriter::supportedImageFormats());
+ QList<QByteArray> formats(QImageWriter::supportedImageFormats());
QString filters;
- for (char* tmp =formats.first(); tmp != 0; tmp = formats.next())
- filters += QString(tmp) + QString(" (*.") + QString(tmp) + ")\n";
+ QList<QByteArray>::iterator it;
+ for (it = formats.begin(); it != formats.end(); ++it)
+ filters += QString(*it) + QString(" (*.") + QString(*it) + ")\n";
QFileDialog fileDlg(this, "Save Map Image Filename", QString(), filters);
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 17:59:46 UTC (rev 1065)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 19:42:12 UTC (rev 1066)
@@ -26,7 +26,6 @@
#include <QObject>
#include <QMetaObject>
-#include <Q3StrList>
#include <QFile>
#include <QXmlAttributes>
#include <Q3TextStream>
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 17:59:46 UTC (rev 1065)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 19:42:12 UTC (rev 1066)
@@ -32,7 +32,6 @@
#include <QHash>
#include <QByteArray>
#include <Q3CString>
-#include <Q3StrList>
#include <QStringList>
#include <Q3TextStream>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 17:59:49
|
Revision: 1065
http://sourceforge.net/p/seq/svn/1065
Author: cn187
Date: 2020-10-25 17:59:46 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3PtrDict with QHash
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/guildlist.cpp
showeq/branches/pre_6_0_beta/src/guildlist.h
showeq/branches/pre_6_0_beta/src/interface.cpp
showeq/branches/pre_6_0_beta/src/interface.h
showeq/branches/pre_6_0_beta/src/packetinfo.h
showeq/branches/pre_6_0_beta/src/packetstream.cpp
showeq/branches/pre_6_0_beta/src/packetstream.h
showeq/branches/pre_6_0_beta/src/spawnlist.cpp
showeq/branches/pre_6_0_beta/src/spawnlist.h
showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
showeq/branches/pre_6_0_beta/src/spawnlist2.h
Modified: showeq/branches/pre_6_0_beta/src/guildlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-10-25 17:59:46 UTC (rev 1065)
@@ -150,13 +150,11 @@
QWidget* parent, const char* name)
: SEQWindow("GuildList", "ShowEQ - Guild Member List", parent, name),
m_player(player),
- m_guildShell(guildShell),
- m_guildListItemDict(709),
+ m_guildShell(guildShell),
+ m_guildListItemDict(),
m_menu(0),
m_membersOn(0)
{
- m_guildListItemDict.setAutoDelete(false);
-
// get whether to show offline guildmates or not
m_showOffline = pSEQPrefs->getPrefBool("ShowOffline", preferenceName(),
false);
@@ -309,7 +307,7 @@
void GuildListWindow::updated(const GuildMember* member)
{
- GuildListItem* memberItem = m_guildListItemDict.find((void*)member);
+ GuildListItem* memberItem = m_guildListItemDict.value((void*)member, nullptr);
if (memberItem)
{
@@ -340,10 +338,7 @@
if (bRemove)
{
// remove the item from the item dictionary
- m_guildListItemDict.remove((void*)member);
-
- // delete the item
- delete memberItem;
+ delete m_guildListItemDict.take((void*)member);
}
else
{
@@ -477,6 +472,7 @@
m_membersOn = 0;
// clear out the guild list item dictionary
+ qDeleteAll(m_guildListItemDict);
m_guildListItemDict.clear();
// clear the guild list contents
Modified: showeq/branches/pre_6_0_beta/src/guildlist.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/guildlist.h 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/guildlist.h 2020-10-25 17:59:46 UTC (rev 1065)
@@ -34,7 +34,7 @@
#include "seqlistview.h"
#include <Q3ListView>
-#include <Q3PtrDict>
+#include <QHash>
#include <QString>
#include <QLabel>
#include <QMenu>
@@ -128,7 +128,7 @@
QLabel* m_guildName;
QLabel* m_guildTotals;
SEQListView* m_guildList;
- Q3PtrDict<GuildListItem> m_guildListItemDict;
+ QHash<void*, GuildListItem*> m_guildListItemDict;
QMenu* m_menu;
QAction* m_action_guildList_Cols[tGuildListColMaxCols];
Modified: showeq/branches/pre_6_0_beta/src/interface.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 17:59:46 UTC (rev 1065)
@@ -141,7 +141,7 @@
m_unknownZoneLog(0),
m_opcodeMonitorLog(0),
m_selectedSpawn(0),
- m_windowsMenus(11),
+ m_windowsMenus(),
m_compass(0),
m_expWindow(0),
m_combatWindow(0),
@@ -152,10 +152,6 @@
// disable the dock menu
setDockMenuEnabled(false);
- // make sure the windows menus list doesn't autodelete, because its
- // contents will be deleted by the respective owners.
- m_windowsMenus.setAutoDelete(false);
-
setCentralWidget(new QWidget(this, "filler"));
setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum, false));
@@ -6371,7 +6367,7 @@
void EQInterface::removeWindowMenu(SEQWindow* window)
{
// find the windows menu id
- QAction* menuAction = m_windowsMenus.find((void*)window);
+ QAction* menuAction = m_windowsMenus.value((void*)window, nullptr);
// if the window had a menu, then remove it
if (menuAction)
@@ -6379,7 +6375,7 @@
m_windowMenu->removeAction(menuAction);
// remove the item from the list
- m_windowsMenus.remove(window);
+ delete m_windowsMenus.take(window);
}
}
Modified: showeq/branches/pre_6_0_beta/src/interface.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 17:59:46 UTC (rev 1065)
@@ -42,7 +42,6 @@
#include <Q3TabDialog>
#include <QSpinBox>
#include <QHash>
-#include <Q3PtrDict>
#include <Q3TextStream>
#include "everquest.h"
#include "spawnlist.h"
@@ -411,7 +410,7 @@
QMenu* m_terminalShowUserFilterMenu;
QMenu* m_terminalHideUserFilterMenu;
QMenu* m_windowMenu;
- Q3PtrDict<QAction> m_windowsMenus;
+ QHash<void*, QAction*> m_windowsMenus;
QMenu* m_filterZoneDataMenu;
CompassFrame* m_compass;
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 17:59:46 UTC (rev 1065)
@@ -28,7 +28,6 @@
#include <cstdint>
#include <QObject>
-#include <Q3PtrDict>
#include <Q3PtrList>
#include <QHash>
#include <QByteArray>
Modified: showeq/branches/pre_6_0_beta/src/packetstream.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetstream.cpp 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/packetstream.cpp 2020-10-25 17:59:46 UTC (rev 1065)
@@ -79,7 +79,7 @@
QObject* parent, const char* name)
: QObject(parent, name),
m_opcodeDB(opcodeDB),
- m_dispatchers(61), // prime number that should be plenty large
+ m_dispatchers(),
m_streamid(streamid),
m_dir(dir),
m_packetCount(0),
@@ -96,7 +96,6 @@
m_decodeKey(0),
m_validKey(true)
{
- m_dispatchers.setAutoDelete(true);
}
////////////////////////////////////////////////////
@@ -104,6 +103,8 @@
EQPacketStream::~EQPacketStream()
{
reset();
+ qDeleteAll(m_dispatchers);
+ m_dispatchers.clear();
}
////////////////////////////////////////////////////
@@ -151,7 +152,7 @@
}
// attempt to find an existing dispatch
- EQPacketDispatch* dispatch = m_dispatchers.find((void*)payload);
+ EQPacketDispatch* dispatch = m_dispatchers.value((void*)payload, nullptr);
// if no existing dispatch was found, create one
if (!dispatch)
@@ -438,7 +439,7 @@
#endif
// find the dispather for the payload
- dispatch = m_dispatchers.find((void*)payload);
+ dispatch = m_dispatchers.value((void*)payload, nullptr);
// if found, dispatch
if (dispatch)
Modified: showeq/branches/pre_6_0_beta/src/packetstream.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetstream.h 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/packetstream.h 2020-10-25 17:59:46 UTC (rev 1065)
@@ -25,6 +25,7 @@
#define _PACKETSTREAM_H_
#include <QObject>
+#include <QHash>
#include <map>
#include "packetcommon.h"
@@ -134,7 +135,7 @@
EQPacketOPCodeDB& m_opcodeDB;
- Q3PtrDict<EQPacketDispatch> m_dispatchers;
+ QHash<void*, EQPacketDispatch*> m_dispatchers;
EQStreamID m_streamid;
uint8_t m_dir;
int m_packetCount;
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 17:59:46 UTC (rev 1065)
@@ -394,7 +394,7 @@
if (cat->isFiltered(filterStr, level))
{
// retrieve the list item associated with the category
- catlitem = m_categoryListItems.find((void*)cat);
+ catlitem = m_categoryListItems.value((void*)cat, nullptr);
// We have a good category, add spawn as it's child
j = new SpawnListItem(catlitem);
@@ -498,7 +498,7 @@
for (cat = catUpdateList.first(); cat != 0; cat = catUpdateList.next())
{
// retrieve the category list item
- SpawnListItem* catlitem = m_categoryListItems.find((void*)cat);
+ SpawnListItem* catlitem = m_categoryListItems.value((void*)cat, nullptr);
// update the list items title
catlitem->updateTitle(cat->name());
@@ -763,7 +763,7 @@
void SpawnList::delCategory(const Category* cat)
{
// retrieve the list item associated with the category
- SpawnListItem* litem = m_categoryListItems.find((void*)cat);
+ SpawnListItem* litem = m_categoryListItems.value((void*)cat, nullptr);
// if there's a list item associated with this category, clean it out
if (litem != NULL)
@@ -789,10 +789,7 @@
}
// remove the item from the category list
- m_categoryListItems.remove((void*)cat);
-
- // delete the list item
- delete litem;
+ delete m_categoryListItems.take((void*)cat);
}
}
@@ -799,6 +796,7 @@
void SpawnList::clearedCategories(void)
{
// clear out the list of category list items
+ qDeleteAll(m_categoryListItems);
m_categoryListItems.clear();
// clear out the list
@@ -855,13 +853,14 @@
if (slitem->parent() == NULL)
{
cat = NULL;
- Q3PtrDictIterator<SpawnListItem> it(m_categoryListItems);
-
- for (it.toFirst(); it.current() != NULL; ++it)
+ QHash<void*, SpawnListItem*>::iterator it;
+
+ for (it = m_categoryListItems.begin();
+ it != m_categoryListItems.end() && *it != NULL; ++it)
{
- if (slitem == it.current())
+ if (slitem == *it)
{
- cat = (const Category*)it.currentKey();
+ cat = (const Category*)it.key();
break;
}
}
@@ -896,7 +895,7 @@
ItemConstIterator it(itemMap);
const Item* item;
SpawnListItem* litem;
- SpawnListItem* catlitem = m_categoryListItems.find((void*)cat);
+ SpawnListItem* catlitem = m_categoryListItems.value((void*)cat, nullptr);
// iterate over all spawn types
for (uint8_t i = 0; i < (sizeof(types) / sizeof(spawnItemType)); i++)
@@ -1002,7 +1001,7 @@
if (cat->isFiltered(filterStr, level))
{
// retrieve the category list item
- catlitem = m_categoryListItems.find((void*)cat);
+ catlitem = m_categoryListItems.value((void*)cat, nullptr);
// yes, add it
litem = new SpawnListItem(catlitem);
@@ -1022,7 +1021,7 @@
// update the counts
for(cat = cit.toFirst(); cat != NULL; cat = ++cit)
{
- catlitem = m_categoryListItems.find((void*)cat);
+ catlitem = m_categoryListItems.value((void*)cat, nullptr);
catlitem->updateTitle(cat->name());
}
}
@@ -1141,12 +1140,13 @@
// find that in m_categoryList
if (j)
{
- Q3PtrDictIterator<SpawnListItem> it(m_categoryListItems);
-
- for (it.toFirst(); it.current() != NULL; ++it)
+ QHash<void*, SpawnListItem*>::iterator it;
+
+ for (it = m_categoryListItems.begin();
+ it != m_categoryListItems.end() && *it != NULL; ++it)
{
- if (j == it.current())
- return (const Category*)it.currentKey();
+ if (j == *it)
+ return (const Category*)it.key();
}
}
}
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.h 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.h 2020-10-25 17:59:46 UTC (rev 1065)
@@ -46,7 +46,7 @@
#include <Q3ValueList>
#include <Q3ListView>
-#include <Q3PtrDict>
+#include <QHash>
#include <Q3TextStream>
#include <QMenu>
@@ -142,7 +142,7 @@
SpawnShell* m_spawnShell;
// category pointer used as keys to look up the associated SpawnListItem
- Q3PtrDict<SpawnListItem> m_categoryListItems;
+ QHash<void*, SpawnListItem*> m_categoryListItems;
SpawnListMenu* m_menu;
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-25 17:59:46 UTC (rev 1065)
@@ -47,11 +47,9 @@
m_currentCategory(NULL),
m_selectedItem(NULL),
m_menu(NULL),
- m_spawnListItemDict(709),
+ m_spawnListItemDict(),
m_immediateUpdate(true)
{
- m_spawnListItemDict.setAutoDelete(false);
-
// get whether to keep the list sorted or not
m_keepSorted = pSEQPrefs->getPrefBool("KeepSorted", preferenceName(), false);
@@ -198,7 +196,7 @@
SpawnListItem* SpawnListWindow2::find(const Item* item)
{
- return m_spawnListItemDict.find((void*)item);
+ return m_spawnListItemDict.value((void*)item, nullptr);
}
QString SpawnListWindow2::filterString(const Item* item)
@@ -272,10 +270,8 @@
// delete the list item
if (litem != NULL)
{
- m_spawnListItemDict.remove((void*)item);
+ delete m_spawnListItemDict.take((void*)item);
- delete litem;
-
updateCount();
}
@@ -326,9 +322,7 @@
// delete the item (if it already existed)
if (litem != NULL)
{
- m_spawnListItemDict.remove((void*)item);
-
- delete litem;
+ delete m_spawnListItemDict.take((void*)item);
// update the displayed count
updateCount();
@@ -344,9 +338,7 @@
// delete the item (if it already existed)
if (litem != NULL)
{
- m_spawnListItemDict.remove((void*)item);
-
- delete litem;
+ delete m_spawnListItemDict.take((void*)item);
// update the displayed count
updateCount();
@@ -420,6 +412,7 @@
void SpawnListWindow2::clear(void)
{
// clear out the spawn list item dictionary
+ qDeleteAll(m_spawnListItemDict);
m_spawnListItemDict.clear();
// clear the spawn list contents
@@ -631,9 +624,7 @@
// delete the item (if it already existed)
if (litem != NULL)
{
- m_spawnListItemDict.remove((void*)item);
-
- delete litem;
+ delete m_spawnListItemDict.take((void*)item);
}
// nothing more to do for this item
@@ -651,9 +642,7 @@
// delete the item (if it already existed)
if (litem != NULL)
{
- m_spawnListItemDict.remove((void*)item);
-
- delete litem;
+ delete m_spawnListItemDict.take((void*)item);
}
// nothing more to do for this item
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.h 2020-10-25 17:24:10 UTC (rev 1064)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.h 2020-10-25 17:59:46 UTC (rev 1065)
@@ -23,7 +23,7 @@
#ifndef SPAWNLIST2_H
#define SPAWNLIST2_H
-#include <Q3PtrDict>
+#include <QHash>
#include <QMenu>
#include "seqwindow.h"
@@ -132,8 +132,8 @@
QLineEdit* m_totalSpawns;
// index dictionary for retrieving SpawnListItems by Item
- Q3PtrDict<SpawnListItem> m_spawnListItemDict;
-
+ QHash<void*, SpawnListItem*> m_spawnListItemDict;
+
// timer used
QTimer* m_timer;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 17:24:17
|
Revision: 1064
http://sourceforge.net/p/seq/svn/1064
Author: cn187
Date: 2020-10-25 17:24:10 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Cast QKeySequence to string for compatibility
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp
Modified: showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp 2020-10-25 04:34:55 UTC (rev 1063)
+++ showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp 2020-10-25 17:24:10 UTC (rev 1064)
@@ -713,10 +713,10 @@
case QVariant::Double:
return QKeySequence(preference->value<QKeySequence>());
default:
- qWarning("XMLPreferences::getPrefKey(%s, %s, %d): preference found,\n"
+ qWarning("XMLPreferences::getPrefKey(%s, %s, %s): preference found,\n"
"\tbut type %s is not convertable to type key!",
- (const char*)inName, (const char*)inSection, def,
- preference->typeName());
+ (const char*)inName, (const char*)inSection,
+ (const char*)def.toString(), preference->typeName());
return QKeySequence(def);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 04:34:57
|
Revision: 1063
http://sourceforge.net/p/seq/svn/1063
Author: cn187
Date: 2020-10-25 04:34:55 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Fix QByteArray copy error
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/packetinfo.cpp
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 04:20:17 UTC (rev 1062)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 04:34:55 UTC (rev 1063)
@@ -126,7 +126,7 @@
while (it.hasNext())
{
it.next();
- seqInfo("\t%s = %d", it.key(), it.value());
+ seqInfo("\t%s = %d", it.key().data(), it.value());
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 04:20:20
|
Revision: 1062
http://sourceforge.net/p/seq/svn/1062
Author: cn187
Date: 2020-10-25 04:20:17 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3IntDict with QHash
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/bazaarlog.cpp
showeq/branches/pre_6_0_beta/src/eqstr.cpp
showeq/branches/pre_6_0_beta/src/eqstr.h
showeq/branches/pre_6_0_beta/src/interface.cpp
showeq/branches/pre_6_0_beta/src/interface.h
showeq/branches/pre_6_0_beta/src/map.cpp
showeq/branches/pre_6_0_beta/src/map.h
showeq/branches/pre_6_0_beta/src/packet.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.h
showeq/branches/pre_6_0_beta/src/spawnlist.cpp
showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
showeq/branches/pre_6_0_beta/src/spawnshell.cpp
showeq/branches/pre_6_0_beta/src/spawnshell.h
Modified: showeq/branches/pre_6_0_beta/src/bazaarlog.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/bazaarlog.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/bazaarlog.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -64,7 +64,7 @@
char *p;
if ((p = rindex(name,'(')) != NULL && isdigit(*(p+1)))
*p=0;
- Item *merchant = m_shell.spawns().find(resp.player_id);
+ Item *merchant = m_shell.spawns().value(resp.player_id, nullptr);
const char *merchant_name = "unknown";
if (merchant)
merchant_name = merchant->name();
Modified: showeq/branches/pre_6_0_beta/src/eqstr.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/eqstr.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/eqstr.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -34,17 +34,14 @@
#include <Q3ValueVector>
#include <Q3CString>
-EQStr::EQStr(int size)
- : m_messageStrings(size),
+EQStr::EQStr()
+ : m_messageStrings(),
m_loaded(false)
{
- // make sure strings get deleted
- m_messageStrings.setAutoDelete(true);
}
EQStr::~EQStr()
{
- // not really necessary, but just for completeness sake
m_messageStrings.clear();
}
@@ -103,7 +100,7 @@
maxFormatId = formatId;
// insert the format string into the dictionary.
- m_messageStrings.insert(formatId, new QString((*it).mid(spc+1)));
+ m_messageStrings.insert(formatId, QString((*it).mid(spc+1)));
}
// note that strings are loaded
@@ -119,24 +116,19 @@
QString EQStr::find(uint32_t formatid) const
{
// attempt to find the message string
- QString* res = m_messageStrings.find(formatid);
+ QString res = m_messageStrings.value(formatid, QString());
- // if the message string was found, return it
- if (res)
- return *res;
-
- // otherwise return a NULL/Empty QString
- return QString();
+ return res;
}
QString EQStr::message(uint32_t formatid) const
{
// attempt to find the message string
- QString* res = m_messageStrings.find(formatid);
+ QString res = m_messageStrings.value(formatid, QString());
// if the message string was found, return it
- if (res)
- return *res;
+ if (!res.isEmpty())
+ return res;
// otherwise return a fabricated string
return QString("Unknown: ") + QString::number(formatid, 16);
@@ -145,11 +137,11 @@
QString EQStr::formatMessage(uint32_t formatid,
const char* arguments, size_t argsLen) const
{
- QString* formatStringRes = m_messageStrings.find(formatid);
+ QString formatStringRes = m_messageStrings.value(formatid, QString());
QString tempStr;
- if (formatStringRes == NULL)
+ if (formatStringRes.isEmpty())
{
uint32_t arg_len;
unsigned char *cp;
@@ -193,12 +185,12 @@
int curPos;
size_t substArg;
int substArgValue;
- QString* substFormatStringRes;
+ QString substFormatStringRes;
QString substFormatString;
////////////////////////////
// replace template (%T) arguments in formatted string
- QString formatString = *formatStringRes;
+ QString formatString = formatStringRes;
QRegExp rxt("%T(\\d{1,3})", true, false);
// find first template substitution
@@ -206,7 +198,7 @@
while (curPos != -1)
{
- substFormatStringRes = NULL;
+ substFormatStringRes = QString();
substArg = rxt.cap(1).toInt(&ok);
if (ok && (substArg <= argList.size()))
{
@@ -213,12 +205,12 @@
substArgValue = argList[substArg-1].toInt(&ok);
if (ok)
- substFormatStringRes = m_messageStrings.find(substArgValue);
+ substFormatStringRes = m_messageStrings.value(substArgValue, QString());
}
// replace template argument with subst string
- if (substFormatStringRes != NULL)
- formatString.replace(curPos, rxt.matchedLength(), *substFormatStringRes);
+ if (substFormatStringRes.isEmpty())
+ formatString.replace(curPos, rxt.matchedLength(), substFormatStringRes);
else
curPos += rxt.matchedLength(); // if no replacement string, skip over
Modified: showeq/branches/pre_6_0_beta/src/eqstr.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/eqstr.h 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/eqstr.h 2020-10-25 04:20:17 UTC (rev 1062)
@@ -27,7 +27,7 @@
#include <cstdint>
-#include <Q3IntDict>
+#include <QHash>
#include <QString>
//----------------------------------------------------------------------
@@ -35,7 +35,7 @@
class EQStr
{
public:
- EQStr(int size = 8009);
+ EQStr();
~EQStr();
bool load(const QString& eqstrFile);
@@ -45,7 +45,7 @@
const char* arguments, size_t argslen) const;
protected:
- Q3IntDict<QString> m_messageStrings;
+ QHash<int, QString> m_messageStrings;
bool m_loaded;
};
Modified: showeq/branches/pre_6_0_beta/src/interface.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/interface.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -262,7 +262,7 @@
m_spells = new Spells(fileInfo.absFilePath());
// Create the EQStr storage
- m_eqStrings = new EQStr(8009); // increase if the number of strings exeeds
+ m_eqStrings = new EQStr();
// Create the Zone Manager
m_zoneMgr = new ZoneMgr(this, "zonemgr");
@@ -4995,12 +4995,17 @@
// iterate over the spawns adding their paths to the file
ItemConstIterator it(m_spawnShell->getConstMap(tSpawn));
const Item* item;
- for (item = it.current(); item != 0; item = ++it)
+ while (it.hasNext())
{
+ it.next();
+ item = it.value();
+ if (!item)
+ break;
+
if ((item->NPC() == SPAWN_NPC) ||
(item->NPC() == SPAWN_NPC_CORPSE) ||
(item->NPC() == SPAWN_NPC_UNKNOWN))
- saveSpawnPath(out, it.current());
+ saveSpawnPath(out, it.value());
}
seqInfo("Finished writing '%s'!\n", (const char*)fileName);
Modified: showeq/branches/pre_6_0_beta/src/interface.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/interface.h 2020-10-25 04:20:17 UTC (rev 1062)
@@ -41,7 +41,7 @@
#include <QMessageBox>
#include <Q3TabDialog>
#include <QSpinBox>
-#include <Q3IntDict>
+#include <QHash>
#include <Q3PtrDict>
#include <Q3TextStream>
#include "everquest.h"
@@ -436,10 +436,10 @@
QLabel* m_stsbarZEM;
QString ipstr[5];
- QString macstr[5];
-
- Q3IntDict<QString> m_formattedMessageStrings;
+ QString macstr[5];
+ QHash<QString, QString> m_formattedMessageStrings;
+
QAction* m_action_character_Class[PLAYER_CLASSES];
QAction* m_action_character_Race[PLAYER_RACES];
QAction* m_action_log_AllPackets;
Modified: showeq/branches/pre_6_0_beta/src/map.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/map.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -300,10 +300,10 @@
{
}
-uint16_t MapMgr::spawnAggroRange(const Spawn* spawn)
-{
- uint16_t* range = m_spawnAggroRange.find(spawn->id());
- return (!range) ? 0 : *range;
+uint16_t MapMgr::spawnAggroRange(const Spawn* spawn)
+{
+ uint16_t range = m_spawnAggroRange.value(spawn->id(), 0);
+ return range;
}
void MapMgr::zoneBegin(const QString& shortZoneName)
@@ -458,24 +458,23 @@
// iterate over the exixsting spawns to adjust the map size and find
// ones with aggro information
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
// Adjust X and Y for spawns on map
m_mapData.quickCheckPos(item->x(), item->y());
-
+
if (m_mapData.isAggro(item->transformedName(), &range))
{
// create a range to insert into the dictionary
- uint16_t* newrange = new uint16_t;
-
- // save the range value
- *newrange = range;
-
+
// insert the spawns ID and aggro range into the dictionary.
- m_spawnAggroRange.insert(item->id(), newrange);
+ m_spawnAggroRange.insert(item->id(), range);
}
}
@@ -525,14 +524,8 @@
uint16_t range;
if (m_mapData.isAggro(item->transformedName(), &range))
{
- // create a range to insert into the dictionary
- uint16_t* newrange = new uint16_t;
-
- // save the range value
- *newrange = range;
-
// insert the spawns ID and aggro range into the dictionary.
- m_spawnAggroRange.insert(item->id(), newrange);
+ m_spawnAggroRange.insert(item->id(), range);
}
// signal that the map has changed
@@ -3464,10 +3457,13 @@
p.setPen(Qt::yellow);
/* Paint the dropped items */
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
filterFlags = item->filterFlags();
@@ -3521,10 +3517,13 @@
p.setPen(QColor (110, 60, 0));
/* Paint the door items */
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = (const Door*)it.current();
+ item = (const Door*)it.value();
+ if (!item)
+ break;
filterFlags = item->filterFlags();
@@ -3723,14 +3722,14 @@
/* Paint the spawns */
const Spawn* spawn;
// iterate over all spawns in of the current type
- while (it.current())
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
- // increment iterator to the next spawn
- ++it;
-
#ifdef DEBUGMAP
spawn = spawnType(item);
@@ -4421,11 +4420,14 @@
ItemConstIterator it(itemMap);
// iterate over all spawns in of the current type
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
-
+ item = it.value();
+ if (!item)
+ break;
+
if (m_spawnDepthFilter &&
((item->z() > m_param.playerHeadRoom()) ||
(item->z() < m_param.playerFloorRoom())))
Modified: showeq/branches/pre_6_0_beta/src/map.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/map.h 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/map.h 2020-10-25 04:20:17 UTC (rev 1062)
@@ -39,7 +39,7 @@
#include <QLabel>
#include <QToolTip>
#include <QRegExp>
-#include <Q3IntDict>
+#include <QHash>
#include <Q3TextStream>
#include <QDateTime>
#include <QPen>
@@ -216,8 +216,8 @@
QWidget* m_dialogParent;
CLineDlg *m_dlgLineProps;
MapData m_mapData;
- Q3IntDict<uint16_t> m_spawnAggroRange;
-
+ QHash<int, uint16_t> m_spawnAggroRange;
+
QString m_curLineColor;
QString m_curLineName;
QString m_curLocationColor;
Modified: showeq/branches/pre_6_0_beta/src/packet.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packet.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/packet.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -126,8 +126,8 @@
m_packetTypeDB->list();
#endif
- // create the world opcode db (with hash size of 29)
- m_worldOPCodeDB = new EQPacketOPCodeDB(29);
+ // create the world opcode db
+ m_worldOPCodeDB = new EQPacketOPCodeDB();
// load the world opcode db
if (!m_worldOPCodeDB->load(*m_packetTypeDB, worldopcodesxml))
@@ -139,9 +139,9 @@
//m_worldOPCodeDB->save("/tmp/worldopcodes.xml");
- // create the zone opcode db (with hash size of 211)
- m_zoneOPCodeDB = new EQPacketOPCodeDB(211);
-
+ // create the zone opcode db
+ m_zoneOPCodeDB = new EQPacketOPCodeDB();
+
// load the zone opcode db
if (!m_zoneOPCodeDB->load(*m_packetTypeDB, zoneopcodesxml))
seqFatal("Error loading '%s'!", (const char*)zoneopcodesxml);
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -274,10 +274,9 @@
//----------------------------------------------------------------------
// EQPacketOPCodeDB
-EQPacketOPCodeDB::EQPacketOPCodeDB(int size)
- : m_opcodes(size)
+EQPacketOPCodeDB::EQPacketOPCodeDB()
+ : m_opcodes()
{
- m_opcodes.setAutoDelete(true);
}
EQPacketOPCodeDB::~EQPacketOPCodeDB()
@@ -344,15 +343,17 @@
OrderedMap orderedOPCodes;
// iterate over all the opcodes, inserting them into the ordered map
- Q3IntDictIterator<EQPacketOPCode> it(m_opcodes);
- while ((currentOPCode = it.current()) != NULL)
+ QHashIterator<int, EQPacketOPCode*> it(m_opcodes);
+ while (it.hasNext())
{
+ it.next();
+ if (!it.value())
+ break;
+ currentOPCode = it.value();
// insert into the ordered opcode map
orderedOPCodes.insert(OrderedMap::value_type(currentOPCode->opcode(),
currentOPCode));
- // get next opcode
- ++it;
}
OrderedMap::iterator oit;
@@ -431,8 +432,6 @@
void EQPacketOPCodeDB::list(void) const
{
- m_opcodes.statistics();
-
seqInfo("EQPacketOPCodeDB contains %d opcodes (in %d buckets)",
m_opcodes.count(), m_opcodes.size());
@@ -440,11 +439,15 @@
EQPacketPayload* currentPayload;
// iterate over all the opcodes
- Q3IntDictIterator<EQPacketOPCode> it(m_opcodes);
- while ((current = it.current()) != NULL)
+ QHashIterator<int, EQPacketOPCode*> it(m_opcodes);
+ while (it.hasNext())
{
+ it.next();
+ if (!it.value())
+ break;
+ current = it.value();
fprintf(stderr, "\tkey=%04lx opcode=%04x",
- it.currentKey(), current->opcode());
+ it.key(), current->opcode());
if (!current->name().isNull())
fprintf(stderr, " name='%s'", current->name().latin1());
@@ -475,8 +478,6 @@
++pit;
}
-
- ++it;
}
}
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 04:20:17 UTC (rev 1062)
@@ -32,7 +32,6 @@
#include <Q3PtrList>
#include <QHash>
#include <QByteArray>
-#include <Q3IntDict>
#include <Q3CString>
#include <Q3StrList>
#include <QStringList>
@@ -269,7 +268,7 @@
class EQPacketOPCodeDB
{
public:
- EQPacketOPCodeDB(int size);
+ EQPacketOPCodeDB();
~EQPacketOPCodeDB();
bool load(const EQPacketTypeDB& typeDB, const QString& filename);
@@ -285,10 +284,10 @@
bool move(const QString& oldOPCodeName, const QString& newOPCodeName);
const EQPacketOPCode* find(uint16_t opcode) const;
const EQPacketOPCode* find(const QString& opcodeName) const;
- const Q3IntDict<EQPacketOPCode> opcodes() const;
+ const QHash<int, EQPacketOPCode*> opcodes() const;
protected:
- Q3IntDict<EQPacketOPCode> m_opcodes;
+ QHash<int, EQPacketOPCode*> m_opcodes;
QHash<QString, EQPacketOPCode*> m_opcodesByName;
};
@@ -301,7 +300,7 @@
inline EQPacketOPCode* EQPacketOPCodeDB::edit(uint16_t opcode)
{
// attempt to find the opcode object
- return m_opcodes.find(opcode);
+ return m_opcodes.value(opcode, nullptr);
}
inline EQPacketOPCode* EQPacketOPCodeDB::edit(const QString& name)
@@ -313,7 +312,7 @@
inline const EQPacketOPCode* EQPacketOPCodeDB::find(uint16_t opcode) const
{
// attempt to find the opcode object
- return m_opcodes.find(opcode);
+ return m_opcodes.value(opcode, nullptr);
}
inline const EQPacketOPCode* EQPacketOPCodeDB::find(const QString& opcode) const
@@ -322,7 +321,7 @@
return m_opcodesByName.value(opcode, nullptr);
}
-inline const Q3IntDict<EQPacketOPCode> EQPacketOPCodeDB::opcodes() const
+inline const QHash<int, EQPacketOPCode*> EQPacketOPCodeDB::opcodes() const
{
return m_opcodes;
}
Modified: showeq/branches/pre_6_0_beta/src/spawnlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/spawnlist.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -906,10 +906,14 @@
uint8_t level = 0;
// iterate over all spawns in of the current type
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
// skip filtered spawns
if ((item->filterFlags() & FILTER_FLAG_FILTERED) &&
@@ -969,12 +973,15 @@
const ItemMap& itemMap = m_spawnShell->getConstMap(types[i]);
ItemConstIterator it(itemMap);
uint8_t level = 0;
-
+
// iterate over all spawns in of the current type
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
// retrieve the filter string
filterStr = filterString(item, flags);
@@ -1028,12 +1035,15 @@
{
const ItemMap& itemMap = m_spawnShell->getConstMap(types[i]);
ItemConstIterator it(itemMap);
-
+
// iterate over all spawns in of the current type
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
// just create a new SpawnListItem
litem = new SpawnListItem(this);
Modified: showeq/branches/pre_6_0_beta/src/spawnlist2.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/spawnlist2.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -609,10 +609,13 @@
ItemConstIterator it(itemMap);
// iterate over all spawns in of the current type
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
// if item hasn't changed since last update, then nothing to do, next...
if (item->lastChanged() <= m_lastUpdate)
@@ -909,10 +912,13 @@
uint8_t level = 0;
// iterate over all spawns in of the current type
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
// get the item from the list
- item = it.current();
+ item = it.value();
+ if (!item)
+ break;
// skip filtered spawns
if ((item->filterFlags() & FILTER_FLAG_FILTERED) &&
Modified: showeq/branches/pre_6_0_beta/src/spawnshell.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnshell.cpp 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/spawnshell.cpp 2020-10-25 04:20:17 UTC (rev 1062)
@@ -108,10 +108,10 @@
m_player(player),
m_filterMgr(filterMgr),
m_guildMgr(guildMgr),
- m_spawns(701),
- m_drops(211),
- m_doors(307),
- m_players(2)
+ m_spawns(),
+ m_drops(),
+ m_doors(),
+ m_players()
{
m_cntDeadSpawnIDs = 0;
m_posDeadSpawnIDs = 0;
@@ -118,14 +118,6 @@
for (int i = 0; i < MAX_DEAD_SPAWNIDS; i++)
m_deadSpawnID[i] = 0;
- // these should auto delete
- m_spawns.setAutoDelete(true);
- m_drops.setAutoDelete(true);
- m_doors.setAutoDelete(true);
-
- // we don't want this one to auto-delete
- m_players.setAutoDelete(false);
-
// bogus list
m_players.insert(0, m_player);
@@ -166,6 +158,11 @@
m_timer->start(showeq_params->saveSpawnsFrequency, true);
}
+SpawnShell::~SpawnShell()
+{
+ clear();
+}
+
void SpawnShell::clear(void)
{
#ifdef SPAWNSHELL_DIAG
@@ -174,8 +171,13 @@
emit clearItems();
+ qDeleteAll(m_spawns);
m_spawns.clear();
+
+ qDeleteAll(m_doors);
m_doors.clear();
+
+ qDeleteAll(m_drops);
m_drops.clear();
// clear the players list, reinsert the player
@@ -199,7 +201,7 @@
return (const Item*)m_player;
if (type != tPlayer)
- item = getMap(type).find(id);
+ item = getMap(type).value(id, nullptr);
return item;
}
@@ -217,11 +219,15 @@
// find closest spawn
// iterate over all the items in the map
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// get the item
- item = it.current();
-
+ item = it.value();
+ if (!item)
+ break;
+
// calculate the distance from the specified point
distance = item->calcDist(x, y);
@@ -243,10 +249,14 @@
ItemIterator it(m_spawns);
Spawn* spawn;
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// the item and coerce it to the Spawn type
- spawn = (Spawn*)it.current();
+ spawn = (Spawn*)it.value();
+ if (!spawn)
+ break;
if (name == spawn->name())
return spawn;
@@ -265,7 +275,7 @@
#endif
ItemMap& theMap = getMap(type);
- Item* item = theMap.find(id);
+ Item* item = theMap.value(id, nullptr);
if (item != NULL)
{
@@ -329,8 +339,14 @@
{
ItemIterator it(getMap(type));
- for (; it.current(); ++it)
- out << it.current()->dumpString() << endl;
+ while (it.hasNext())
+ {
+ it.next();
+ if (!it.value())
+ break;
+
+ out << it.value()->dumpString() << endl;
+ }
}
// same-name slots, connecting to Packet signals
@@ -402,7 +418,7 @@
seqDebug("SpawnShell::newGroundItem(makeDropStruct *)");
#endif
- Drop* item = (Drop*)m_drops.find(ds.dropId);
+ Drop* item = (Drop*)m_drops.value(ds.dropId, nullptr);
if (item != NULL)
{
item->update(&ds, name);
@@ -459,7 +475,7 @@
#ifdef SPAWNSHELL_DIAG
seqDebug("SpawnShell::newDoorSpawn(doorStruct*)");
#endif
- Item* item = m_doors.find(d.doorId);
+ Item* item = m_doors.value(d.doorId, nullptr);
if (item != NULL)
{
Door* door = (Door*)item;
@@ -794,7 +810,7 @@
}
else
{
- if((item=m_spawns.find(spawn->spawnId)))
+ if((item=m_spawns.value(spawn->spawnId, nullptr)))
{
// Update existing spawn
Spawn *s=(Spawn*)item;
@@ -851,7 +867,7 @@
}
}
- Item* item = m_spawns.find(s.spawnId);
+ Item* item = m_spawns.value(s.spawnId, nullptr);
if (item != NULL)
{
Spawn* spawn = (Spawn*)item;
@@ -1104,7 +1120,7 @@
}
else
{
- item = m_spawns.find(id);
+ item = m_spawns.value(id, nullptr);
}
if (item != NULL)
@@ -1185,7 +1201,7 @@
su->spawnId, su->subcommand, su->arg1, su->arg2);
#endif
- Item* item = m_spawns.find(su->spawnId);
+ Item* item = m_spawns.value(su->spawnId, nullptr);
if (item != NULL)
{
Spawn* spawn = (Spawn*)item;
@@ -1236,9 +1252,9 @@
seqDebug("SpawnShell::illusionSpawn(id=%d, name=%s, new race=%d)",
illusion->spawnId, illusion->name, illusion->race);
#endif
-
- Item* item = m_spawns.find(illusion->spawnId);
-
+
+ Item* item = m_spawns.value(illusion->spawnId, nullptr);
+
if (item != NULL)
{
Spawn* spawn = (Spawn*) item;
@@ -1309,7 +1325,7 @@
app->spawnId, app->type, app->parameter);
#endif
- Item* item = m_spawns.find(app->spawnId);
+ Item* item = m_spawns.value(app->spawnId, nullptr);
if (item != NULL)
{
@@ -1355,7 +1371,7 @@
seqDebug("SpawnShell::updateNpcHP(id=%d, maxhp=%d hp=%d)",
hpupdate->spawnId, hpupdate->maxHP, hpupdate->curHP);
#endif
- Item* item = m_spawns.find(hpupdate->spawnId);
+ Item* item = m_spawns.value(hpupdate->spawnId, nullptr);
if (item != NULL)
{
Spawn* spawn = (Spawn*)item;
@@ -1369,7 +1385,7 @@
void SpawnShell::spawnWearingUpdate(const uint8_t* data)
{
const wearChangeStruct *wearing = (const wearChangeStruct *)data;
- Item* item = m_spawns.find(wearing->spawnId);
+ Item* item = m_spawns.value(wearing->spawnId, nullptr);
if (item != NULL)
{
// ZBTEMP: Find newItemID
@@ -1395,7 +1411,7 @@
{
if (con->playerid != con->targetid)
{
- item = m_spawns.find(con->targetid);
+ item = m_spawns.value(con->targetid, nullptr);
if (item != NULL)
{
spawn = (Spawn*)item;
@@ -1413,8 +1429,8 @@
if (con->playerid != con->targetid)
{
// find the spawn if it exists
- item = m_spawns.find(con->targetid);
-
+ item = m_spawns.value(con->targetid, nullptr);
+
// has the spawn been seen before?
if (item != NULL)
{
@@ -1457,7 +1473,7 @@
else
{
// Set flag to change its icon
- if((item=m_spawns.find(rmSpawn->spawnId)))
+ if((item=m_spawns.value(rmSpawn->spawnId, nullptr)))
{
Spawn *s=(Spawn*)item;
s->setNotUpdated(true);
@@ -1502,7 +1518,7 @@
if (deadspawn->spawnId != m_player->id())
{
- item = m_spawns.find(deadspawn->spawnId);
+ item = m_spawns.value(deadspawn->spawnId, nullptr);
}
else
{
@@ -1529,7 +1545,7 @@
spawn->setName(spawn->realName() + Spawn_Corpse_Designator);
Item* killer;
- killer = m_spawns.find(deadspawn->killerId);
+ killer = m_spawns.value(deadspawn->killerId, nullptr);
emit killSpawn(item, killer, deadspawn->killerId);
}
}
@@ -1576,7 +1592,7 @@
void SpawnShell::corpseLoc(const uint8_t* data)
{
const corpseLocStruct* corpseLoc = (const corpseLocStruct*)data;
- Item* item = m_spawns.find(corpseLoc->spawnId);
+ Item* item = m_spawns.value(corpseLoc->spawnId, nullptr);
if (item != NULL)
{
Spawn* spawn = (Spawn*)item;
@@ -1611,7 +1627,8 @@
m_players.take(0);
// re-insert the player into the list
- m_players.replace(playerID, m_player);
+ delete m_players.take(playerID);
+ m_players.insert(playerID, m_player);
emit changeItem(m_player, tSpawnChangedALL);
}
@@ -1632,11 +1649,15 @@
{
Spawn* spawn;
// iterate over all the items in the map
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// get the item
- spawn = (Spawn*)it.current();
-
+ spawn = (Spawn*)it.value();
+ if (!spawn)
+ break;
+
// update the flags, if they changed, send a notification
if (updateFilterFlags(spawn))
{
@@ -1649,11 +1670,15 @@
{
Item* item;
// iterate over all the items in the map
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// get the item
- item = it.current();
-
+ item = it.value();
+ if (!item)
+ break;
+
// update the flags, if they changed, send a notification
if (updateFilterFlags(item))
{
@@ -1679,11 +1704,15 @@
{
Spawn* spawn;
// iterate over all the items in the map
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// get the item
- spawn = (Spawn*)it.current();
-
+ spawn = (Spawn*)it.value();
+ if (!spawn)
+ break;
+
// update the flags, if they changed, send a notification
if (updateRuntimeFilterFlags(spawn))
{
@@ -1696,11 +1725,15 @@
{
Item* item;
// iterate over all the items in the map
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// get the item
- item = it.current();
-
+ item = it.value();
+ if (!item)
+ break;
+
// update the flags, if they changed, send a notification
if (updateRuntimeFilterFlags(item))
{
@@ -1739,10 +1772,14 @@
Spawn* spawn;
// iterate over all the items in the map
- for (; it.current(); ++it)
+ while (it.hasNext())
{
+ it.next();
+
// get the spawn
- spawn = (Spawn*)it.current();
+ spawn = (Spawn*)it.value();
+ if (!spawn)
+ break;
// save the spawn id
d << spawn->id();
Modified: showeq/branches/pre_6_0_beta/src/spawnshell.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/spawnshell.h 2020-10-25 04:20:02 UTC (rev 1061)
+++ showeq/branches/pre_6_0_beta/src/spawnshell.h 2020-10-25 04:20:17 UTC (rev 1062)
@@ -42,7 +42,7 @@
#include <cstdio>
#include <cmath>
-#include <Q3IntDict>
+#include <QHash>
#include <QTimer>
#include <Q3TextStream>
@@ -69,9 +69,9 @@
//----------------------------------------------------------------------
// type definitions
-typedef Q3IntDict<Item> ItemMap;
-typedef Q3IntDictIterator<Item> ItemIterator;
-typedef Q3IntDictIterator<Item> ItemConstIterator;
+typedef QHash<int, Item*> ItemMap;
+typedef QHashIterator<int, Item*> ItemIterator;
+typedef QHashIterator<int, Item*> ItemConstIterator;
//----------------------------------------------------------------------
// SpawnShell
@@ -84,6 +84,8 @@
Player* player,
GuildMgr* guildMgr);
+ ~SpawnShell();
+
const Item* findID(spawnItemType type, int idSpawn);
const Item* findClosestItem(spawnItemType type,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2020-10-25 04:20:07
|
Revision: 1061
http://sourceforge.net/p/seq/svn/1061
Author: cn187
Date: 2020-10-25 04:20:02 +0000 (Sun, 25 Oct 2020)
Log Message:
-----------
Replace Q3Dict with QHash
Modified Paths:
--------------
showeq/branches/pre_6_0_beta/src/db3conv.cpp
showeq/branches/pre_6_0_beta/src/db3conv.h
showeq/branches/pre_6_0_beta/src/guildlist.cpp
showeq/branches/pre_6_0_beta/src/guildshell.cpp
showeq/branches/pre_6_0_beta/src/guildshell.h
showeq/branches/pre_6_0_beta/src/packetinfo.cpp
showeq/branches/pre_6_0_beta/src/packetinfo.h
showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp
showeq/branches/pre_6_0_beta/src/xmlpreferences.h
Modified: showeq/branches/pre_6_0_beta/src/db3conv.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/db3conv.cpp 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/db3conv.cpp 2020-10-25 04:20:02 UTC (rev 1061)
@@ -417,7 +417,7 @@
void DB3Convenience::Shutdown()
{
// create an iterator over the dictionary of DB's
- Q3DictIterator<Db> it(m_dbDict);
+ QHashIterator<QString, Db*> it(m_dbDict);
// attempt to get the DB from the cache
Db* db;
@@ -425,9 +425,11 @@
int ret;
// iterate over the cached databases, shutting them down 1 at a time
- while ((db = it.current()) != NULL)
+ while (it.hasNext())
{
- dbName = it.currentKey();
+ it.next();
+ db = it.value();
+ dbName = it.key();
#if 0
fprintf(stderr, "Closing database '%s', db = %08.8x\n",
Modified: showeq/branches/pre_6_0_beta/src/db3conv.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/db3conv.h 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/db3conv.h 2020-10-25 04:20:02 UTC (rev 1061)
@@ -36,7 +36,7 @@
#include <db_cxx.h>
-#include <Q3Dict>
+#include <QHash>
#include <QString>
#include "dbcommon.h"
@@ -88,7 +88,7 @@
Db* GetDatabase(QString dbName);
DbEnv* m_dbEnv;
- Q3Dict<Db> m_dbDict;
+ QHash<QString, Db*> m_dbDict;
// declare friend
friend class DB3Iterator;
Modified: showeq/branches/pre_6_0_beta/src/guildlist.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/guildlist.cpp 2020-10-25 04:20:02 UTC (rev 1061)
@@ -500,8 +500,10 @@
GuildMemberDictIterator it(m_guildShell->members());
// iterate over all the members
- while ((member = it.current()))
+ while (it.hasNext())
{
+ it.next();
+ member = it.value();
// increment members on count for each member on
if (member->zoneId())
{
@@ -528,8 +530,7 @@
m_guildListItemDict.insert((void*)member, memberItem);
}
- ++it;
- }
+ }
// make sure the guild list is sorted
m_guildList->sort();
Modified: showeq/branches/pre_6_0_beta/src/guildshell.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/guildshell.cpp 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/guildshell.cpp 2020-10-25 04:20:02 UTC (rev 1061)
@@ -177,11 +177,12 @@
m_maxNameLength(0),
m_zoneMgr(zoneMgr)
{
- m_members.setAutoDelete(true);
}
GuildShell::~GuildShell()
{
+ qDeleteAll(m_members);
+ m_members.clear();
}
QString GuildShell::zoneString(uint16_t zoneid) const
@@ -225,8 +226,11 @@
out << " Public Note" << endl;
QString zone;
- while ((member = it.current()))
+ while (it.hasNext())
{
+ it.next();
+ member = it.value();
+
dt.setTime_t(member->lastOn());
zone = zoneString(member->zoneId());
if (member->zoneInstance())
@@ -241,7 +245,6 @@
.arg(zone, -18);
out << " " << member->publicNote() << endl;
- ++it;
}
}
@@ -250,6 +253,7 @@
{
// clear out any existing member data
emit cleared();
+ qDeleteAll(m_members);
m_members.clear();
m_maxNameLength = 0;
Modified: showeq/branches/pre_6_0_beta/src/guildshell.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/guildshell.h 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/guildshell.h 2020-10-25 04:20:02 UTC (rev 1061)
@@ -29,7 +29,7 @@
#include <QString>
#include <QObject>
-#include <Q3Dict>
+#include <QHash>
#include <Q3TextStream>
//----------------------------------------------------------------------
@@ -88,8 +88,8 @@
//----------------------------------------------------------------------
// GuildMemberDict
-typedef Q3Dict<GuildMember> GuildMemberDict;
-typedef Q3DictIterator<GuildMember> GuildMemberDictIterator;
+typedef QHash<QString, GuildMember*> GuildMemberDict;
+typedef QHashIterator<QString, GuildMember*> GuildMemberDictIterator;
//----------------------------------------------------------------------
// GuildShell
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.cpp 2020-10-25 04:20:02 UTC (rev 1061)
@@ -278,11 +278,13 @@
: m_opcodes(size)
{
m_opcodes.setAutoDelete(true);
- m_opcodesByName.setAutoDelete(false);
}
EQPacketOPCodeDB::~EQPacketOPCodeDB()
{
+ while(!m_opcodesByName.isEmpty()) {
+ remove(m_opcodesByName.begin().key());
+ }
}
bool EQPacketOPCodeDB::load(const EQPacketTypeDB& typeDB,
Modified: showeq/branches/pre_6_0_beta/src/packetinfo.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/packetinfo.h 2020-10-25 04:20:02 UTC (rev 1061)
@@ -36,7 +36,6 @@
#include <Q3CString>
#include <Q3StrList>
#include <QStringList>
-#include <Q3Dict>
#include <Q3TextStream>
//----------------------------------------------------------------------
@@ -290,7 +289,7 @@
protected:
Q3IntDict<EQPacketOPCode> m_opcodes;
- Q3Dict<EQPacketOPCode> m_opcodesByName;
+ QHash<QString, EQPacketOPCode*> m_opcodesByName;
};
inline void EQPacketOPCodeDB::clear(void)
@@ -308,7 +307,7 @@
inline EQPacketOPCode* EQPacketOPCodeDB::edit(const QString& name)
{
// attempt to find the opcode object
- return m_opcodesByName.find(name);
+ return m_opcodesByName.value(name, nullptr);
}
inline const EQPacketOPCode* EQPacketOPCodeDB::find(uint16_t opcode) const
@@ -320,7 +319,7 @@
inline const EQPacketOPCode* EQPacketOPCodeDB::find(const QString& opcode) const
{
// attempt to find the opcode object
- return m_opcodesByName.find(opcode);
+ return m_opcodesByName.value(opcode, nullptr);
}
inline const Q3IntDict<EQPacketOPCode> EQPacketOPCodeDB::opcodes() const
Modified: showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp
===================================================================
--- showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/xmlpreferences.cpp 2020-10-25 04:20:02 UTC (rev 1061)
@@ -42,8 +42,6 @@
const float seqPrefVersion = 1.0;
const char* seqPrefName = "seqpreferences";
const char* seqPrefSysId = "seqpref.dtd";
-const int sectionHashSize = 31; // must be a prime number
-const int preferenceHashSize = 31; // must be a prime number
XMLPreferences::XMLPreferences(const QString& defaultsFileName,
const QString& inFileName)
@@ -50,9 +48,9 @@
: m_defaultsFilename(defaultsFileName),
m_filename(inFileName),
m_modified(0),
- m_runtimeSections(sectionHashSize),
- m_userSections(sectionHashSize),
- m_defaultsSections(preferenceHashSize)
+ m_runtimeSections(),
+ m_userSections(),
+ m_defaultsSections()
{
m_templateDoc.sprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE %s SYSTEM \"%s\">\n"
@@ -61,11 +59,6 @@
"</seqpreferences>\n",
seqPrefName, seqPrefSysId, seqPrefVersion);
- // automatically delete removed sections
- m_userSections.setAutoDelete(true);
- m_defaultsSections.setAutoDelete(true);
- m_commentSections.setAutoDelete(true);
-
// load the preferences
load();
}
@@ -72,8 +65,11 @@
XMLPreferences::~XMLPreferences()
{
+ qDeleteAll(m_userSections);
m_userSections.clear();
+ qDeleteAll(m_defaultsSections);
m_defaultsSections.clear();
+ qDeleteAll(m_commentSections);
m_commentSections.clear();
}
@@ -100,9 +96,11 @@
void XMLPreferences::revert()
{
// clear out all default preferecnes
+ qDeleteAll(m_defaultsSections);
m_defaultsSections.clear();
// clear out all user preferences
+ qDeleteAll(m_userSections);
m_userSections.clear();
// load the default preferences
@@ -165,33 +163,27 @@
sectionName = section.attribute("name");
// see if the section exists in the dictionary
- sectionDict = dict.find(sectionName);
+ sectionDict = dict.value(sectionName, nullptr);
// if not, then create it
if (sectionDict == NULL)
{
// create the new preference dictionary
- sectionDict = new PreferenceDict(preferenceHashSize);
+ sectionDict = new PreferenceDict();
- // make sure the dictionary deletes removed properties
- sectionDict->setAutoDelete(true);
-
// insert the preference dictionary into the section
dict.insert(sectionName, sectionDict);
}
// see if comment section exists in the dictionary
- commentSectionDict = m_commentSections.find(sectionName);
+ commentSectionDict = m_commentSections.value(sectionName, nullptr);
// if not, then create it
if (commentSectionDict == NULL)
{
// create the new preference dictionary
- commentSectionDict = new CommentDict(preferenceHashSize);
+ commentSectionDict = new CommentDict();
- // make sure the dictionary deletes removed properties
- commentSectionDict->setAutoDelete(true);
-
// insert the preference dictionary into the section
m_commentSections.insert(sectionName, commentSectionDict);
}
@@ -229,7 +221,7 @@
// if there is a comment, cache it
if (!comment.isEmpty())
{
- commentVal = commentSectionDict->find(propertyName);
+ commentVal = commentSectionDict->value(propertyName, nullptr);
if (commentVal != NULL)
*commentVal = comment;
@@ -337,12 +329,14 @@
sectionList = docElem.elementsByTagName("section");
- Q3DictIterator<PreferenceDict> sdit(dict);
- for (; sdit.current(); ++sdit)
+ QHashIterator<QString, PreferenceDict*> sdit(dict);
+ while (sdit.hasNext())
{
+ sdit.next();
+
QDomElement section;
- sectionName = sdit.currentKey();
- sectionDict = sdit.current();
+ sectionName = sdit.key();
+ sectionDict = sdit.value();
// iterate over all the sections in the document
for (uint i = 0; i < sectionList.length(); i++)
@@ -379,12 +373,14 @@
}
// iterate over all the properties in the section
- Q3DictIterator<QVariant> pdit(*sectionDict);
- for (; pdit.current(); ++pdit)
+ QHashIterator<QString, QVariant*> pdit(*sectionDict);
+ while (pdit.hasNext())
{
+ pdit.next();
+
QDomElement property;
- propertyName = pdit.currentKey();
- propertyValue = pdit.current();
+ propertyName = pdit.key();
+ propertyValue = pdit.value();
// get all the property elements in the section
propertyList = section.elementsByTagName("property");
@@ -501,12 +497,12 @@
if (pers & Runtime)
{
// see if the section exists in the dictionary
- sectionDict = m_runtimeSections.find(inSection);
+ sectionDict = m_runtimeSections.value(inSection, nullptr);
// if so, then see if the preference exists
if (sectionDict != NULL)
{
- preference = sectionDict->find(inName);
+ preference = sectionDict->value(inName, nullptr);
if (preference != NULL)
return preference;
}
@@ -515,12 +511,12 @@
if (pers & User)
{
// see if the section exists in the dictionary
- sectionDict = m_userSections.find(inSection);
+ sectionDict = m_userSections.value(inSection, nullptr);
// if so, then see if the preference exists
if (sectionDict != NULL)
{
- preference = sectionDict->find(inName);
+ preference = sectionDict->value(inName, nullptr);
if (preference != NULL)
return preference;
}
@@ -529,12 +525,12 @@
if (pers & Defaults)
{
// see if the section exists in the defaults dictionary
- sectionDict = m_defaultsSections.find(inSection);
+ sectionDict = m_defaultsSections.value(inSection, nullptr);
// if so, then see if the preferences exists
if (sectionDict != NULL)
{
- preference = sectionDict->find(inName);
+ preference = sectionDict->value(inName, nullptr);
if (preference != NULL)
return preference;
}
@@ -565,22 +561,19 @@
QVariant* preference;
// see if the section exists in the dictionary
- sectionDict = dict.find(inSection);
+ sectionDict = dict.value(inSection, nullptr);
// if not, then create it
if (sectionDict == NULL)
{
// create the new preference dictionary
- sectionDict = new PreferenceDict(preferenceHashSize);
+ sectionDict = new PreferenceDict();
- // make sure the dictionary deletes removed properties
- sectionDict->setAutoDelete(true);
-
// insert the preference dictionary into the section
dict.insert(inSection, sectionDict);
}
- preference = sectionDict->find(inName);
+ preference = sectionDict->value(inName, nullptr);
// if preference exists, change it, otherwise create it
if (preference != NULL)
@@ -594,12 +587,12 @@
CommentDict* commentSectionDict;
// see if comment section exists in the dictionary
- commentSectionDict = m_commentSections.find(inSection);
+ commentSectionDict = m_commentSections.value(inSection, nullptr);
if (commentSectionDict == NULL)
return QString("");
- QString* comment = commentSectionDict->find(inName);
+ QString* comment = commentSectionDict->value(inName, nullptr);
if (comment != NULL)
return *comment;
@@ -615,7 +608,7 @@
if (pers & Runtime)
{
// see if the section exists in the dictionary
- sectionDict = m_runtimeSections.find(inSection);
+ sectionDict = m_runtimeSections.value(inSection, nullptr);
// if so, then see if the preference exists
if (sectionDict != NULL)
@@ -625,7 +618,7 @@
if (pers & User)
{
// see if the section exists in the dictionary
- sectionDict = m_userSections.find(inSection);
+ sectionDict = m_userSections.value(inSection, nullptr);
// if so, then see if the preference exists
if (sectionDict != NULL)
@@ -635,7 +628,7 @@
if (pers & Defaults)
{
// see if the section exists in the defaults dictionary
- sectionDict = m_defaultsSections.find(inSection);
+ sectionDict = m_defaultsSections.value(inSection, nullptr);
// if so, then see if the preferences exists
if (sectionDict != NULL)
Modified: showeq/branches/pre_6_0_beta/src/xmlpreferences.h
===================================================================
--- showeq/branches/pre_6_0_beta/src/xmlpreferences.h 2020-10-25 04:19:50 UTC (rev 1060)
+++ showeq/branches/pre_6_0_beta/src/xmlpreferences.h 2020-10-25 04:20:02 UTC (rev 1061)
@@ -37,7 +37,7 @@
#include <QObject>
#include <QString>
#include <QVariant>
-#include <Q3Dict>
+#include <QHash>
#include <QColor>
#include <QPen>
#include <QBrush>
@@ -61,11 +61,11 @@
// TRUE value overrides this. This is usefull for command line args
// which should override config file prefs but not overwrite them
-typedef Q3Dict<QVariant> PreferenceDict;
-typedef Q3Dict<PreferenceDict> PrefSectionDict;
+typedef QHash<QString, QVariant*> PreferenceDict;
+typedef QHash<QString, PreferenceDict*> PrefSectionDict;
-typedef Q3Dict<QString> CommentDict;
-typedef Q3Dict<CommentDict> CommentSectionDict;
+typedef QHash<QString, QString*> CommentDict;
+typedef QHash<QString, CommentDict*> CommentSectionDict;
// PreferenceFile
// A File comprised of NameValuePair Items
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|