summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2015-04-14 12:50:55 +0200
committerMichal Kubecek <mkubecek@suse.cz>2015-04-15 10:53:25 +0200
commit9d3babea67fb5463e5b5bbd69a31131516476b96 (patch)
tree6725ffa4aa08d6a4df6af26068c113f00be46975 /src
parent10478170cb97e558899dcbdd3a6fef6a0e79a124 (diff)
downloadtwinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar
twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.gz
twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.lz
twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.xz
twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.zip
Qt4 port step 2: apply qt3toqt4
Diffstat (limited to 'src')
-rw-r--r--src/gui/addresslistviewitem.cpp4
-rw-r--r--src/gui/addresslistviewitem.h6
-rw-r--r--src/gui/buddyform.ui.h2
-rw-r--r--src/gui/buddylistview.cpp52
-rw-r--r--src/gui/buddylistview.h16
-rw-r--r--src/gui/diamondcardprofileform.ui.h3
-rw-r--r--src/gui/dtmfform.ui.h2
-rw-r--r--src/gui/freedesksystray.cpp15
-rw-r--r--src/gui/freedesksystray.h8
-rw-r--r--src/gui/getaddressform.ui.h8
-rw-r--r--src/gui/gui.cpp55
-rw-r--r--src/gui/gui.h4
-rw-r--r--src/gui/historyform.ui.h26
-rw-r--r--src/gui/historylistview.cpp20
-rw-r--r--src/gui/historylistview.h8
-rw-r--r--src/gui/inviteform.ui.h2
-rw-r--r--src/gui/logviewform.ui.h7
-rw-r--r--src/gui/main.cpp10
-rw-r--r--src/gui/messageform.ui.h37
-rw-r--r--src/gui/mphoneform.ui.h81
-rw-r--r--src/gui/redirectform.ui.h6
-rw-r--r--src/gui/selectnicform.ui.h2
-rw-r--r--src/gui/selectprofileform.ui.h42
-rw-r--r--src/gui/selectuserform.ui.h20
-rw-r--r--src/gui/sendfileform.ui.h4
-rw-r--r--src/gui/srvredirectform.ui.h6
-rw-r--r--src/gui/syssettingsform.ui.h20
-rw-r--r--src/gui/textbrowsernoautolink.h6
-rw-r--r--src/gui/transferform.ui.h7
-rw-r--r--src/gui/twinkle.pro7
-rw-r--r--src/gui/twinklesystray.h2
-rw-r--r--src/gui/userprofileform.ui.h45
-rw-r--r--src/gui/wizardform.ui.h6
-rw-r--r--src/gui/yesnodialog.cpp8
34 files changed, 309 insertions, 238 deletions
diff --git a/src/gui/addresslistviewitem.cpp b/src/gui/addresslistviewitem.cpp
index 9c927f6..c757be0 100644
--- a/src/gui/addresslistviewitem.cpp
+++ b/src/gui/addresslistviewitem.cpp
@@ -23,8 +23,8 @@
#define COL_ADDR_PHONE 1
#define COL_ADDR_REMARK 2
-AddressListViewItem::AddressListViewItem(QListView *parent, const t_address_card &card) :
- QListViewItem(parent, card.get_display_name().c_str(),
+AddressListViewItem::AddressListViewItem(Q3ListView *parent, const t_address_card &card) :
+ Q3ListViewItem(parent, card.get_display_name().c_str(),
card.sip_address.c_str(), card.remark.c_str()),
address_card(card)
{}
diff --git a/src/gui/addresslistviewitem.h b/src/gui/addresslistviewitem.h
index 7e1a960..c001943 100644
--- a/src/gui/addresslistviewitem.h
+++ b/src/gui/addresslistviewitem.h
@@ -20,14 +20,14 @@
#define _ADDRESSLISTVIEWITEM_H
#include "address_book.h"
-#include "qlistview.h"
+#include "q3listview.h"
-class AddressListViewItem : public QListViewItem {
+class AddressListViewItem : public Q3ListViewItem {
private:
t_address_card address_card;
public:
- AddressListViewItem(QListView *parent, const t_address_card &card);
+ AddressListViewItem(Q3ListView *parent, const t_address_card &card);
t_address_card getAddressCard(void) const;
void update(const t_address_card &card);
};
diff --git a/src/gui/buddyform.ui.h b/src/gui/buddyform.ui.h
index d7f0714..5326302 100644
--- a/src/gui/buddyform.ui.h
+++ b/src/gui/buddyform.ui.h
@@ -41,7 +41,7 @@ void BuddyForm::destroy()
}
}
-void BuddyForm::showNew(t_buddy_list &_buddy_list, QListViewItem *_profileItem)
+void BuddyForm::showNew(t_buddy_list &_buddy_list, Q3ListViewItem *_profileItem)
{
user_config = _buddy_list.get_user_profile();
edit_mode = false;
diff --git a/src/gui/buddylistview.cpp b/src/gui/buddylistview.cpp
index 60f8ffc..75d25f4 100644
--- a/src/gui/buddylistview.cpp
+++ b/src/gui/buddylistview.cpp
@@ -22,41 +22,43 @@
#include "qapplication.h"
#include "qfont.h"
-#include "qheader.h"
+#include "q3header.h"
#include "qpixmap.h"
#include "qrect.h"
#include "qsize.h"
-#include "qstylesheet.h"
+#include "q3stylesheet.h"
+//Added by qt3to4:
+#include <q3mimefactory.h>
void AbstractBLVItem::set_icon(t_presence_state::t_basic_state state) {
switch (state) {
case t_presence_state::ST_BASIC_UNKNOWN:
- setPixmap(0, QPixmap::fromMimeSource("presence_unknown.png"));
+ setPixmap(0, qPixmapFromMimeSource("presence_unknown.png"));
break;
case t_presence_state::ST_BASIC_CLOSED:
- setPixmap(0, QPixmap::fromMimeSource("presence_offline.png"));
+ setPixmap(0, qPixmapFromMimeSource("presence_offline.png"));
break;
case t_presence_state::ST_BASIC_OPEN:
- setPixmap(0, QPixmap::fromMimeSource("presence_online.png"));
+ setPixmap(0, qPixmapFromMimeSource("presence_online.png"));
break;
case t_presence_state::ST_BASIC_FAILED:
- setPixmap(0, QPixmap::fromMimeSource("presence_failed.png"));
+ setPixmap(0, qPixmapFromMimeSource("presence_failed.png"));
break;
case t_presence_state::ST_BASIC_REJECTED:
- setPixmap(0, QPixmap::fromMimeSource("presence_rejected.png"));
+ setPixmap(0, qPixmapFromMimeSource("presence_rejected.png"));
break;
default:
- setPixmap(0, QPixmap::fromMimeSource("presence_unknown.png"));
+ setPixmap(0, qPixmapFromMimeSource("presence_unknown.png"));
break;
}
}
-AbstractBLVItem::AbstractBLVItem(QListViewItem *parent, const QString &text) :
- QListViewItem(parent, text)
+AbstractBLVItem::AbstractBLVItem(Q3ListViewItem *parent, const QString &text) :
+ Q3ListViewItem(parent, text)
{}
-AbstractBLVItem::AbstractBLVItem(QListView *parent, const QString &text) :
- QListViewItem(parent, text)
+AbstractBLVItem::AbstractBLVItem(Q3ListView *parent, const QString &text) :
+ Q3ListViewItem(parent, text)
{}
AbstractBLVItem::~AbstractBLVItem() {}
@@ -71,10 +73,10 @@ void BuddyListViewItem::set_icon(void) {
string url_str = ui->expand_destination(user_config, buddy->get_sip_address());
tip = "<html>";
- tip += QStyleSheet::escape(ui->format_sip_address(user_config, buddy->get_name(), t_url(url_str)).c_str()).replace(' ', "&nbsp;");
+ tip += Q3StyleSheet::escape(ui->format_sip_address(user_config, buddy->get_name(), t_url(url_str)).c_str()).replace(' ', "&nbsp;");
if (!buddy->get_may_subscribe_presence()) {
- setPixmap(0, QPixmap::fromMimeSource("buddy.png"));
+ setPixmap(0, qPixmapFromMimeSource("buddy.png"));
} else {
QString failure;
t_presence_state::t_basic_state basic_state = buddy->
@@ -116,7 +118,7 @@ void BuddyListViewItem::set_icon(void) {
tip = tip.replace(' ', "&nbsp;");
}
-BuddyListViewItem::BuddyListViewItem(QListViewItem *parent, t_buddy *_buddy) :
+BuddyListViewItem::BuddyListViewItem(Q3ListViewItem *parent, t_buddy *_buddy) :
AbstractBLVItem(parent, _buddy->get_name().c_str()),
buddy(_buddy)
{
@@ -135,7 +137,7 @@ void BuddyListViewItem::update(void) {
if (buddy->get_name().c_str() != text(0)) {
setText(0, buddy->get_name().c_str());
- QListViewItem::parent()->sort();
+ Q3ListViewItem::parent()->sort();
}
ui->unlock();
}
@@ -155,7 +157,7 @@ void BLViewUserItem::set_icon(void) {
QString profile_name = presence_epa->get_user_profile()->get_profile_name().c_str();
tip = "<html>";
- tip += QStyleSheet::escape(profile_name);
+ tip += Q3StyleSheet::escape(profile_name);
tip += "<br>";
tip += "<b>";
tip += qApp->translate("BuddyList", "Availability");
@@ -164,7 +166,7 @@ void BLViewUserItem::set_icon(void) {
switch (presence_epa->get_epa_state()) {
case t_presence_epa::EPA_UNPUBLISHED:
tip += qApp->translate("BuddyList", "not published");
- setPixmap(0, QPixmap::fromMimeSource("penguin-small.png"));
+ setPixmap(0, qPixmapFromMimeSource("penguin-small.png"));
break;
case t_presence_epa::EPA_FAILED:
tip += qApp->translate("BuddyList", "failed to publish");
@@ -172,7 +174,7 @@ void BLViewUserItem::set_icon(void) {
if (!failure.isEmpty()) {
tip += QString(" (%1)").arg(failure);
}
- setPixmap(0, QPixmap::fromMimeSource("presence_failed.png"));
+ setPixmap(0, qPixmapFromMimeSource("presence_failed.png"));
break;
case t_presence_epa::EPA_PUBLISHED:
basic_state = presence_epa->get_basic_state();
@@ -201,7 +203,7 @@ void BLViewUserItem::set_icon(void) {
tip = tip.replace(' ', "&nbsp;");
}
-BLViewUserItem::BLViewUserItem(QListView *parent, t_presence_epa *_presence_epa) :
+BLViewUserItem::BLViewUserItem(Q3ListView *parent, t_presence_epa *_presence_epa) :
AbstractBLVItem(parent, _presence_epa->get_user_profile()->get_profile_name().c_str()),
presence_epa(_presence_epa)
{
@@ -220,7 +222,7 @@ void BLViewUserItem::paintCell(QPainter *painter, const QColorGroup &cg,
QFont font = painter->font();
font.setBold(true);
painter->setFont(font);
- QListViewItem::paintCell(painter, cg, column, width, align);
+ Q3ListViewItem::paintCell(painter, cg, column, width, align);
painter->restore();
}
@@ -231,7 +233,7 @@ void BLViewUserItem::update(void) {
if (presence_epa->get_user_profile()->get_profile_name().c_str() == text(0)) {
setText(0, presence_epa->get_user_profile()->get_profile_name().c_str());
- QListViewItem::listView()->sort();
+ Q3ListViewItem::listView()->sort();
}
ui->unlock();
}
@@ -245,15 +247,15 @@ t_presence_epa *BLViewUserItem::get_presence_epa(void) {
}
-BuddyListViewTip::BuddyListViewTip(QListView *parent) :
+BuddyListViewTip::BuddyListViewTip(Q3ListView *parent) :
QToolTip(parent->viewport()),
parentListView(parent)
{}
void BuddyListViewTip::maybeTip ( const QPoint & p ) {
- QListView *listView = parentListView;
+ Q3ListView *listView = parentListView;
- QListViewItem *item = listView->itemAt(p);
+ Q3ListViewItem *item = listView->itemAt(p);
if (!item) return;
AbstractBLVItem *bitem = dynamic_cast<AbstractBLVItem *>(item);
diff --git a/src/gui/buddylistview.h b/src/gui/buddylistview.h
index 1345901..54dc9b5 100644
--- a/src/gui/buddylistview.h
+++ b/src/gui/buddylistview.h
@@ -19,14 +19,14 @@
#ifndef BUDDYLISTVIEW_H
#define BUDDYLISTVIEW_H
-#include "qlistview.h"
+#include "q3listview.h"
#include "qpainter.h"
#include "qtooltip.h"
#include "presence/buddy.h"
#include "presence/presence_epa.h"
#include "patterns/observer.h"
-class AbstractBLVItem : public QListViewItem {
+class AbstractBLVItem : public Q3ListViewItem {
protected:
// Text to show as a tool tip.
QString tip;
@@ -35,8 +35,8 @@ protected:
virtual void set_icon(t_presence_state::t_basic_state state);
public:
- AbstractBLVItem(QListViewItem *parent, const QString &text);
- AbstractBLVItem(QListView *parent, const QString &text);
+ AbstractBLVItem(Q3ListViewItem *parent, const QString &text);
+ AbstractBLVItem(Q3ListView *parent, const QString &text);
virtual ~AbstractBLVItem();
virtual QString get_tip(void);
};
@@ -50,7 +50,7 @@ private:
void set_icon(void);
public:
- BuddyListViewItem(QListViewItem *parent, t_buddy *_buddy);
+ BuddyListViewItem(Q3ListViewItem *parent, t_buddy *_buddy);
virtual ~BuddyListViewItem();
virtual void update(void);
@@ -67,7 +67,7 @@ private:
void set_icon(void);
public:
- BLViewUserItem(QListView *parent, t_presence_epa *_presence_epa);
+ BLViewUserItem(Q3ListView *parent, t_presence_epa *_presence_epa);
virtual ~BLViewUserItem();
void paintCell(QPainter *painter, const QColorGroup &cg,
@@ -81,10 +81,10 @@ public:
class BuddyListViewTip : public QToolTip {
private:
- QListView *parentListView;
+ Q3ListView *parentListView;
public:
- BuddyListViewTip(QListView *parent);
+ BuddyListViewTip(Q3ListView *parent);
virtual ~BuddyListViewTip() {};
void maybeTip ( const QPoint & p );
};
diff --git a/src/gui/diamondcardprofileform.ui.h b/src/gui/diamondcardprofileform.ui.h
index eedec55..90c7c5e 100644
--- a/src/gui/diamondcardprofileform.ui.h
+++ b/src/gui/diamondcardprofileform.ui.h
@@ -1,3 +1,6 @@
+//Added by qt3to4:
+#include <QEvent>
+#include <QMouseEvent>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
diff --git a/src/gui/dtmfform.ui.h b/src/gui/dtmfform.ui.h
index 5e155a8..08639dc 100644
--- a/src/gui/dtmfform.ui.h
+++ b/src/gui/dtmfform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <QKeyEvent>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
diff --git a/src/gui/freedesksystray.cpp b/src/gui/freedesksystray.cpp
index caab5c6..4dfddd4 100644
--- a/src/gui/freedesksystray.cpp
+++ b/src/gui/freedesksystray.cpp
@@ -21,12 +21,17 @@
// 2006 Modified by Michel de Boer
#include "freedesksystray.h"
+//Added by qt3to4:
+#include <QPixmap>
+#include <QLabel>
+#include <QMouseEvent>
+#include <Q3PopupMenu>
FreeDeskSysTray::FreeDeskSysTray ( QWidget *pParent , const char *pszName )
: QLabel(pParent, pszName, WMouseNoMask | WRepaintNoErase | WType_TopLevel | WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop)
{
mainWindow = pParent;
- trayMenu = new QPopupMenu(this);
+ trayMenu = new Q3PopupMenu(this);
}
void FreeDeskSysTray::dock ()
@@ -34,7 +39,7 @@ void FreeDeskSysTray::dock ()
trayMenu->insertSeparator();
trayMenu->insertItem(tr("Show/Hide"), this, SLOT(slotMenuItemShow())) ;
- QIconSet quitIcon(QPixmap::fromMimeSource("exit.png"));
+ QIcon quitIcon(QPixmap::fromMimeSource("exit.png"));
trayMenu->insertItem(quitIcon, tr("Quit"), this, SLOT(slotMenuItemQuit())) ;
Display *dpy = QPaintDevice::x11AppDisplay();
@@ -97,11 +102,11 @@ void FreeDeskSysTray::mousePressEvent ( QMouseEvent *pMouseEvent )
switch (pMouseEvent->button())
{
- case LeftButton:
+ case Qt::LeftButton:
slotMenuItemShow();
break;
- case RightButton:
+ case Qt::RightButton:
showContextMenu(pMouseEvent->globalPos());
break;
@@ -129,7 +134,7 @@ void FreeDeskSysTray::setPixmapOverlay ( const QPixmap& pmOverlay )
QLabel::setPixmap(pm);
}
-QPopupMenu *FreeDeskSysTray::contextMenu()
+Q3PopupMenu *FreeDeskSysTray::contextMenu()
{
return trayMenu;
}
diff --git a/src/gui/freedesksystray.h b/src/gui/freedesksystray.h
index cd41a1f..66eda8c 100644
--- a/src/gui/freedesksystray.h
+++ b/src/gui/freedesksystray.h
@@ -25,7 +25,7 @@
#include <qlabel.h>
#include <qpixmap.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qwidget.h>
#include <qapplication.h>
#include <qpoint.h>
@@ -35,6 +35,8 @@
#include <qimage.h>
#include <qtimer.h>
#include <qrect.h>
+//Added by qt3to4:
+#include <QMouseEvent>
#include <string.h>
#include <stdlib.h>
@@ -64,13 +66,13 @@ public:
void showContextMenu(const QPoint& position);
void dock ();
void undock ();
- QPopupMenu *contextMenu();
+ Q3PopupMenu *contextMenu();
void setPixmap(const QPixmap& pixmap);
public:
QWidget * mainWindow;
- QPopupMenu * trayMenu;
+ Q3PopupMenu * trayMenu;
protected:
diff --git a/src/gui/getaddressform.ui.h b/src/gui/getaddressform.ui.h
index b1f221d..251e90d 100644
--- a/src/gui/getaddressform.ui.h
+++ b/src/gui/getaddressform.ui.h
@@ -119,13 +119,13 @@ void GetAddressForm::loadAddresses()
if (!sys_config->get_ab_show_sip_only() ||
phone.startsWith("sip:"))
{
- new QListViewItem(addressListView, i->realName(),
+ new Q3ListViewItem(addressListView, i->realName(),
(*j).typeLabel(), phone);
}
}
}
- QListViewItem *first = addressListView->firstChild();
+ Q3ListViewItem *first = addressListView->firstChild();
if (first) addressListView->setSelected(first, true);
#endif
}
@@ -140,7 +140,7 @@ void GetAddressForm::loadLocalAddresses()
new AddressListViewItem(localListView, *i);
}
- QListViewItem *first = localListView->firstChild();
+ Q3ListViewItem *first = localListView->firstChild();
if (first) localListView->setSelected(first, true);
}
@@ -156,7 +156,7 @@ void GetAddressForm::selectAddress()
void GetAddressForm::selectKABCAddress()
{
#ifdef HAVE_KDE
- QListViewItem *item = addressListView->selectedItem();
+ Q3ListViewItem *item = addressListView->selectedItem();
if (item) {
QString name(item->text(AB_COL_NAME));
QString phone(item->text(AB_COL_PHONE));
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index f7d836d..4c323b4 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -21,6 +21,9 @@
#include <iostream>
#include <cstdlib>
#include <qapplication.h>
+//Added by qt3to4:
+#include <q3mimefactory.h>
+#include <Q3Frame>
#ifdef HAVE_KDE
#include <kmimetype.h>
@@ -59,22 +62,22 @@
#include "im/msg_session.h"
#include "qcombobox.h"
-#include "qhbox.h"
+#include "q3hbox.h"
#include "qlabel.h"
#include "qlayout.h"
-#include "qlistbox.h"
+#include "q3listbox.h"
#include "qmessagebox.h"
#include "qpixmap.h"
-#include "qprocess.h"
+#include "q3process.h"
#include "qpushbutton.h"
#include "qsize.h"
#include "qsizepolicy.h"
#include "qstring.h"
#include "qtextcodec.h"
-#include "qtextedit.h"
-#include "qtoolbar.h"
+#include "q3textedit.h"
+#include "q3toolbar.h"
#include "qtooltip.h"
-#include "qvbox.h"
+#include "q3vbox.h"
extern string user_host;
extern pthread_t thread_id_main;
@@ -94,16 +97,16 @@ QString str2html(const QString &s)
}
void setDisabledIcon(QAction *action, const QString &icon) {
- QIconSet i = action->iconSet();
- i.setPixmap(QPixmap::fromMimeSource(icon),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon i = action->iconSet();
+ i.setPixmap(qPixmapFromMimeSource(icon),
+ QIcon::Automatic, QIcon::Disabled);
action->setIconSet(i);
}
void setDisabledIcon(QToolButton *toolButton, const QString &icon) {
- QIconSet i = toolButton->iconSet();
- i.setPixmap(QPixmap::fromMimeSource(icon),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon i = toolButton->iconSet();
+ i.setPixmap(qPixmapFromMimeSource(icon),
+ QIcon::Automatic, QIcon::Disabled);
toolButton->setIconSet(i);
}
@@ -203,7 +206,7 @@ void t_gui::displayPhoto(const QImage &photo) {
} else {
QPixmap pm;
pm.convertFromImage(photo.smoothScale(
- photoLabel->width(), photoLabel->height(), QImage::ScaleMin));
+ photoLabel->width(), photoLabel->height(), Qt::KeepAspectRatio));
photoLabel->setPixmap(pm);
photoLabel->show();
}
@@ -880,7 +883,7 @@ string t_gui::select_network_intf(void) {
item = i->name.c_str();
item.append(':').append(i->get_ip_addr().c_str());
sf->nicListBox->insertItem(
- QPixmap::fromMimeSource("kcmpci16.png"),
+ qPixmapFromMimeSource("kcmpci16.png"),
item);
}
@@ -1504,12 +1507,12 @@ void t_gui::cb_register_inprog(t_user *user_config, t_register_type register_typ
// Do not report registration refreshments
if (phone->get_is_registered(user_config)) break;
mainWindow->statRegLabel->setPixmap(
- QPixmap::fromMimeSource("gear.png"));
+ qPixmapFromMimeSource("gear.png"));
break;
case REG_DEREGISTER:
case REG_DEREGISTER_ALL:
mainWindow->statRegLabel->setPixmap(
- QPixmap::fromMimeSource("gear.png"));
+ qPixmapFromMimeSource("gear.png"));
break;
case REG_QUERY:
mainWindow->displayHeader();
@@ -1589,12 +1592,12 @@ void t_gui::cb_notify_call(int line, const QString &from_party, const QString &o
// Create photo pixmap. If no photo is available, then use
// the Twinkle icon.
QPixmap pm;
- QFrame::Shape photoFrameShape = QFrame::NoFrame;
+ Q3Frame::Shape photoFrameShape = Q3Frame::NoFrame;
if (photo.isNull()) {
pm = QPixmap::fromMimeSource("twinkle32.png");
} else {
pm.convertFromImage(photo);
- photoFrameShape = QFrame::Box;
+ photoFrameShape = Q3Frame::Box;
}
// Create the popup view.
@@ -1602,13 +1605,13 @@ void t_gui::cb_notify_call(int line, const QString &from_party, const QString &o
MEMMAN_NEW(sys_tray_popup);
sys_tray_popup->setAutoDelete(false);
sys_tray_popup->setTimeout(0);
- QVBox *popup_view = new QVBox(sys_tray_popup);
- QHBox *hb = new QHBox(popup_view);
+ Q3VBox *popup_view = new Q3VBox(sys_tray_popup);
+ Q3HBox *hb = new Q3HBox(popup_view);
hb->setSpacing(5);
QLabel *lblPhoto = new QLabel(hb);
lblPhoto->setPixmap(pm);
lblPhoto->setFrameShape(photoFrameShape);
- QVBox *vb = new QVBox(hb);
+ Q3VBox *vb = new Q3VBox(hb);
QString captionText("<H2>");
captionText += qApp->translate("SysTrayPopup", "Incoming Call");
captionText += "</H2>";
@@ -1644,13 +1647,13 @@ void t_gui::cb_notify_call(int line, const QString &from_party, const QString &o
// Answer and reject buttons
- QHBox *buttonBox = new QHBox(vb);
- QIconSet iconAnswer(QPixmap::fromMimeSource("answer.png"));
+ Q3HBox *buttonBox = new Q3HBox(vb);
+ QIcon iconAnswer(QPixmap::fromMimeSource("answer.png"));
QPushButton *pbAnswer = new QPushButton(iconAnswer,
qApp->translate("SysTrayPopup", "Answer"), buttonBox);
QObject::connect(pbAnswer, SIGNAL(clicked()),
mainWindow, SLOT(phoneAnswerFromSystrayPopup()));
- QIconSet iconReject(QPixmap::fromMimeSource("reject.png"));
+ QIcon iconReject(QPixmap::fromMimeSource("reject.png"));
QPushButton *pbReject = new QPushButton(iconReject,
qApp->translate("SysTrayPopup", "Reject"), buttonBox);
QObject::connect(pbReject, SIGNAL(clicked()),
@@ -2288,7 +2291,7 @@ void t_gui::cb_missed_call(int num_missed_calls) {
}
void t_gui::cb_nat_discovery_progress_start(int num_steps) {
- natDiscoveryProgressDialog = new QProgressDialog(
+ natDiscoveryProgressDialog = new Q3ProgressDialog(
qApp->translate("GUI", "Firewall / NAT discovery..."),
qApp->translate("GUI", "Abort"),
num_steps, NULL,
@@ -3029,7 +3032,7 @@ void t_gui::open_url_in_browser(const QString &url) {
}
}
#endif
- QProcess process;
+ Q3Process process;
bool process_started = false;
QStringList browsers;
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 90c4f84..9cb92cd 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -31,7 +31,7 @@
#include "qcombobox.h"
#include "qlabel.h"
#include "qlineedit.h"
-#include "qprogressdialog.h"
+#include "q3progressdialog.h"
#include "qtimer.h"
#include "qtoolbutton.h"
#include "qwidget.h"
@@ -74,7 +74,7 @@ private:
QTimer *timerUpdateMessageSessions;
// Progress dialog for FW/NAT discovery progress bar
- QProgressDialog *natDiscoveryProgressDialog;
+ Q3ProgressDialog *natDiscoveryProgressDialog;
// Pointers to line information fields to display information
QLineEdit *fromLabel;
diff --git a/src/gui/historyform.ui.h b/src/gui/historyform.ui.h
index 6c47540..08af8c7 100644
--- a/src/gui/historyform.ui.h
+++ b/src/gui/historyform.ui.h
@@ -1,3 +1,7 @@
+//Added by qt3to4:
+#include <QCloseEvent>
+#include <QPixmap>
+#include <Q3PopupMenu>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -31,9 +35,9 @@
void HistoryForm::init()
{
historyListView->setSorting(HISTCOL_TIMESTAMP, false);
- historyListView->setColumnWidthMode(HISTCOL_FROMTO, QListView::Manual);
+ historyListView->setColumnWidthMode(HISTCOL_FROMTO, Q3ListView::Manual);
historyListView->setColumnWidth(HISTCOL_FROMTO, 200);
- historyListView->setColumnWidthMode(HISTCOL_SUBJECT, QListView::Manual);
+ historyListView->setColumnWidthMode(HISTCOL_SUBJECT, Q3ListView::Manual);
historyListView->setColumnWidth(HISTCOL_SUBJECT, 200);
inCheckBox->setChecked(true);
@@ -44,9 +48,9 @@ void HistoryForm::init()
timeLastViewed = phone->get_startup_time();
- QIconSet inviteIcon(QPixmap::fromMimeSource("invite.png"));
- QIconSet deleteIcon(QPixmap::fromMimeSource("editdelete.png"));
- histPopupMenu = new QPopupMenu(this);
+ QIcon inviteIcon(QPixmap::fromMimeSource("invite.png"));
+ QIcon deleteIcon(QPixmap::fromMimeSource("editdelete.png"));
+ histPopupMenu = new Q3PopupMenu(this);
MEMMAN_NEW(histPopupMenu);
itemCall = histPopupMenu->insertItem(inviteIcon, tr("Call..."), this, SLOT(call()));
@@ -126,7 +130,7 @@ void HistoryForm::loadHistory()
totalDurationValueTextLabel->setText(durationText);
// Make the first entry the selected entry.
- QListViewItem *first = historyListView->firstChild();
+ Q3ListViewItem *first = historyListView->firstChild();
if (first) {
historyListView->setSelected(first, true);
showCallDetails(first);
@@ -173,7 +177,7 @@ void HistoryForm::closeEvent( QCloseEvent *e )
QDialog::closeEvent(e);
}
-void HistoryForm::showCallDetails(QListViewItem *item)
+void HistoryForm::showCallDetails(Q3ListViewItem *item)
{
QString s;
@@ -272,7 +276,7 @@ void HistoryForm::showCallDetails(QListViewItem *item)
cdrTextEdit->setText(s);
}
-void HistoryForm::popupMenu(QListViewItem *item, const QPoint &pos)
+void HistoryForm::popupMenu(Q3ListViewItem *item, const QPoint &pos)
{
if (!item) return;
@@ -289,7 +293,7 @@ void HistoryForm::popupMenu(QListViewItem *item, const QPoint &pos)
histPopupMenu->popup(pos);
}
-void HistoryForm::call(QListViewItem *item)
+void HistoryForm::call(Q3ListViewItem *item)
{
if (!item) return;
@@ -339,13 +343,13 @@ void HistoryForm::call(QListViewItem *item)
void HistoryForm::call(void)
{
- QListViewItem *item = historyListView->currentItem();
+ Q3ListViewItem *item = historyListView->currentItem();
if (item) call(item);
}
void HistoryForm::deleteEntry(void)
{
- QListViewItem *item = historyListView->currentItem();
+ Q3ListViewItem *item = historyListView->currentItem();
HistoryListViewItem *histItem = dynamic_cast<HistoryListViewItem *>(item);
if (!histItem) return;
diff --git a/src/gui/historylistview.cpp b/src/gui/historylistview.cpp
index 2f9806c..575801c 100644
--- a/src/gui/historylistview.cpp
+++ b/src/gui/historylistview.cpp
@@ -21,9 +21,11 @@
#include "userintf.h"
#include "qpixmap.h"
+//Added by qt3to4:
+#include <q3mimefactory.h>
-HistoryListViewItem::HistoryListViewItem( QListView * parent, const t_call_record &cr, t_user *user_config, time_t _last_viewed) :
- QListViewItem(parent,
+HistoryListViewItem::HistoryListViewItem( Q3ListView * parent, const t_call_record &cr, t_user *user_config, time_t _last_viewed) :
+ Q3ListViewItem(parent,
time2str(cr.time_start, "%d %b %Y %H:%M:%S").c_str(),
cr.get_direction().c_str(),
(cr.direction == t_call_record::DIR_IN ?
@@ -39,13 +41,13 @@ HistoryListViewItem::HistoryListViewItem( QListView * parent, const t_call_recor
// Set direction icon
setPixmap(HISTCOL_DIRECTION, (cr.direction == t_call_record::DIR_IN ?
- QPixmap::fromMimeSource("1leftarrow-yellow.png") :
- QPixmap::fromMimeSource("1rightarrow.png")));
+ qPixmapFromMimeSource("1leftarrow-yellow.png") :
+ qPixmapFromMimeSource("1rightarrow.png")));
// Set status icon
setPixmap(HISTCOL_STATUS, (cr.invite_resp_code < 300 ?
- QPixmap::fromMimeSource("ok.png") :
- QPixmap::fromMimeSource("cancel.png")));
+ qPixmapFromMimeSource("ok.png") :
+ qPixmapFromMimeSource("cancel.png")));
}
void HistoryListViewItem::paintCell(QPainter *painter, const QColorGroup &cg,
@@ -60,14 +62,14 @@ void HistoryListViewItem::paintCell(QPainter *painter, const QColorGroup &cg,
// Highlight missed calls since last view
grp.setColor(QColorGroup::Base, QColor("yellow"));
}
- QListViewItem::paintCell(painter, grp, column, width, align);
+ Q3ListViewItem::paintCell(painter, grp, column, width, align);
painter->restore();
}
-int HistoryListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
+int HistoryListViewItem::compare ( Q3ListViewItem * i, int col, bool ascending ) const
{
if (col != HISTCOL_TIMESTAMP) {
- return QListViewItem::compare(i, col, ascending);
+ return Q3ListViewItem::compare(i, col, ascending);
}
if (call_record.time_start < ((HistoryListViewItem *)i)->get_time_start()) {
return -1;
diff --git a/src/gui/historylistview.h b/src/gui/historylistview.h
index acde247..af1b5ce 100644
--- a/src/gui/historylistview.h
+++ b/src/gui/historylistview.h
@@ -20,7 +20,7 @@
#define _HISTORYLISTVIEW_H
#include <sys/time.h>
-#include "qlistview.h"
+#include "q3listview.h"
#include "qpainter.h"
#include "call_history.h"
#include "user.h"
@@ -32,18 +32,18 @@
#define HISTCOL_SUBJECT 3
#define HISTCOL_STATUS 4
-class HistoryListViewItem : public QListViewItem {
+class HistoryListViewItem : public Q3ListViewItem {
private:
t_call_record call_record;
time_t last_viewed;
public:
- HistoryListViewItem( QListView * parent, const t_call_record &cr, t_user *user_config,
+ HistoryListViewItem( Q3ListView * parent, const t_call_record &cr, t_user *user_config,
time_t _last_viewed);
void paintCell(QPainter *painter, const QColorGroup &cg,
int column, int width, int align);
- int compare ( QListViewItem * i, int col, bool ascending ) const;
+ int compare ( Q3ListViewItem * i, int col, bool ascending ) const;
time_t get_time_start(void) const;
t_call_record get_call_record(void) const;
};
diff --git a/src/gui/inviteform.ui.h b/src/gui/inviteform.ui.h
index 6e0b6d4..5f3a9bc 100644
--- a/src/gui/inviteform.ui.h
+++ b/src/gui/inviteform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <QCloseEvent>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
diff --git a/src/gui/logviewform.ui.h b/src/gui/logviewform.ui.h
index 859de0d..6563015 100644
--- a/src/gui/logviewform.ui.h
+++ b/src/gui/logviewform.ui.h
@@ -1,3 +1,6 @@
+//Added by qt3to4:
+#include <Q3TextStream>
+#include <QCloseEvent>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -39,8 +42,8 @@ void LogViewForm::show()
logfile = new QFile(fname);
MEMMAN_NEW(logfile);
logstream = NULL;
- if (logfile->open(IO_ReadOnly)) {
- logstream = new QTextStream(logfile);
+ if (logfile->open(QIODevice::ReadOnly)) {
+ logstream = new Q3TextStream(logfile);
MEMMAN_NEW(logstream);
logTextEdit->setText(logstream->read());
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 36242f9..e64572d 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -26,7 +26,7 @@
#include <qapplication.h>
#include <qtranslator.h>
#include <qmime.h>
-#include <qprogressdialog.h>
+#include <q3progressdialog.h>
#include <qtextcodec.h>
#include "mphoneform.h"
@@ -486,7 +486,7 @@ QApplication *create_user_interface(bool cli_mode, int argc, char **argv, QTrans
// Store the defualt mime source factory for the embedded icons.
// This is created by Qt. The KApplication constructor seems to destroy
// this default.
- QMimeSourceFactory *factory_qt = QMimeSourceFactory::takeDefaultFactory();
+ Q3MimeSourceFactory *factory_qt = Q3MimeSourceFactory::takeDefaultFactory();
// Initialize the KApplication
KCmdLineArgs::init(argc, argv, "twinkle", PRODUCT_NAME, "Soft phone",
@@ -495,13 +495,13 @@ QApplication *create_user_interface(bool cli_mode, int argc, char **argv, QTrans
MEMMAN_NEW(qa);
// Store the KDE mime source factory
- QMimeSourceFactory *factory_kde = QMimeSourceFactory::takeDefaultFactory();
+ Q3MimeSourceFactory *factory_kde = Q3MimeSourceFactory::takeDefaultFactory();
// Make the Qt factory the default to make the embedded icons work.
- QMimeSourceFactory::setDefaultFactory(factory_qt);
+ Q3MimeSourceFactory::setDefaultFactory(factory_qt);
// Add the KDE factory
- QMimeSourceFactory::addFactory(factory_kde);
+ Q3MimeSourceFactory::addFactory(factory_kde);
#else
int tmp = argc;
qa = new t_twinkle_application(tmp, argv);
diff --git a/src/gui/messageform.ui.h b/src/gui/messageform.ui.h
index f44fc02..0fc0f86 100644
--- a/src/gui/messageform.ui.h
+++ b/src/gui/messageform.ui.h
@@ -36,6 +36,13 @@
#include <kuserprofile.h>
#else
#include "utils/mime_database.h"
+//Added by qt3to4:
+#include <QKeyEvent>
+#include <QLabel>
+#include <QPixmap>
+#include <Q3Frame>
+#include <Q3PopupMenu>
+#include <QCloseEvent>
#endif
using namespace utils;
@@ -63,7 +70,7 @@ void MessageForm::init()
// Set toolbutton icons for disabled options.
setDisabledIcon(addressToolButton, "kontact_contacts-disabled.png");
- attachmentPopupMenu = new QPopupMenu(this);
+ attachmentPopupMenu = new Q3PopupMenu(this);
MEMMAN_NEW(attachmentPopupMenu);
connect(attachmentPopupMenu, SIGNAL(activated(int)),
@@ -112,7 +119,7 @@ void MessageForm::destroy()
void MessageForm::closeEvent(QCloseEvent *e)
{
MEMMAN_DELETE(this); // destructive close
- QMainWindow::closeEvent(e);
+ Q3MainWindow::closeEvent(e);
}
@@ -131,7 +138,7 @@ void MessageForm::show()
msgLineEdit->setFocus();
}
- QMainWindow::show();
+ Q3MainWindow::show();
}
void MessageForm::selectUserConfig(t_user *user_config)
@@ -279,7 +286,7 @@ void MessageForm::addMessage(const im::t_msg &msg, const QString &name)
// Timestamp and name of sender
if (msg.direction == im::MSG_DIR_IN) s += "<font color=\"blue\">";
s += time2str(msg.timestamp, "%H:%M:%S ").c_str();
- s += QStyleSheet::escape(name);
+ s += Q3StyleSheet::escape(name);
if (msg.direction == im::MSG_DIR_IN) s += "</font>";
s += "</b>";
@@ -298,7 +305,7 @@ void MessageForm::addMessage(const im::t_msg &msg, const QString &name)
if (msg.format == im::TXT_HTML) {
s += msg.message.c_str();
} else {
- s += QStyleSheet::escape(msg.message.c_str());
+ s += Q3StyleSheet::escape(msg.message.c_str());
}
}
@@ -389,7 +396,7 @@ void MessageForm::displayError(const QString &errorMsg)
s += "<b>";
s += tr("Delivery failure").ascii();
s += ": </b>";
- s += QStyleSheet::escape(errorMsg);
+ s += Q3StyleSheet::escape(errorMsg);
s += "</font>";
conversationBrowser->append(s);
@@ -401,7 +408,7 @@ void MessageForm::displayDeliveryNotification(const QString &notification)
s += "<b>";
s += tr("Delivery notification").ascii();
s += ": </b>";
- s += QStyleSheet::escape(notification);
+ s += Q3StyleSheet::escape(notification);
s += "</font>";
conversationBrowser->append(s);
@@ -436,7 +443,7 @@ void MessageForm::showAttachmentPopupMenu(const QString &attachment) {
attachmentPopupMenu->clear();
- QIconSet saveIcon(QPixmap::fromMimeSource("save_as.png"));
+ QIcon saveIcon(QPixmap::fromMimeSource("save_as.png"));
attachmentPopupMenu->insertItem(saveIcon, "Save as...", id++);
#ifdef HAVE_KDE
@@ -453,12 +460,12 @@ void MessageForm::showAttachmentPopupMenu(const QString &attachment) {
serviceMap->push_back(service);
QString menuText = tr("Open with %1...").arg(service->name());
QPixmap pixmap = service->pixmap(KIcon::Small);
- QIconSet iconSet;
- iconSet.setPixmap(pixmap, QIconSet::Small);
+ QIcon iconSet;
+ iconSet.setPixmap(pixmap, QIcon::Small);
attachmentPopupMenu->insertItem(iconSet, menuText, id++);
}
- QIconSet openIcon(QPixmap::fromMimeSource("fileopen.png"));
+ QIcon openIcon(QPixmap::fromMimeSource("fileopen.png"));
attachmentPopupMenu->insertItem(openIcon, tr("Open with..."), id++);
#endif
@@ -480,9 +487,9 @@ void MessageForm::attachmentPopupActivated(int id) {
connect(d, SIGNAL(okClicked()), this,
SLOT(saveAttachment()));
#else
- QFileDialog *d = new QFileDialog(QString::null, QString::null, this, 0, true);
+ Q3FileDialog *d = new Q3FileDialog(QString::null, QString::null, this, 0, true);
MEMMAN_NEW(d);
- d->setMode(QFileDialog::AnyFile);
+ d->setMode(Q3FileDialog::AnyFile);
connect(d, SIGNAL(fileSelected(const QString &)), this,
SLOT(saveAttachment()));
@@ -514,7 +521,7 @@ void MessageForm::saveAttachment() {
#ifdef HAVE_KDE
KFileDialog *d = dynamic_cast<KFileDialog *>(_saveAsDialog);
#else
- QFileDialog *d = dynamic_cast<QFileDialog *>(_saveAsDialog);
+ Q3FileDialog *d = dynamic_cast<Q3FileDialog *>(_saveAsDialog);
#endif
QString filename = d->selectedFile();
@@ -560,7 +567,7 @@ void MessageForm::setComposingIndication(const QString &name)
MEMMAN_NEW(_isComposingLabel);
_isComposingLabel->setText(tr("%1 is typing a message.").arg(name));
- _isComposingLabel->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
+ _isComposingLabel->setFrameStyle(Q3Frame::NoFrame | Q3Frame::Plain);
statusBar()->addWidget(_isComposingLabel);
}
}
diff --git a/src/gui/mphoneform.ui.h b/src/gui/mphoneform.ui.h
index 6d008e6..21ff362 100644
--- a/src/gui/mphoneform.ui.h
+++ b/src/gui/mphoneform.ui.h
@@ -26,6 +26,15 @@
#include "twinkle_config.h"
#include "twinklesystray.h"
+//Added by qt3to4:
+#include <QLabel>
+#include <QPixmap>
+#include <QMouseEvent>
+#include <QCloseEvent>
+#include <QKeyEvent>
+#include <QEvent>
+#include <Q3Frame>
+#include <Q3PopupMenu>
// Time (s) that the conversation timer of a line should stay visible after
// a call has ended
@@ -50,11 +59,11 @@ void MphoneForm::init()
sysTray = 0;
// Popup menu for a single buddy
- QIconSet inviteIcon(QPixmap::fromMimeSource("invite.png"));
- QIconSet messageIcon(QPixmap::fromMimeSource("message.png"));
- QIconSet editIcon(QPixmap::fromMimeSource("edit16.png"));
- QIconSet deleteIcon(QPixmap::fromMimeSource("editdelete.png"));
- buddyPopupMenu = new QPopupMenu(this);
+ QIcon inviteIcon(QPixmap::fromMimeSource("invite.png"));
+ QIcon messageIcon(QPixmap::fromMimeSource("message.png"));
+ QIcon editIcon(QPixmap::fromMimeSource("edit16.png"));
+ QIcon deleteIcon(QPixmap::fromMimeSource("editdelete.png"));
+ buddyPopupMenu = new Q3PopupMenu(this);
MEMMAN_NEW(buddyPopupMenu);
buddyPopupMenu->insertItem(inviteIcon, tr("&Call..."), this, SLOT(doCallBuddy()));
buddyPopupMenu->insertItem(messageIcon, tr("Instant &message..."), this, SLOT(doMessageBuddy()));
@@ -62,19 +71,19 @@ void MphoneForm::init()
buddyPopupMenu->insertItem(deleteIcon, tr("&Delete"), this, SLOT(doDeleteBuddy()));
// Change availibility sub popup menu
- changeAvailabilityPopupMenu = new QPopupMenu(this);
+ changeAvailabilityPopupMenu = new Q3PopupMenu(this);
MEMMAN_NEW(changeAvailabilityPopupMenu);
- QIconSet availOnlineIcon(QPixmap::fromMimeSource("presence_online.png"));
- QIconSet availOfflineIcon(QPixmap::fromMimeSource("presence_offline.png"));
+ QIcon availOnlineIcon(QPixmap::fromMimeSource("presence_online.png"));
+ QIcon availOfflineIcon(QPixmap::fromMimeSource("presence_offline.png"));
changeAvailabilityPopupMenu->insertItem(availOfflineIcon, tr("O&ffline"), this,
SLOT(doAvailabilityOffline()));
changeAvailabilityPopupMenu->insertItem(availOnlineIcon, tr("&Online"), this,
SLOT(doAvailabilityOnline()));
// Popup menu for a buddy list (click on profile name)
- QIconSet changeAvailabilityIcon(QPixmap::fromMimeSource("presence_online.png"));
- QIconSet addIcon(QPixmap::fromMimeSource("buddy.png"));
- buddyListPopupMenu = new QPopupMenu(this);
+ QIcon changeAvailabilityIcon(QPixmap::fromMimeSource("presence_online.png"));
+ QIcon addIcon(QPixmap::fromMimeSource("buddy.png"));
+ buddyListPopupMenu = new Q3PopupMenu(this);
MEMMAN_NEW(buddyListPopupMenu);
buddyListPopupMenu->insertItem(changeAvailabilityIcon, tr("&Change availability"),
changeAvailabilityPopupMenu);
@@ -146,7 +155,7 @@ void MphoneForm::init()
#ifdef HAVE_KDE
KPopupMenu *menu;
#else
- QPopupMenu *menu;
+ Q3PopupMenu *menu;
#endif
menu = sysTray->contextMenu();
@@ -493,12 +502,12 @@ void MphoneForm::updateLineEncryptionState(int line)
if (!zrtp_sas_confirmed) {
toolTip.append("\n").append(tr("Click to confirm SAS."));
- cryptLabel->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ cryptLabel->setFrameStyle(Q3Frame::Panel | Q3Frame::Raised);
cryptLabel->setPixmap(
QPixmap::fromMimeSource("encrypted.png"));
} else {
toolTip.append("\n").append(tr("Click to clear SAS verification."));
- cryptLabel->setFrameStyle(QFrame::NoFrame);
+ cryptLabel->setFrameStyle(Q3Frame::NoFrame);
cryptLabel->setPixmap(
QPixmap::fromMimeSource("encrypted_verified.png"));
}
@@ -1414,10 +1423,10 @@ void MphoneForm::updateDiamondcardMenu()
static int adminCenterId = -1;
// Sub menu's
- static QPopupMenu *rechargeMenu = NULL;
- static QPopupMenu *balanceHistoryMenu = NULL;
- static QPopupMenu *callHistoryMenu = NULL;
- static QPopupMenu *adminCenterMenu = NULL;
+ static Q3PopupMenu *rechargeMenu = NULL;
+ static Q3PopupMenu *balanceHistoryMenu = NULL;
+ static Q3PopupMenu *callHistoryMenu = NULL;
+ static Q3PopupMenu *adminCenterMenu = NULL;
// Clear old menu
removeDiamondcardAction(rechargeId);
@@ -1450,10 +1459,10 @@ void MphoneForm::updateDiamondcardMenu()
}
else
{
- rechargeMenu = new QPopupMenu(this);
- balanceHistoryMenu = new QPopupMenu(this);
- callHistoryMenu = new QPopupMenu(this);
- adminCenterMenu = new QPopupMenu(this);
+ rechargeMenu = new Q3PopupMenu(this);
+ balanceHistoryMenu = new Q3PopupMenu(this);
+ callHistoryMenu = new Q3PopupMenu(this);
+ adminCenterMenu = new Q3PopupMenu(this);
// No MEMMAN registration as the popup menu may be automatically
// deleted by Qt on application close down. This would show up as
// a memory leak in MEMMAN.
@@ -1503,7 +1512,7 @@ void MphoneForm::removeDiamondcardAction(int &id)
}
}
-void MphoneForm::removeDiamondcardMenu(QPopupMenu* &menu)
+void MphoneForm::removeDiamondcardMenu(Q3PopupMenu* &menu)
{
if (menu) {
delete menu;
@@ -2316,7 +2325,7 @@ void MphoneForm::newUsers(const list<string> &profiles)
}
// Add new phone users
- QProgressDialog progress(tr("Starting user profiles..."), "Abort", add_profile_list.size(), this,
+ Q3ProgressDialog progress(tr("Starting user profiles..."), "Abort", add_profile_list.size(), this,
"starting user profiles", true);
progress.setCaption(PRODUCT_NAME);
progress.setMinimumDuration(200);
@@ -2757,10 +2766,10 @@ void MphoneForm::processCryptLabelClick(int line)
// Show popup menu to access voice mail
void MphoneForm::popupMenuVoiceMail(const QPoint &pos)
{
- QPopupMenu menu(this);
- QIconSet vmIcon(QPixmap::fromMimeSource("mwi_none16.png"));
+ Q3PopupMenu menu(this);
+ QIcon vmIcon(QPixmap::fromMimeSource("mwi_none16.png"));
vmIcon.setPixmap(QPixmap::fromMimeSource("mwi_none16_dis.png"),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon::Automatic, QIcon::Disabled);
list<t_user *>user_list = phone->ref_users();
map<int, t_user *> vm;
@@ -2949,7 +2958,7 @@ void MphoneForm::populateBuddyList()
}
}
-void MphoneForm::showBuddyListPopupMenu(QListViewItem *item, const QPoint &pos)
+void MphoneForm::showBuddyListPopupMenu(Q3ListViewItem *item, const QPoint &pos)
{
if (!item) return;
@@ -2963,7 +2972,7 @@ void MphoneForm::showBuddyListPopupMenu(QListViewItem *item, const QPoint &pos)
void MphoneForm::doCallBuddy()
{
- QListViewItem *qitem = buddyListView->currentItem();
+ Q3ListViewItem *qitem = buddyListView->currentItem();
BuddyListViewItem *item = dynamic_cast<BuddyListViewItem *>(qitem);
if (!item) return;
@@ -2973,7 +2982,7 @@ void MphoneForm::doCallBuddy()
phoneInvite(user_config, buddy->get_sip_address().c_str(), "", false);
}
-void MphoneForm::doMessageBuddy(QListViewItem *qitem)
+void MphoneForm::doMessageBuddy(Q3ListViewItem *qitem)
{
BuddyListViewItem *item = dynamic_cast<BuddyListViewItem *>(qitem);
if (!item) return;
@@ -2985,13 +2994,13 @@ void MphoneForm::doMessageBuddy(QListViewItem *qitem)
void MphoneForm::doMessageBuddy()
{
- QListViewItem *item = buddyListView->currentItem();
+ Q3ListViewItem *item = buddyListView->currentItem();
doMessageBuddy(item);
}
void MphoneForm::doEditBuddy()
{
- QListViewItem *qitem = buddyListView->currentItem();
+ Q3ListViewItem *qitem = buddyListView->currentItem();
BuddyListViewItem *item = dynamic_cast<BuddyListViewItem *>(qitem);
if (!item) return;
@@ -3004,7 +3013,7 @@ void MphoneForm::doEditBuddy()
void MphoneForm::doDeleteBuddy()
{
- QListViewItem *qitem = buddyListView->currentItem();
+ Q3ListViewItem *qitem = buddyListView->currentItem();
BuddyListViewItem *item = dynamic_cast<BuddyListViewItem *>(qitem);
if (!item) return;
@@ -3030,7 +3039,7 @@ void MphoneForm::doDeleteBuddy()
void MphoneForm::doAddBuddy()
{
- QListViewItem *qitem = buddyListView->currentItem();
+ Q3ListViewItem *qitem = buddyListView->currentItem();
BLViewUserItem *item = dynamic_cast<BLViewUserItem *>(qitem);
if (!item) return;
@@ -3046,7 +3055,7 @@ void MphoneForm::doAddBuddy()
void MphoneForm::doAvailabilityOffline()
{
- QListViewItem *qitem = buddyListView->currentItem();
+ Q3ListViewItem *qitem = buddyListView->currentItem();
BLViewUserItem *item = dynamic_cast<BLViewUserItem *>(qitem);
if (!item) return;
@@ -3058,7 +3067,7 @@ void MphoneForm::doAvailabilityOffline()
void MphoneForm::doAvailabilityOnline()
{
- QListViewItem *qitem = buddyListView->currentItem();
+ Q3ListViewItem *qitem = buddyListView->currentItem();
BLViewUserItem *item = dynamic_cast<BLViewUserItem *>(qitem);
if (!item) return;
diff --git a/src/gui/redirectform.ui.h b/src/gui/redirectform.ui.h
index d29a874..1c632d9 100644
--- a/src/gui/redirectform.ui.h
+++ b/src/gui/redirectform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <QPixmap>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -32,10 +34,10 @@ void RedirectForm::init()
getAddressForm = 0;
// Set toolbutton icons for disabled options.
- QIconSet i;
+ QIcon i;
i = address1ToolButton->iconSet();
i.setPixmap(QPixmap::fromMimeSource("kontact_contacts-disabled.png"),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon::Automatic, QIcon::Disabled);
address1ToolButton->setIconSet(i);
address2ToolButton->setIconSet(i);
address3ToolButton->setIconSet(i);
diff --git a/src/gui/selectnicform.ui.h b/src/gui/selectnicform.ui.h
index 9dc0a35..4a208ae 100644
--- a/src/gui/selectnicform.ui.h
+++ b/src/gui/selectnicform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <QPixmap>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
diff --git a/src/gui/selectprofileform.ui.h b/src/gui/selectprofileform.ui.h
index 1586227..452e796 100644
--- a/src/gui/selectprofileform.ui.h
+++ b/src/gui/selectprofileform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <QPixmap>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -94,7 +96,7 @@ int SelectProfileForm::execForm()
}
// Select the created profile
- QCheckListItem *item = (QCheckListItem *)profileListView->currentItem();
+ Q3CheckListItem *item = (Q3CheckListItem *)profileListView->currentItem();
QString profile = item->text();
profile.append(USER_FILE_EXT);
selectedProfiles.clear();
@@ -125,7 +127,7 @@ int SelectProfileForm::execForm()
// The execForm() method cannot be used as it will block the Qt event loop.
// NOTE: the method show() is not re-implemented as Qt calls this method
// from exec() internally.
-void SelectProfileForm::showForm(QMainWindow *_mainWindow)
+void SelectProfileForm::showForm(Q3MainWindow *_mainWindow)
{
mainWindow = _mainWindow;
profileListView->clear();
@@ -141,9 +143,9 @@ void SelectProfileForm::showForm(QMainWindow *_mainWindow)
// Initialize profile list view
fillProfileListView(profiles);
- QListViewItemIterator j(profileListView);
+ Q3ListViewItemIterator j(profileListView);
while (j.current()) {
- QCheckListItem *item = (QCheckListItem *)j.current();
+ Q3CheckListItem *item = (Q3CheckListItem *)j.current();
QString profile = item->text();
// Set pixmap of default profile
@@ -171,9 +173,9 @@ void SelectProfileForm::showForm(QMainWindow *_mainWindow)
void SelectProfileForm::runProfile()
{
selectedProfiles.clear();
- QListViewItemIterator i(profileListView, QListViewItemIterator::Checked);
+ Q3ListViewItemIterator i(profileListView, Q3ListViewItemIterator::Checked);
while (i.current()) {
- QCheckListItem *item = (QCheckListItem *)i.current();
+ Q3CheckListItem *item = (Q3CheckListItem *)i.current();
QString profile =item->text();
profile.append(USER_FILE_EXT);
selectedProfiles.push_back(profile.ascii());
@@ -196,7 +198,7 @@ void SelectProfileForm::runProfile()
void SelectProfileForm::editProfile()
{
- QCheckListItem *item = (QCheckListItem *)profileListView->currentItem();
+ Q3CheckListItem *item = (Q3CheckListItem *)profileListView->currentItem();
QString profile = item->text();
// If the profile to edit is currently active, then edit the in-memory
@@ -291,9 +293,9 @@ void SelectProfileForm::newProfileCreated()
{
// New profile created
// Add the new profile to the profile list box
- QCheckListItem *item = new QCheckListItem(profileListView,
+ Q3CheckListItem *item = new Q3CheckListItem(profileListView,
user_config->get_profile_name().c_str(),
- QCheckListItem::CheckBox);
+ Q3CheckListItem::CheckBox);
item->setPixmap(0, QPixmap::fromMimeSource("penguin-small.png"));
// Make the new profile the selected profile
@@ -312,7 +314,7 @@ void SelectProfileForm::newProfileCreated()
void SelectProfileForm::deleteProfile()
{
- QCheckListItem *item = (QCheckListItem *)profileListView->currentItem();
+ Q3CheckListItem *item = (Q3CheckListItem *)profileListView->currentItem();
QString profile = item->text();
QString msg = tr("Are you sure you want to delete profile '%1'?").arg(profile);
QMessageBox *mb = new QMessageBox(tr("Delete profile"), msg,
@@ -363,7 +365,7 @@ void SelectProfileForm::deleteProfile()
}
// Delete profile from profile list box
- QCheckListItem *item = (QCheckListItem *)profileListView->
+ Q3CheckListItem *item = (Q3CheckListItem *)profileListView->
currentItem();
delete item;
if (profileListView->childCount() == 0) {
@@ -387,7 +389,7 @@ void SelectProfileForm::deleteProfile()
void SelectProfileForm::renameProfile()
{
- QCheckListItem *item = (QCheckListItem *)profileListView->currentItem();
+ Q3CheckListItem *item = (Q3CheckListItem *)profileListView->currentItem();
QString oldProfile = item->text();
// Ask user for a new profile name
@@ -468,7 +470,7 @@ void SelectProfileForm::renameProfile()
emit profileRenamed();
// Change profile name in the list box
- QCheckListItem *item = (QCheckListItem *)profileListView->currentItem();
+ Q3CheckListItem *item = (Q3CheckListItem *)profileListView->currentItem();
item->setText(0, newProfile);
}
}
@@ -489,7 +491,7 @@ void SelectProfileForm::setAsDefault()
defaultSet = true;
// Restore all pixmaps
- QListViewItemIterator i(profileListView);
+ Q3ListViewItemIterator i(profileListView);
while (i.current()) {
i.current()->setPixmap(0, QPixmap::fromMimeSource("penguin-small.png"));
i++;
@@ -498,9 +500,9 @@ void SelectProfileForm::setAsDefault()
// Set pixmap of the default profiles.
// Set default profiles in system settings.
list<string> l;
- QListViewItemIterator j(profileListView, QListViewItemIterator::Checked);
+ Q3ListViewItemIterator j(profileListView, Q3ListViewItemIterator::Checked);
while (j.current()) {
- QCheckListItem *item = (QCheckListItem *)j.current();
+ Q3CheckListItem *item = (Q3CheckListItem *)j.current();
item->setPixmap(0, QPixmap::fromMimeSource("twinkle16.png"));
l.push_back(item->text().ascii());
j++;
@@ -614,8 +616,8 @@ void SelectProfileForm::fillProfileListView(const QStringList &profiles)
// Strip off the user file extension
QString profile = *i;
profile.truncate(profile.length() - strlen(USER_FILE_EXT));
- QCheckListItem *item = new QCheckListItem(
- profileListView, profile, QCheckListItem::CheckBox);
+ Q3CheckListItem *item = new Q3CheckListItem(
+ profileListView, profile, Q3CheckListItem::CheckBox);
item->setPixmap(0, QPixmap::fromMimeSource("penguin-small.png"));
}
@@ -623,9 +625,9 @@ void SelectProfileForm::fillProfileListView(const QStringList &profiles)
profileListView->setSelected(profileListView->firstChild(), true);
}
-void SelectProfileForm::toggleItem(QListViewItem *item)
+void SelectProfileForm::toggleItem(Q3ListViewItem *item)
{
- QCheckListItem *checkItem = (QCheckListItem *)item;
+ Q3CheckListItem *checkItem = (Q3CheckListItem *)item;
checkItem->setOn(!checkItem->isOn());
}
diff --git a/src/gui/selectuserform.ui.h b/src/gui/selectuserform.ui.h
index 3b2862d..61b1fa6 100644
--- a/src/gui/selectuserform.ui.h
+++ b/src/gui/selectuserform.ui.h
@@ -71,8 +71,8 @@ void SelectUserForm::show(t_select_purpose purpose)
// Fill list view
list<t_user *> user_list = phone->ref_users();
for (list<t_user *>::reverse_iterator i = user_list.rbegin(); i != user_list.rend(); i++) {
- QCheckListItem *item = new QCheckListItem(userListView,
- (*i)->get_profile_name().c_str(), QCheckListItem::CheckBox);
+ Q3CheckListItem *item = new Q3CheckListItem(userListView,
+ (*i)->get_profile_name().c_str(), Q3CheckListItem::CheckBox);
switch (purpose) {
case SELECT_DND:
@@ -93,9 +93,9 @@ void SelectUserForm::validate()
{
list<t_user *> selected_list, not_selected_list;
- QListViewItemIterator i(userListView);
+ Q3ListViewItemIterator i(userListView);
while (i.current()) {
- QCheckListItem *item = (QCheckListItem *)(i.current());
+ Q3CheckListItem *item = (Q3CheckListItem *)(i.current());
if (item->isOn()) {
selected_list.push_back(phone->
ref_user_profile(item->text().ascii()));
@@ -113,9 +113,9 @@ void SelectUserForm::validate()
void SelectUserForm::selectAll()
{
- QListViewItemIterator i(userListView);
+ Q3ListViewItemIterator i(userListView);
while (i.current()) {
- QCheckListItem *item = (QCheckListItem *)(i.current());
+ Q3CheckListItem *item = (Q3CheckListItem *)(i.current());
item->setOn(true);
i++;
}
@@ -123,16 +123,16 @@ void SelectUserForm::selectAll()
void SelectUserForm::clearAll()
{
- QListViewItemIterator i(userListView);
+ Q3ListViewItemIterator i(userListView);
while (i.current()) {
- QCheckListItem *item = (QCheckListItem *)(i.current());
+ Q3CheckListItem *item = (Q3CheckListItem *)(i.current());
item->setOn(false);
i++;
}
}
-void SelectUserForm::toggle(QListViewItem *item)
+void SelectUserForm::toggle(Q3ListViewItem *item)
{
- QCheckListItem *checkItem = (QCheckListItem *)item;
+ Q3CheckListItem *checkItem = (Q3CheckListItem *)item;
checkItem->setOn(!checkItem->isOn());
}
diff --git a/src/gui/sendfileform.ui.h b/src/gui/sendfileform.ui.h
index 067b6dd..46c9896 100644
--- a/src/gui/sendfileform.ui.h
+++ b/src/gui/sendfileform.ui.h
@@ -71,7 +71,7 @@ void SendFileForm::chooseFile()
d->setOperationMode(KFileDialog::Other);
connect(d, SIGNAL(okClicked()), this, SLOT(setFilename()));
#else
- QFileDialog *d = new QFileDialog(QString::null, QString::null, this, 0, true);
+ Q3FileDialog *d = new Q3FileDialog(QString::null, QString::null, this, 0, true);
MEMMAN_NEW(d);
connect(d, SIGNAL(fileSelected(const QString &)), this, SLOT(setFilename()));
@@ -98,7 +98,7 @@ void SendFileForm::setFilename()
KFileDialog *d = dynamic_cast<KFileDialog *>(_chooseFileDialog);
filename = d->selectedFile();
#else
- QFileDialog *d = dynamic_cast<QFileDialog *>(_chooseFileDialog);
+ Q3FileDialog *d = dynamic_cast<Q3FileDialog *>(_chooseFileDialog);
filename = d->selectedFile();
#endif
diff --git a/src/gui/srvredirectform.ui.h b/src/gui/srvredirectform.ui.h
index ecbadb7..cf01df2 100644
--- a/src/gui/srvredirectform.ui.h
+++ b/src/gui/srvredirectform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <QPixmap>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -37,10 +39,10 @@ void SrvRedirectForm::init()
getAddressForm = 0;
// Set toolbutton icons for disabled options.
- QIconSet i;
+ QIcon i;
i = addrAlways1ToolButton->iconSet();
i.setPixmap(QPixmap::fromMimeSource("kontact_contacts-disabled.png"),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon::Automatic, QIcon::Disabled);
addrAlways1ToolButton->setIconSet(i);
addrAlways2ToolButton->setIconSet(i);
addrAlways3ToolButton->setIconSet(i);
diff --git a/src/gui/syssettingsform.ui.h b/src/gui/syssettingsform.ui.h
index 1e9afda..1fd8e6f 100644
--- a/src/gui/syssettingsform.ui.h
+++ b/src/gui/syssettingsform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <QPixmap>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -38,14 +40,14 @@
void SysSettingsForm::init()
{
// Set toolbutton icons for disabled options.
- QIconSet i;
+ QIcon i;
i = openRingtoneToolButton->iconSet();
i.setPixmap(QPixmap::fromMimeSource("fileopen-disabled.png"),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon::Automatic, QIcon::Disabled);
openRingtoneToolButton->setIconSet(i);
i = openRingbackToolButton->iconSet();
i.setPixmap(QPixmap::fromMimeSource("fileopen-disabled.png"),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon::Automatic, QIcon::Disabled);
openRingbackToolButton->setIconSet(i);
QRegExp rxNumber("[0-9]+");
@@ -253,8 +255,8 @@ void SysSettingsForm::populate()
// Strip off the .cfg suffix
QString profile = *i;
profile.truncate(profile.length() - 4);
- QCheckListItem *item = new QCheckListItem(profileListView,
- profile, QCheckListItem::CheckBox);
+ Q3CheckListItem *item = new Q3CheckListItem(profileListView,
+ profile, Q3CheckListItem::CheckBox);
item->setPixmap(0, QPixmap::fromMimeSource("penguin-small.png"));
list<string> l = sys_config->get_start_user_profiles();
@@ -354,9 +356,9 @@ void SysSettingsForm::validate()
guiUseSystrayCheckBox->isChecked());
list<string> start_user_profiles;
- QListViewItemIterator i(profileListView, QListViewItemIterator::Checked);
+ Q3ListViewItemIterator i(profileListView, Q3ListViewItemIterator::Checked);
while (i.current()) {
- QCheckListItem *item = (QCheckListItem *)i.current();
+ Q3CheckListItem *item = (Q3CheckListItem *)i.current();
start_user_profiles.push_back(item->text().ascii());
i++;
}
@@ -432,7 +434,7 @@ int SysSettingsForm::exec()
void SysSettingsForm::chooseRingtone()
{
- QString file = QFileDialog::getOpenFileName(
+ QString file = Q3FileDialog::getOpenFileName(
((t_gui *)ui)->get_last_file_browse_path(),
tr("Ring tones", "Description of .wav files in file dialog").append(" (*.wav)"), this, "ring tone file dialog",
tr("Choose ring tone"));
@@ -444,7 +446,7 @@ void SysSettingsForm::chooseRingtone()
void SysSettingsForm::chooseRingback()
{
- QString file = QFileDialog::getOpenFileName(
+ QString file = Q3FileDialog::getOpenFileName(
((t_gui *)ui)->get_last_file_browse_path(),
tr("Ring back tones", "Description of .wav files in file dialog").append(" (*.wav)"), this, "ring back file dialog",
tr("Choose ring back tone"));
diff --git a/src/gui/textbrowsernoautolink.h b/src/gui/textbrowsernoautolink.h
index 8b45c4d..72dbcbb 100644
--- a/src/gui/textbrowsernoautolink.h
+++ b/src/gui/textbrowsernoautolink.h
@@ -31,17 +31,17 @@
#ifndef _TEXTBROWSERNOAUTOLINK_H
#define _TEXTBROWSERNOAUTOLINK_H
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
/**
* A text browser similar to QTextBrowser, but when a user clicks a link
* the browser will not automatically load the linked document.
*/
-class TextBrowserNoAutoLink : public QTextBrowser {
+class TextBrowserNoAutoLink : public Q3TextBrowser {
Q_OBJECT
public:
TextBrowserNoAutoLink ( QWidget * parent = 0, const char * name = 0 ) :
- QTextBrowser(parent, name) {};
+ Q3TextBrowser(parent, name) {};
virtual void setSource ( const QString & name ) {};
};
diff --git a/src/gui/transferform.ui.h b/src/gui/transferform.ui.h
index a5cdb83..51eec25 100644
--- a/src/gui/transferform.ui.h
+++ b/src/gui/transferform.ui.h
@@ -1,3 +1,6 @@
+//Added by qt3to4:
+#include <QPixmap>
+#include <QCloseEvent>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -30,10 +33,10 @@ void TransferForm::init()
getAddressForm = 0;
// Set toolbutton icons for disabled options.
- QIconSet i;
+ QIcon i;
i = addressToolButton->iconSet();
i.setPixmap(QPixmap::fromMimeSource("kontact_contacts-disabled.png"),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon::Automatic, QIcon::Disabled);
addressToolButton->setIconSet(i);
}
diff --git a/src/gui/twinkle.pro b/src/gui/twinkle.pro
index feaf6da..cc175e7 100644
--- a/src/gui/twinkle.pro
+++ b/src/gui/twinkle.pro
@@ -36,7 +36,8 @@ SOURCES += main.cpp \
buddylistview.cpp \
twinkleapplication.cpp
-FORMS = mphoneform.ui \
+#The following line was changed from FORMS to FORMS3 by qt3to4
+FORMS3 = mphoneform.ui \
inviteform.ui \
deregisterform.ui \
redirectform.ui \
@@ -235,3 +236,7 @@ unix {
}
include( ../../qtccxxincl.pro )
+#The following line was inserted by qt3to4
+QT += qt3support
+#The following line was inserted by qt3to4
+CONFIG += uic3
diff --git a/src/gui/twinklesystray.h b/src/gui/twinklesystray.h
index dd03b02..de69c20 100644
--- a/src/gui/twinklesystray.h
+++ b/src/gui/twinklesystray.h
@@ -28,7 +28,7 @@
#include "freedesksystray.h"
#endif
-#include "qpopupmenu.h"
+#include "q3popupmenu.h"
#include "qwidget.h"
#ifdef HAVE_KDE
diff --git a/src/gui/userprofileform.ui.h b/src/gui/userprofileform.ui.h
index ad9b5f5..5fe9966 100644
--- a/src/gui/userprofileform.ui.h
+++ b/src/gui/userprofileform.ui.h
@@ -1,3 +1,6 @@
+//Added by qt3to4:
+#include <QPixmap>
+#include <Q3ValueList>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -144,10 +147,10 @@ void UserProfileForm::init()
#endif
// Set toolbutton icons for disabled options.
- QIconSet i;
+ QIcon i;
i = openRingtoneToolButton->iconSet();
i.setPixmap(QPixmap::fromMimeSource("fileopen-disabled.png"),
- QIconSet::Automatic, QIconSet::Disabled);
+ QIcon::Automatic, QIcon::Disabled);
openRingtoneToolButton->setIconSet(i);
openRingbackToolButton->setIconSet(i);
openIncomingCallScriptToolButton->setIconSet(i);
@@ -543,7 +546,7 @@ void UserProfileForm::populate()
list<t_number_conversion> conversions = current_profile->get_number_conversions();
for (list<t_number_conversion>::reverse_iterator i = conversions.rbegin(); i != conversions.rend(); i++)
{
- new QListViewItem(conversionListView, i->re.str().c_str(), i->fmt.c_str());
+ new Q3ListViewItem(conversionListView, i->re.str().c_str(), i->fmt.c_str());
}
// TIMERS
@@ -623,8 +626,8 @@ int UserProfileForm::exec(list<t_user *> profiles, QString show_profile)
return QDialog::exec();
}
-bool UserProfileForm::check_dynamic_payload(QSpinBox *spb,
- QValueList<int> &checked_list)
+bool UserProfileForm::check_dynamic_payload(QSpinBox *spb,
+ Q3ValueList<int> &checked_list)
{
if (checked_list.contains(spb->value())) {
categoryListBox->setSelected(idxCatRtpAudio, true);
@@ -642,9 +645,9 @@ bool UserProfileForm::check_dynamic_payload(QSpinBox *spb,
list<t_number_conversion> UserProfileForm::get_number_conversions()
{
list<t_number_conversion> conversions;
- QListViewItemIterator it(conversionListView);
+ Q3ListViewItemIterator it(conversionListView);
while (it.current()) {
- QListViewItem *item = it.current();
+ Q3ListViewItem *item = it.current();
t_number_conversion c;
try {
@@ -813,7 +816,7 @@ bool UserProfileForm::validateValues()
}
// Check for double RTP dynamic payload types
- QValueList<int> checked_types;
+ Q3ValueList<int> checked_types;
if (!check_dynamic_payload(spxNbPayloadSpinBox, checked_types) ||
!check_dynamic_payload(spxWbPayloadSpinBox, checked_types) ||
!check_dynamic_payload(spxUwbPayloadSpinBox, checked_types))
@@ -1236,7 +1239,7 @@ void UserProfileForm::changeProfile(const QString &profileName) {
void UserProfileForm::chooseFile(QLineEdit *qle, const QString &filter, const QString &caption)
{
- QString file = QFileDialog::getOpenFileName(
+ QString file = Q3FileDialog::getOpenFileName(
((t_gui *)ui)->get_last_file_browse_path(),
filter, this, "open file dialog",
caption);
@@ -1321,7 +1324,7 @@ void UserProfileForm::removeCodec() {
}
void UserProfileForm::upCodec() {
- QListBoxItem *lbi = activeCodecListBox->selectedItem();
+ Q3ListBoxItem *lbi = activeCodecListBox->selectedItem();
if (!lbi) return;
int idx = activeCodecListBox->index(lbi);
@@ -1334,7 +1337,7 @@ void UserProfileForm::upCodec() {
}
void UserProfileForm::downCodec() {
- QListBoxItem *lbi = activeCodecListBox->selectedItem();
+ Q3ListBoxItem *lbi = activeCodecListBox->selectedItem();
if (!lbi) return;
size_t idx = activeCodecListBox->index(lbi);
@@ -1347,13 +1350,13 @@ void UserProfileForm::downCodec() {
}
void UserProfileForm::upConversion() {
- QListViewItem *lvi = conversionListView->selectedItem();
+ Q3ListViewItem *lvi = conversionListView->selectedItem();
if (!lvi) return;
- QListViewItem *above = lvi->itemAbove();
+ Q3ListViewItem *above = lvi->itemAbove();
if (!above) return;
- QListViewItem *newAbove = above->itemAbove();
+ Q3ListViewItem *newAbove = above->itemAbove();
if (newAbove) {
lvi->moveItem(newAbove);
@@ -1365,10 +1368,10 @@ void UserProfileForm::upConversion() {
}
void UserProfileForm::downConversion() {
- QListViewItem *lvi = conversionListView->selectedItem();
+ Q3ListViewItem *lvi = conversionListView->selectedItem();
if (!lvi) return;
- QListViewItem *below = lvi->itemBelow();
+ Q3ListViewItem *below = lvi->itemBelow();
if (!below) return;
lvi->moveItem(below);
@@ -1381,17 +1384,17 @@ void UserProfileForm::addConversion() {
NumberConversionForm f;
if (f.exec(expr, replace) == QDialog::Accepted) {
- QListViewItem *last = conversionListView->lastItem();
+ Q3ListViewItem *last = conversionListView->lastItem();
if (last) {
- new QListViewItem(conversionListView, last, expr, replace);
+ new Q3ListViewItem(conversionListView, last, expr, replace);
} else {
- new QListViewItem(conversionListView, expr, replace);
+ new Q3ListViewItem(conversionListView, expr, replace);
}
}
}
void UserProfileForm::editConversion() {
- QListViewItem *lvi = conversionListView->selectedItem();
+ Q3ListViewItem *lvi = conversionListView->selectedItem();
if (!lvi) return;
QString expr = lvi->text(colExpr);
@@ -1405,7 +1408,7 @@ void UserProfileForm::editConversion() {
}
void UserProfileForm::removeConversion() {
- QListViewItem *lvi = conversionListView->selectedItem();
+ Q3ListViewItem *lvi = conversionListView->selectedItem();
if (!lvi) return;
delete lvi;
}
diff --git a/src/gui/wizardform.ui.h b/src/gui/wizardform.ui.h
index 2d0f652..e7bf798 100644
--- a/src/gui/wizardform.ui.h
+++ b/src/gui/wizardform.ui.h
@@ -1,3 +1,5 @@
+//Added by qt3to4:
+#include <Q3TextStream>
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
@@ -59,8 +61,8 @@ void WizardForm::initProviders()
QString fname = sys_config->get_dir_share().c_str();
fname.append("/").append(FILE_PROVIDERS);
QFile providersFile(fname);
- if (providersFile.open(IO_ReadOnly)) {
- QTextStream providersStream(&providersFile);
+ if (providersFile.open(QIODevice::ReadOnly)) {
+ Q3TextStream providersStream(&providersFile);
QString entry;
while ((entry = providersStream.readLine()) != QString::null) {
// Skip comment
diff --git a/src/gui/yesnodialog.cpp b/src/gui/yesnodialog.cpp
index 408f93e..cde27ef 100644
--- a/src/gui/yesnodialog.cpp
+++ b/src/gui/yesnodialog.cpp
@@ -20,6 +20,10 @@
#include "qlabel.h"
#include "qlayout.h"
+//Added by qt3to4:
+#include <Q3VBoxLayout>
+#include <Q3BoxLayout>
+#include <Q3HBoxLayout>
#include "userintf.h"
@@ -41,10 +45,10 @@ YesNoDialog::YesNoDialog(QWidget *parent, const QString &caption, const QString
QDialog(parent, NULL, true, Qt::WDestructiveClose)
{
setCaption(caption);
- QBoxLayout *vb = new QVBoxLayout(this, 11, 6);
+ Q3BoxLayout *vb = new Q3VBoxLayout(this, 11, 6);
QLabel *lblQuestion = new QLabel(text, this);
vb->addWidget(lblQuestion);
- QHBoxLayout *hb = new QHBoxLayout(NULL, 0, 6);
+ Q3HBoxLayout *hb = new Q3HBoxLayout(NULL, 0, 6);
QSpacerItem *spacer1 = new QSpacerItem(1, 1, QSizePolicy::Expanding,
QSizePolicy::Minimum );
hb->addItem(spacer1);