summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmview.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwmview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmview.cpp48
1 files changed, 28 insertions, 20 deletions
diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp
index 2533487..68500d0 100644
--- a/pwmanager/pwmanager/pwmview.cpp
+++ b/pwmanager/pwmanager/pwmview.cpp
@@ -36,5 +36,13 @@
#include <qpoint.h>
#include <qapplication.h>
+#include <QDesktopWidget>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QResizeEvent>
+#include <Q3PopupMenu>
+#include <Q3VBoxLayout>
//US ENH: wouldn't it be a good idea if we could use this consts everywhere else.
@@ -77,5 +85,5 @@ PwMView::~PwMView()
void PwMView::initCtxMenu()
{
- ctxMenu = new QPopupMenu(this);
+ ctxMenu = new Q3PopupMenu(this);
ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot()));
ctxMenu->insertSeparator();
@@ -107,5 +115,5 @@ void PwMView::resizeEvent(QResizeEvent *)
}
-void PwMView::refreshCommentTextEdit(QListViewItem *curItem)
+void PwMView::refreshCommentTextEdit(Q3ListViewItem *curItem)
{
PWM_ASSERT(commentBox);
@@ -137,5 +145,5 @@ void PwMView::keyReleaseEvent(QKeyEvent * /*e*/)
bool PwMView::getCurEntryIndex(unsigned int *index)
{
- QListViewItem *current = lv->currentItem();
+ Q3ListViewItem *current = lv->currentItem();
if (!current)
return false;
@@ -144,5 +152,5 @@ bool PwMView::getCurEntryIndex(unsigned int *index)
bool PwMView::getDocEntryIndex(unsigned int *index,
- const QListViewItem *item)
+ const Q3ListViewItem *item)
{
vector<unsigned int> foundPositions;
@@ -167,10 +175,10 @@ bool PwMView::getDocEntryIndex(unsigned int *index,
}
-void PwMView::handleToggle(QListViewItem *item)
+void PwMView::handleToggle(Q3ListViewItem *item)
{
PWM_ASSERT(doc);
if (!item)
return;
- QCheckListItem *clItem = (QCheckListItem *)item;
+ Q3CheckListItem *clItem = (Q3CheckListItem *)item;
QString curCat(getCurrentCategory());
@@ -196,5 +204,5 @@ void PwMView::handleToggle(QListViewItem *item)
}
-void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int)
+void PwMView::handleRightClick(Q3ListViewItem *item, const QPoint &point, int)
{
if (!item)
@@ -275,5 +283,5 @@ void PwMView::shiftToView()
}
- QCheckListItem *newItem;
+ Q3CheckListItem *newItem;
vector<PwMDataItem>::iterator it = tmpSorted.begin(),
end = tmpSorted.end();
@@ -314,5 +322,5 @@ void PwMView::reorgLp()
PWM_ASSERT(doc);
PWM_ASSERT(!doc->isDocEmpty());
- QListViewItem *currItem;
+ Q3ListViewItem *currItem;
vector<unsigned int> foundPos;
/* This searchIn _should_ be:
@@ -356,5 +364,5 @@ void PwMView::reorgLp()
void PwMView::selAt(int index)
{
- QListViewItem *item = lv->itemAtIndex(index);
+ Q3ListViewItem *item = lv->itemAtIndex(index);
if (!item)
return;
@@ -480,5 +488,5 @@ void PwMView::copyCommentToClip()
PwMDataItemView::PwMDataItemView( QWidget *parent, const char *name )
- : QTextBrowser( parent, name )
+ : Q3TextBrowser( parent, name )
@@ -567,22 +575,22 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t
QWidget* topframe = new QWidget( this );
setMainWidget( topframe );
- QBoxLayout* bl;
+ Q3BoxLayout* bl;
if ( QApplication::desktop()->width() < 640 ) {
- bl = new QVBoxLayout( topframe );
+ bl = new Q3VBoxLayout( topframe );
} else {
- bl = new QHBoxLayout( topframe );
+ bl = new Q3HBoxLayout( topframe );
}
- QVBox* subframe = new QVBox( topframe );
+ Q3VBox* subframe = new Q3VBox( topframe );
bl->addWidget(subframe );
QLabel* lab = new QLabel( i18n("Local Entry"), subframe );
if ( takeloc )
- lab->setBackgroundColor(Qt::green.light() );
+ lab->setBackgroundColor(QColor(Qt::green).light() );
PwMDataItemView * av = new PwMDataItemView( subframe );
av->setPwMDataItem( loc );
- subframe = new QVBox( topframe );
+ subframe = new Q3VBox( topframe );
bl->addWidget(subframe );
lab = new QLabel( i18n("Remote Entry"), subframe );
if ( !takeloc )
- lab->setBackgroundColor(Qt::green.light() );
+ lab->setBackgroundColor(QColor(Qt::green).light() );
av = new PwMDataItemView( subframe );
av->setPwMDataItem( rem );
@@ -619,5 +627,5 @@ void PwMDataItemChooser::slot_local()
-#ifndef PWM_EMBEDDED
-#include "pwmview.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmview.cpp"
#endif