diff options
| author | 2009-12-13 13:30:09 +0000 | |
|---|---|---|
| committer | 2009-12-13 13:30:09 +0000 | |
| commit | 91d242c991462a3c79affe72fac6fab143cbc343 (patch) | |
| tree | 548dcf38102d47e46ff1be89bb58a49a8a4c3496 /src/modules/eventeditor/eventeditor.cpp | |
| parent | added missing shortcut (diff) | |
| download | KVIrc-91d242c991462a3c79affe72fac6fab143cbc343.tar.gz KVIrc-91d242c991462a3c79affe72fac6fab143cbc343.tar.bz2 KVIrc-91d242c991462a3c79affe72fac6fab143cbc343.zip | |
{alias,action,event,raw,popup}editor: don't use a supplementary widget to handle layout and resize events (should fix #642)
input editor: code cleaning
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3694 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/eventeditor/eventeditor.cpp')
| -rw-r--r-- | src/modules/eventeditor/eventeditor.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/modules/eventeditor/eventeditor.cpp b/src/modules/eventeditor/eventeditor.cpp index c99778c30..4e9daba03 100644 --- a/src/modules/eventeditor/eventeditor.cpp +++ b/src/modules/eventeditor/eventeditor.cpp @@ -498,27 +498,28 @@ KviEventEditorWindow::KviEventEditorWindow(KviFrame * lpFrm) { g_pEventEditorWindow = this; + QGridLayout * g = new QGridLayout(); m_pEditor = new KviEventEditor(this); + g->addWidget(m_pEditor,0,0,1,4); - m_pBase = new QWidget(this); - QGridLayout * g = new QGridLayout(m_pBase); - - QPushButton * btn = new QPushButton(__tr2qs_ctx("&OK","editor"),m_pBase); + QPushButton * btn = new QPushButton(__tr2qs_ctx("&OK","editor"),this); connect(btn,SIGNAL(clicked()),this,SLOT(okClicked())); btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); - g->addWidget(btn,0,1); + g->addWidget(btn,1,1); - btn = new QPushButton(__tr2qs_ctx("&Apply","editor"),m_pBase); + btn = new QPushButton(__tr2qs_ctx("&Apply","editor"),this); connect(btn,SIGNAL(clicked()),this,SLOT(applyClicked())); btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); - g->addWidget(btn,0,2); + g->addWidget(btn,1,2); - btn = new QPushButton(__tr2qs_ctx("Cancel","editor"),m_pBase); + btn = new QPushButton(__tr2qs_ctx("Cancel","editor"),this); connect(btn,SIGNAL(clicked()),this,SLOT(cancelClicked())); btn->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); - g->addWidget(btn,0,3); + g->addWidget(btn,1,3); + g->setRowStretch(0,1); g->setColumnStretch(0,1); + setLayout(g); } KviEventEditorWindow::~KviEventEditorWindow() @@ -542,19 +543,11 @@ void KviEventEditorWindow::cancelClicked() close(); } - QPixmap * KviEventEditorWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_EVENT); } -void KviEventEditorWindow::resizeEvent(QResizeEvent *) -{ - int hght = m_pBase->sizeHint().height(); - m_pEditor->setGeometry(0,0,width(),height()- hght); - m_pBase->setGeometry(0,height() - hght,width(),hght); -} - void KviEventEditorWindow::fillCaptionBuffers() { m_szPlainTextCaption = __tr2qs_ctx("Event Editor","editor"); |
