Changeset 4733

Show
Ignore:
Timestamp:
11/05/06 04:40:38 (2 years ago)
Author:
erijo
Message:

Result after running qt3to4 porting tool. Includes portinglog.txt, but doesn't compile.

Location:
branches/qt-gui_qt4/src
Files:
1 added
81 modified

Legend:

Unmodified
Added
Removed
  • branches/qt-gui_qt4/src/adduserdlg.cpp

    r4699 r4733  
    2828#include <qpushbutton.h> 
    2929#include <qlayout.h> 
    30 #include <qframe.h> 
     30#include <q3frame.h> 
    3131#include <qcombobox.h> 
    3232 
     
    4343    server = s; 
    4444 
    45         QBoxLayout *lay = new QBoxLayout(this, QBoxLayout::Down, 8); 
    46         QFrame *frmProtocol = new QFrame(this); 
    47         QFrame *frmUin = new QFrame(this); 
    48     QFrame *frmBtn = new QFrame(this); 
     45        Q3BoxLayout *lay = new Q3BoxLayout(this, Q3BoxLayout::Down, 8); 
     46        Q3Frame *frmProtocol = new Q3Frame(this); 
     47        Q3Frame *frmUin = new Q3Frame(this); 
     48    Q3Frame *frmBtn = new Q3Frame(this); 
    4949        lay->addWidget(frmProtocol); 
    5050        lay->addWidget(frmUin); 
     
    5353    lay->addWidget(frmBtn); 
    5454 
    55         QBoxLayout *layProtocol = new QBoxLayout(frmProtocol, QBoxLayout::LeftToRight); 
     55        Q3BoxLayout *layProtocol = new Q3BoxLayout(frmProtocol, Q3BoxLayout::LeftToRight); 
    5656        lblProtocol = new QLabel(tr("Protocol:"), frmProtocol); 
    5757        cmbProtocol = new QComboBox(frmProtocol); 
     
    7272        cmbProtocol->setCurrentItem(ppidIndex); 
    7373         
    74         QBoxLayout *layUin = new QBoxLayout(frmUin, QBoxLayout::LeftToRight); 
     74        Q3BoxLayout *layUin = new Q3BoxLayout(frmUin, Q3BoxLayout::LeftToRight); 
    7575    lblUin = new QLabel(tr("New User ID:"), frmUin); 
    7676    edtUin = new QLineEdit(frmUin); 
     
    8080    if (szId != 0) edtUin->setText(szId); 
    8181     
    82     QBoxLayout *layBtn = new QBoxLayout(frmBtn, QBoxLayout::LeftToRight); 
     82    Q3BoxLayout *layBtn = new Q3BoxLayout(frmBtn, Q3BoxLayout::LeftToRight); 
    8383    btnOk = new QPushButton(tr("&Ok"), frmBtn); 
    8484    btnCancel = new QPushButton(tr("&Cancel"), frmBtn); 
  • branches/qt-gui_qt4/src/adduserdlg.h

    r4699 r4733  
    2222 
    2323#include "licqdialog.h" 
     24//Added by qt3to4: 
     25#include <QLabel> 
    2426 
    2527class QPushButton; 
  • branches/qt-gui_qt4/src/authuserdlg.cpp

    r4699 r4733  
    2828#include <qlabel.h> 
    2929#include <qlayout.h> 
    30 #include <qvgroupbox.h> 
     30#include <q3vgroupbox.h> 
    3131#include <qtextcodec.h> 
     32//Added by qt3to4: 
     33#include <Q3HBoxLayout> 
     34#include <Q3VBoxLayout> 
    3235 
    3336#include "authuserdlg.h" 
     
    4144AuthUserDlg::AuthUserDlg(CICQDaemon *s, const char *szId, unsigned long nPPID, 
    4245   bool bGrant, QWidget *parent) 
    43   : LicqDialog(parent, "AuthUserDialog", false, WDestructiveClose) 
     46  : LicqDialog(parent, "AuthUserDialog", false, Qt::WDestructiveClose) 
    4447{ 
    4548  server = s; 
     
    5356    setCaption(tr("Licq - Refuse Authorisation")); 
    5457 
    55   QBoxLayout* toplay = new QVBoxLayout(this, 8, 8); 
     58  Q3BoxLayout* toplay = new Q3VBoxLayout(this, 8, 8); 
    5659 
    5760  lblUin = new QLabel(this); 
     
    6366    edtUin->setMinimumWidth(90); 
    6467    connect (edtUin, SIGNAL(returnPressed()), SLOT(ok()) ); 
    65     QBoxLayout* lay = new QHBoxLayout(toplay); 
     68    Q3BoxLayout* lay = new Q3HBoxLayout(toplay); 
    6669    lay->addWidget(lblUin); 
    6770    lay->addWidget(edtUin); 
     
    8992  toplay->addSpacing(6); 
    9093 
    91   grpResponse = new QVGroupBox(tr("Response"), this); 
     94  grpResponse = new Q3VGroupBox(tr("Response"), this); 
    9295  toplay->addWidget(grpResponse); 
    9396  toplay->setStretchFactor(grpResponse, 2); 
     
    9598  mleResponse = new MLEditWrap(true, grpResponse); 
    9699 
    97   QBoxLayout* lay = new QHBoxLayout(toplay); 
     100  Q3BoxLayout* lay = new Q3HBoxLayout(toplay); 
    98101  lay->addStretch(1); 
    99102  btnOk = new QPushButton(tr("&Ok"), this); 
     
    117120AuthUserDlg::AuthUserDlg(CICQDaemon *s, unsigned long nUin, bool bGrant, 
    118121   QWidget *parent) 
    119   : LicqDialog(parent, "AuthUserDialog", false, WDestructiveClose) 
     122  : LicqDialog(parent, "AuthUserDialog", false, Qt::WDestructiveClose) 
    120123{ 
    121124  server = s; 
     
    133136    setCaption(tr("Licq - Refuse Authorisation")); 
    134137 
    135   QBoxLayout* toplay = new QVBoxLayout(this, 8, 8); 
     138  Q3BoxLayout* toplay = new Q3VBoxLayout(this, 8, 8); 
    136139 
    137140  lblUin = new QLabel(this); 
    138   lblUin->setAlignment(AlignCenter); 
     141  lblUin->setAlignment(Qt::AlignCenter); 
    139142  if (m_nUin == 0) 
    140143  { 
     
    144147    edtUin->setValidator(new QIntValidator(10000, 2147483647, edtUin)); 
    145148    connect (edtUin, SIGNAL(returnPressed()), SLOT(ok()) ); 
    146     QBoxLayout* lay = new QHBoxLayout(toplay); 
     149    Q3BoxLayout* lay = new Q3HBoxLayout(toplay); 
    147150    lay->addWidget(lblUin); 
    148151    lay->addWidget(edtUin); 
     
    170173  toplay->addSpacing(6); 
    171174 
    172   grpResponse = new QVGroupBox(tr("Response"), this); 
     175  grpResponse = new Q3VGroupBox(tr("Response"), this); 
    173176  toplay->addWidget(grpResponse); 
    174177  toplay->setStretchFactor(grpResponse, 2); 
     
    176179  mleResponse = new MLEditWrap(true, grpResponse); 
    177180 
    178   QBoxLayout* lay = new QHBoxLayout(toplay); 
     181  Q3BoxLayout* lay = new Q3HBoxLayout(toplay); 
    179182  lay->addStretch(1); 
    180183  btnOk = new QPushButton(tr("&Ok"), this); 
  • branches/qt-gui_qt4/src/authuserdlg.h

    r4699 r4733  
    2222 
    2323#include "licqdialog.h" 
     24//Added by qt3to4: 
     25#include <QLabel> 
    2426 
    2527class QPushButton; 
    2628class QLabel; 
    27 class QGroupBox; 
     29class Q3GroupBox; 
    2830class QLineEdit; 
    2931 
     
    4446   QPushButton *btnOk, *btnCancel; 
    4547   QLabel *lblUin; 
    46    QGroupBox *grpResponse; 
     48   Q3GroupBox *grpResponse; 
    4749   QLineEdit *edtUin; 
    4850   MLEditWrap* mleResponse; 
  • branches/qt-gui_qt4/src/awaymsgdlg.cpp

    r4699 r4733  
    2424 
    2525#include <qpushbutton.h> 
    26 #include <qpopupmenu.h> 
     26#include <q3popupmenu.h> 
    2727#include <qlayout.h> 
    2828#include <qtimer.h> 
    2929#include <qapplication.h> 
    3030#include <qtextcodec.h> 
     31//Added by qt3to4: 
     32#include <Q3HBoxLayout> 
     33#include <QCloseEvent> 
     34#include <QEvent> 
     35#include <Q3VBoxLayout> 
    3136 
    3237#include "awaymsgdlg.h" 
     
    7277 
    7378AwayMsgDlg::AwayMsgDlg(QWidget *parent) 
    74   : LicqDialog(parent, "AwayMessageDialog", false, WDestructiveClose) 
    75 { 
    76   QBoxLayout* top_lay = new QVBoxLayout(this, 10); 
     79  : LicqDialog(parent, "AwayMessageDialog", false, Qt::WDestructiveClose) 
     80{ 
     81  Q3BoxLayout* top_lay = new Q3VBoxLayout(this, 10); 
    7782 
    7883  mleAwayMsg = new MLEditWrap(true, this); 
     
    8085  top_lay->addWidget(mleAwayMsg); 
    8186 
    82   mnuSelect = new QPopupMenu(this); 
     87  mnuSelect = new Q3PopupMenu(this); 
    8388  connect(mnuSelect, SIGNAL(activated(int)), this, SLOT(slot_selectMessage(int))); 
    8489 
    85   QBoxLayout* l = new QHBoxLayout(top_lay, 10); 
     90  Q3BoxLayout* l = new Q3HBoxLayout(top_lay, 10); 
    8691  int bw = QPushButton(tr("(Closing in %1)"), this).sizeHint().width(); 
    8792  btnSelect = new QPushButton(tr("&Select"), this); 
     
    244249  if (e->type() == QEvent::KeyPress || 
    245250      e->type() == QEvent::MouseButtonPress || 
    246       e->type() == QEvent::Accel) 
     251      e->type() == QEvent::Shortcut) 
    247252  {       
    248253    slot_autocloseStop(); 
     
    279284CustomAwayMsgDlg::CustomAwayMsgDlg(const char *szId, 
    280285    unsigned long nPPID, QWidget *parent) 
    281     : LicqDialog(parent, "CustomAwayMessageDialog", false, WDestructiveClose) 
     286    : LicqDialog(parent, "CustomAwayMessageDialog", false, Qt::WDestructiveClose) 
    282287{ 
    283288  m_szId = szId ? strdup(szId) : 0; 
    284289  m_nPPID = nPPID; 
    285290 
    286   QBoxLayout* top_lay = new QVBoxLayout(this, 10); 
     291  Q3BoxLayout* top_lay = new Q3VBoxLayout(this, 10); 
    287292 
    288293  mleAwayMsg = new MLEditWrap(true, this); 
     
    290295  top_lay->addWidget(mleAwayMsg); 
    291296 
    292   QBoxLayout* l = new QHBoxLayout(top_lay, 10); 
     297  Q3BoxLayout* l = new Q3HBoxLayout(top_lay, 10); 
    293298 
    294299  int bw = 75; 
     
    337342 
    338343CustomAwayMsgDlg::CustomAwayMsgDlg(unsigned long nUin, QWidget *parent) 
    339     : LicqDialog(parent, "CustomAwayMessageDialog", false, WDestructiveClose) 
     344    : LicqDialog(parent, "CustomAwayMessageDialog", false, Qt::WDestructiveClose) 
    340345{ 
    341346  m_nUin = nUin; 
    342347 
    343   QBoxLayout* top_lay = new QVBoxLayout(this, 10); 
     348  Q3BoxLayout* top_lay = new Q3VBoxLayout(this, 10); 
    344349 
    345350  mleAwayMsg = new MLEditWrap(true, this); 
     
    347352  top_lay->addWidget(mleAwayMsg); 
    348353 
    349   QBoxLayout* l = new QHBoxLayout(top_lay, 10); 
     354  Q3BoxLayout* l = new Q3HBoxLayout(top_lay, 10); 
    350355 
    351356  int bw = 75; 
  • branches/qt-gui_qt4/src/awaymsgdlg.h

    r4699 r4733  
    2222 
    2323#include "licqdialog.h" 
     24//Added by qt3to4: 
     25#include <Q3PopupMenu> 
     26#include <QEvent> 
     27#include <QCloseEvent> 
    2428 
    2529class QPushButton; 
     
    3741protected: 
    3842  MLEditWrap *mleAwayMsg; 
    39   QPopupMenu* mnuSelect; 
     43  Q3PopupMenu* mnuSelect; 
    4044  QPushButton* btnSelect; 
    4145  QPushButton *btnOk, *btnCancel; 
  • branches/qt-gui_qt4/src/catdlg.cpp

    r4699 r4733  
    2525#include <qwidget.h> 
    2626#include <qtextcodec.h> 
     27//Added by qt3to4: 
     28#include <Q3HBoxLayout> 
     29#include <Q3VBoxLayout> 
    2730 
    2831#include "catdlg.h" 
     
    3437 
    3538EditCategoryDlg::EditCategoryDlg(QWidget *parent, ICQUserCategory *uCat) 
    36   : QDialog(parent, "EditCategoryDlg", false, WDestructiveClose) 
     39  : QDialog(parent, "EditCategoryDlg", false, Qt::WDestructiveClose) 
    3740{ 
    38   QBoxLayout *top_lay, *ll, *l; 
     41  Q3BoxLayout *top_lay, *ll, *l; 
    3942 
    4043  m_uc = uCat->GetCategory(); 
     
    6467  } 
    6568 
    66   top_lay = new QVBoxLayout(this, 10); 
     69  top_lay = new Q3VBoxLayout(this, 10); 
    6770 
    6871  for(unsigned short i = 0 ; i < m_nCats ; i++ ) 
    6972  { 
    70     ll = new QHBoxLayout(top_lay, 10); 
     73    ll = new Q3HBoxLayout(top_lay, 10); 
    7174    cbCat[i] = new QComboBox(this); 
    7275    cbCat[i]->insertItem(tr("Unspecified"), 0); 
     
    103106  connect(btnCancel, SIGNAL(clicked()), SLOT(close())); 
    104107 
    105   l = new QHBoxLayout(top_lay, 10); 
     108  l = new Q3HBoxLayout(top_lay, 10); 
    106109  l->addStretch(1); 
    107110  l->addWidget(btnOk); 
  • branches/qt-gui_qt4/src/chatdlg.cpp

    r4699 r4733  
    3030#include <qapplication.h> 
    3131#include <qfontdatabase.h> 
     32//Added by qt3to4: 
     33#include <QKeyEvent> 
     34#include <Q3ValueList> 
     35#include <Q3GridLayout> 
     36#include <Q3CString> 
     37#include <QPixmap> 
     38#include <QMouseEvent> 
     39#include <QEvent> 
     40#include <QCloseEvent> 
    3241#include <ctype.h> 
    3342#include <qlayout.h> 
    3443#include <stdlib.h> 
    35 #include <qlistbox.h> 
     44#include <q3listbox.h> 
    3645#include <qlabel.h> 
    3746#include <qsocketnotifier.h> 
    38 #include <qtoolbar.h> 
     47#include <q3toolbar.h> 
    3948#include <qpushbutton.h> 
    4049#include <qtoolbutton.h> 
    4150#include <qstatusbar.h> 
    42 #include <qgroupbox.h> 
    43 #include <qpopupmenu.h> 
     51#include <q3groupbox.h> 
     52#include <q3popupmenu.h> 
    4453#include <qclipboard.h> 
    45 #include <qtextstream.h> 
     54#include <q3textstream.h> 
    4655#include <qmenubar.h> 
    4756#include <qtextcodec.h> 
     
    4958#include <kfiledialog.h> 
    5059#else 
    51 #include <qfiledialog.h> 
     60#include <q3filedialog.h> 
    5261#endif 
    5362#include <qpainter.h> 
     
    113122ChatDlg::ChatDlg(const char *szId, unsigned long nPPID, CICQDaemon *daemon, 
    114123                 CMainWindow *m, QWidget *parent) 
    115   : QMainWindow(parent, "ChatDialog", WDestructiveClose) 
     124  : Q3MainWindow(parent, "ChatDialog", Qt::WDestructiveClose) 
    116125{ 
    117126  m_szId = szId ? strdup(szId) : 0; 
     
    136145 
    137146  // Pane mode setup 
    138   boxPane = new QGroupBox(widCentral); 
    139   paneLayout = new QGridLayout(boxPane, 3, 1, 4); 
    140   remoteLayout = new QGridLayout(2, 1, 4); 
     147  boxPane = new Q3GroupBox(widCentral); 
     148  paneLayout = new Q3GridLayout(boxPane, 3, 1, 4); 
     149  remoteLayout = new Q3GridLayout(2, 1, 4); 
    141150  paneLayout->addLayout(remoteLayout, 0, 0); 
    142151  lblRemote = new QLabel(tr("Remote - Not connected"), boxPane); 
     
    146155  paneLayout->addRowSpacing(1, 15); 
    147156 
    148   QGridLayout *llay = new QGridLayout(2, 1, 4); 
     157  Q3GridLayout *llay = new Q3GridLayout(2, 1, 4); 
    149158  paneLayout->addLayout(llay, 2, 0); 
    150159  lblLocal = new QLabel(boxPane); 
     
    158167 
    159168  // IRC mode setup 
    160   boxIRC = new QGroupBox(widCentral); 
    161   QGridLayout *lay = new QGridLayout(boxIRC, 2, 2, 4); 
     169  boxIRC = new Q3GroupBox(widCentral); 
     170  Q3GridLayout *lay = new Q3GridLayout(boxIRC, 2, 2, 4); 
    162171  mleIRCRemote = new CChatWindow(boxIRC); 
    163172  mleIRCRemote->setReadOnly(true); 
     
    165174  mleIRCRemote->setMinimumWidth(150); 
    166175  lay->addWidget(mleIRCRemote, 0, 0); 
    167   lstUsers = new QListBox(boxIRC); 
     176  lstUsers = new Q3ListBox(boxIRC); 
    168177  lay->addMultiCellWidget(lstUsers, 0, 1, 1, 1); 
    169178  mleIRCLocal = new CChatWindow(boxIRC); 
     
    175184 
    176185  // Generic setup 
    177   mnuMain = new QPopupMenu(this); 
     186  mnuMain = new Q3PopupMenu(this); 
    178187  mnuMain->insertItem(tr("&Audio"), this, SLOT(slot_audio()), ALT + Key_A, mnuChatAudio); 
    179188  mnuMain->insertItem(tr("&Save Chat"), this, SLOT(slot_save()), ALT + Key_S, mnuChatSave); 
    180189  mnuMain->insertSeparator(); 
    181190  mnuMain->insertItem(tr("&Close Chat"), this, SLOT(close()), ALT + Key_Q); 
    182   mnuMode = new QPopupMenu(this); 
     191  mnuMode = new Q3PopupMenu(this); 
    183192  mnuMode->insertItem(tr("&Pane Mode"), this, SLOT(SwitchToPaneMode())); 
    184193  mnuMode->insertItem(tr("&IRC Mode"), this, SLOT(SwitchToIRCMode())); 
     
    189198 
    190199  // Toolbar 
    191   QToolBar* barChat = new QToolBar("label", this); 
     200  Q3ToolBar* barChat = new Q3ToolBar("label", this); 
    192201  addToolBar(barChat, "Chat Toolbar"); 
    193202  barChat->setHorizontalStretchable(false); 
     
    215224  tbtFg = new QToolButton(*pixFg, tr("Foreground color"), 
    216225     tr("Changes the foreground color"), this, SLOT(changeFrontColor()), barChat); 
    217   mnuFg = new QPopupMenu(this); 
     226  mnuFg = new Q3PopupMenu(this); 
    218227 
    219228  QPixmap* pixBg = new QPixmap(chatChangeBg_xpm); 
     
    222231     tr("Changes the background color"), this, SLOT(changeBackColor()), barChat); 
    223232 
    224   mnuBg = new QPopupMenu(this); 
     233  mnuBg = new Q3PopupMenu(this); 
    225234 
    226235  for(unsigned int i = 0; i < NUM_COLORS; i++) 
     
    283292  cmbFontSize->insertItem(QString::number(font().pointSize())); 
    284293 
    285   QValueList<int> sizes = QFontDatabase::standardSizes(); 
     294  Q3ValueList<int> sizes = QFontDatabase::standardSizes(); 
    286295  for(unsigned i = 0; i < sizes.count(); i++) 
    287296    if(sizes[i] != font().pointSize()) 
     
    305314 
    306315  QString codec_name = QString::fromLatin1( codec->name() ).lower(); // TODO: determine best codec 
    307   QPopupMenu *popupEncoding = new QPopupMenu; 
     316  Q3PopupMenu *popupEncoding = new Q3PopupMenu; 
    308317  popupEncoding->setCheckable(true); 
    309318 
     
    339348//  barChat->setStretchableWidget(dummy); 
    340349 
    341   QGridLayout *g = new QGridLayout(widCentral, 2, 1, 6, 4); 
     350  Q3GridLayout *g = new Q3GridLayout(widCentral, 2, 1, 6, 4); 
    342351  g->addWidget(boxPane, 0, 0); 
    343352  g->addWidget(boxIRC, 0, 0); 
     
    392401ChatDlg::ChatDlg(unsigned long _nUin, CICQDaemon *daemon, 
    393402                 CMainWindow *m, QWidget *parent) 
    394   : QMainWindow(parent, "ChatDialog", WDestructiveClose) 
     403  : Q3MainWindow(parent, "ChatDialog", Qt::WDestructiveClose) 
    395404{ 
    396405  m_nUin = _nUin; 
     
    410419  setOpaqueMoving(true); 
    411420  setToolBarsMovable(true);