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
@@ -35,7 +35,15 @@
#include <qlineedit.h>
#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.
//US ENH: for examle in listviewpwm.cpp
@@ -76,7 +84,7 @@ PwMView::~PwMView()
void PwMView::initCtxMenu()
{
- ctxMenu = new QPopupMenu(this);
+ ctxMenu = new Q3PopupMenu(this);
ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot()));
ctxMenu->insertSeparator();
ctxMenu->insertItem(i18n("&Edit"), mainClass, SLOT(editPwd_slot()));
@@ -106,7 +114,7 @@ void PwMView::resizeEvent(QResizeEvent *)
resizeView(size());
}
-void PwMView::refreshCommentTextEdit(QListViewItem *curItem)
+void PwMView::refreshCommentTextEdit(Q3ListViewItem *curItem)
{
PWM_ASSERT(commentBox);
if (!curItem)
@@ -136,14 +144,14 @@ void PwMView::keyReleaseEvent(QKeyEvent * /*e*/)
bool PwMView::getCurEntryIndex(unsigned int *index)
{
- QListViewItem *current = lv->currentItem();
+ Q3ListViewItem *current = lv->currentItem();
if (!current)
return false;
return getDocEntryIndex(index, current);
}
bool PwMView::getDocEntryIndex(unsigned int *index,
- const QListViewItem *item)
+ const Q3ListViewItem *item)
{
vector<unsigned int> foundPositions;
PwMDataItem curItem;
@@ -166,12 +174,12 @@ bool PwMView::getDocEntryIndex(unsigned int *index,
return false;
}
-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());
// find document position of this entry.
@@ -195,7 +203,7 @@ void PwMView::handleToggle(QListViewItem *item)
doc->lockAt(curCat, curEntryDocIndex, !clItem->isOn());
}
-void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int)
+void PwMView::handleRightClick(Q3ListViewItem *item, const QPoint &point, int)
{
if (!item)
return;
@@ -274,7 +282,7 @@ void PwMView::shiftToView()
lv->setColumnText(COLUMN_PW, catItem->pw_text.c_str());
}
- QCheckListItem *newItem;
+ Q3CheckListItem *newItem;
vector<PwMDataItem>::iterator it = tmpSorted.begin(),
end = tmpSorted.end();
while (it != end) {
@@ -313,7 +321,7 @@ void PwMView::reorgLp()
return;
PWM_ASSERT(doc);
PWM_ASSERT(!doc->isDocEmpty());
- QListViewItem *currItem;
+ Q3ListViewItem *currItem;
vector<unsigned int> foundPos;
/* This searchIn _should_ be:
* const unsigned int searchIn = SEARCH_IN_DESC;
@@ -355,7 +363,7 @@ void PwMView::reorgLp()
void PwMView::selAt(int index)
{
- QListViewItem *item = lv->itemAtIndex(index);
+ Q3ListViewItem *item = lv->itemAtIndex(index);
if (!item)
return;
lv->setCurrentItem(item);
@@ -479,7 +487,7 @@ void PwMView::copyCommentToClip()
PwMDataItemView::PwMDataItemView( QWidget *parent, const char *name )
- : QTextBrowser( parent, name )
+ : Q3TextBrowser( parent, name )
{
@@ -566,24 +574,24 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t
findButton( User1 )->setText( i18n("Local"));
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 );
QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote()));
@@ -618,6 +626,6 @@ void PwMDataItemChooser::slot_local()
-#ifndef PWM_EMBEDDED
-#include "pwmview.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_pwmview.cpp"
#endif