diff options
Diffstat (limited to 'src/modules/toolbareditor')
| -rw-r--r-- | src/modules/toolbareditor/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/modules/toolbareditor/CustomizeToolBarsDialog.cpp (renamed from src/modules/toolbareditor/toolbareditor.cpp) | 68 | ||||
| -rw-r--r-- | src/modules/toolbareditor/CustomizeToolBarsDialog.h (renamed from src/modules/toolbareditor/toolbareditor.h) | 24 | ||||
| -rw-r--r-- | src/modules/toolbareditor/libkvitoolbareditor.cpp | 8 |
4 files changed, 52 insertions, 52 deletions
diff --git a/src/modules/toolbareditor/CMakeLists.txt b/src/modules/toolbareditor/CMakeLists.txt index be501833f..b1d126ecf 100644 --- a/src/modules/toolbareditor/CMakeLists.txt +++ b/src/modules/toolbareditor/CMakeLists.txt @@ -1,12 +1,12 @@ # CMakeLists for src/modules/toolbareditor SET(kvitoolbareditor_MOC_HDRS - toolbareditor.h + CustomizeToolBarsDialog.h ) SET(kvitoolbareditor_SRCS libkvitoolbareditor.cpp - toolbareditor.cpp + CustomizeToolBarsDialog.cpp ) # After this call, files will be moc'ed to moc_kvi_*.cpp diff --git a/src/modules/toolbareditor/toolbareditor.cpp b/src/modules/toolbareditor/CustomizeToolBarsDialog.cpp index 4307dbd53..f4cb97608 100644 --- a/src/modules/toolbareditor/toolbareditor.cpp +++ b/src/modules/toolbareditor/CustomizeToolBarsDialog.cpp @@ -1,6 +1,6 @@ //============================================================================= // -// File : toolbareditor.cpp +// File : CustomizeToolBarsDialog.cpp // Creation date : Wed 01 Dec 2004 14:42:20 by Szymon Stefanek // // This file is part of the KVIrc IRC client distribution @@ -22,7 +22,7 @@ // //============================================================================= -#include "toolbareditor.h" +#include "CustomizeToolBarsDialog.h" #include "KviApplication.h" #include "KviActionDrawer.h" @@ -54,12 +54,12 @@ #include <QDropEvent> #include <QDesktopWidget> -KviCustomizeToolBarsDialog * KviCustomizeToolBarsDialog::m_pInstance = 0; +CustomizeToolBarsDialog * CustomizeToolBarsDialog::m_pInstance = 0; extern QRect g_rectToolBarEditorDialogGeometry; -KviTrashcanLabel::KviTrashcanLabel(QWidget * p) +TrashcanLabel::TrashcanLabel(QWidget * p) : QLabel(p) { setPixmap(*(g_pIconManager->getBigIcon("kvi_bigicon_trashcan.png"))); @@ -75,7 +75,7 @@ KviTrashcanLabel::KviTrashcanLabel(QWidget * p) connect(KviActionManager::instance(),SIGNAL(removeActionsHintRequest()),this,SLOT(flash())); } -KviTrashcanLabel::~KviTrashcanLabel() +TrashcanLabel::~TrashcanLabel() { if(m_pFlashTimer) { @@ -84,7 +84,7 @@ KviTrashcanLabel::~KviTrashcanLabel() } } -void KviTrashcanLabel::flash() +void TrashcanLabel::flash() { m_uFlashCount = 0; if(m_pFlashTimer)return; @@ -93,7 +93,7 @@ void KviTrashcanLabel::flash() m_pFlashTimer->start(200); } -void KviTrashcanLabel::heartbeat() +void TrashcanLabel::heartbeat() { m_uFlashCount++; if(m_uFlashCount % 2){ @@ -115,18 +115,18 @@ void KviTrashcanLabel::heartbeat() } } -void KviTrashcanLabel::dropEvent(QDropEvent * e) +void TrashcanLabel::dropEvent(QDropEvent * e) { if(e->mimeData()->hasText()) e->acceptProposedAction(); } -void KviTrashcanLabel::dragEnterEvent(QDragEnterEvent * e) +void TrashcanLabel::dragEnterEvent(QDragEnterEvent * e) { if(e->mimeData()->hasText()) e->acceptProposedAction(); } -KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId,const QString &szLabel,const QString &szIconId) +CustomToolBarPropertiesDialog::CustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId,const QString &szLabel,const QString &szIconId) : QDialog(p) { m_szId = szId; @@ -200,11 +200,11 @@ KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,c g->setColumnStretch(2,1); } -KviCustomToolBarPropertiesDialog::~KviCustomToolBarPropertiesDialog() +CustomToolBarPropertiesDialog::~CustomToolBarPropertiesDialog() { } -void KviCustomToolBarPropertiesDialog::iconSelected(const QString &szIconId) +void CustomToolBarPropertiesDialog::iconSelected(const QString &szIconId) { QPixmap * pix = g_pIconManager->getImage(szIconId); @@ -220,7 +220,7 @@ void KviCustomToolBarPropertiesDialog::iconSelected(const QString &szIconId) } } -void KviCustomToolBarPropertiesDialog::iconButtonClicked() +void CustomToolBarPropertiesDialog::iconButtonClicked() { KviImageDialog * dlg = new KviImageDialog(this,__tr2qs_ctx("Please choose the icon for the ToolBar","editor")); if(dlg->exec() != QDialog::Accepted) @@ -233,7 +233,7 @@ void KviCustomToolBarPropertiesDialog::iconButtonClicked() iconSelected(s); } -void KviCustomToolBarPropertiesDialog::labelTextChanged(const QString &s) +void CustomToolBarPropertiesDialog::labelTextChanged(const QString &s) { if(m_szOriginalId.isEmpty()) { @@ -242,7 +242,7 @@ void KviCustomToolBarPropertiesDialog::labelTextChanged(const QString &s) } } -void KviCustomToolBarPropertiesDialog::okClicked() +void CustomToolBarPropertiesDialog::okClicked() { if(m_szLabel.isEmpty()) { @@ -273,7 +273,7 @@ void KviCustomToolBarPropertiesDialog::okClicked() accept(); } -void KviCustomToolBarPropertiesDialog::advancedClicked() +void CustomToolBarPropertiesDialog::advancedClicked() { if(m_pAdvanced->isVisible()) { @@ -287,7 +287,7 @@ void KviCustomToolBarPropertiesDialog::advancedClicked() } -KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p) +CustomizeToolBarsDialog::CustomizeToolBarsDialog(QWidget * p) : QWidget(p) { setObjectName("Toolbar_editor"); @@ -320,7 +320,7 @@ KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p) connect(m_pExportToolBarButton,SIGNAL(clicked()),this,SLOT(exportToolBar())); g->addWidget(m_pExportToolBarButton,4,1); - KviTrashcanLabel * t = new KviTrashcanLabel(this); + TrashcanLabel * t = new TrashcanLabel(this); g->addWidget(t,6,1); b = new QPushButton(__tr2qs_ctx("Close","editor"),this); @@ -348,7 +348,7 @@ KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p) g_rectToolBarEditorDialogGeometry.y()); } -KviCustomizeToolBarsDialog::~KviCustomizeToolBarsDialog() +CustomizeToolBarsDialog::~CustomizeToolBarsDialog() { g_rectToolBarEditorDialogGeometry = QRect(pos().x(),pos().y(),size().width(),size().height()); @@ -356,13 +356,13 @@ KviCustomizeToolBarsDialog::~KviCustomizeToolBarsDialog() m_pInstance = 0; } -void KviCustomizeToolBarsDialog::currentToolBarChanged() +void CustomizeToolBarsDialog::currentToolBarChanged() { m_pDeleteToolBarButton->setEnabled(KviActionManager::instance()->currentToolBar()); m_pRenameToolBarButton->setEnabled(KviActionManager::instance()->currentToolBar()); } -void KviCustomizeToolBarsDialog::showEvent(QShowEvent * e) +void CustomizeToolBarsDialog::showEvent(QShowEvent * e) { QRect rect = g_pApp->desktop()->screenGeometry(g_pApp->desktop()->primaryScreen()); move((rect.width() - width())/2,(rect.height() - height())/2); @@ -370,7 +370,7 @@ void KviCustomizeToolBarsDialog::showEvent(QShowEvent * e) QWidget::showEvent(e); } -void KviCustomizeToolBarsDialog::deleteToolBar() +void CustomizeToolBarsDialog::deleteToolBar() { KviCustomToolBar * t = KviActionManager::currentToolBar(); if(!t)return; @@ -382,7 +382,7 @@ void KviCustomizeToolBarsDialog::deleteToolBar() KviCustomToolBarManager::instance()->destroyDescriptor(t->descriptor()->id()); } -void KviCustomizeToolBarsDialog::exportToolBar() +void CustomizeToolBarsDialog::exportToolBar() { KviCustomToolBar * t = KviActionManager::currentToolBar(); if(!t)return; @@ -460,12 +460,12 @@ void KviCustomizeToolBarsDialog::exportToolBar() } } -void KviCustomizeToolBarsDialog::renameToolBar() +void CustomizeToolBarsDialog::renameToolBar() { KviCustomToolBar * t = KviActionManager::currentToolBar(); if(!t)return; - KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this, + CustomToolBarPropertiesDialog * dlg = new CustomToolBarPropertiesDialog(this, __tr2qs_ctx("Please specify the properties for the toolbar \"%1\"","editor").arg(t->windowTitle()), t->descriptor()->id(), t->descriptor()->labelCode(), @@ -489,9 +489,9 @@ void KviCustomizeToolBarsDialog::renameToolBar() t->descriptor()->setIconId(icon); } -void KviCustomizeToolBarsDialog::newToolBar() +void CustomizeToolBarsDialog::newToolBar() { - KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this, + CustomToolBarPropertiesDialog * dlg = new CustomToolBarPropertiesDialog(this, __tr2qs_ctx("Please specify the properties for the new toolbar","editor"), KviCustomToolBarManager::instance()->idForNewToolBar(__tr2qs_ctx("My ToolBar","editor")), __tr2qs_ctx("My ToolBar","editor")); @@ -514,19 +514,19 @@ void KviCustomizeToolBarsDialog::newToolBar() KviActionManager::instance()->setCurrentToolBar(t); } -void KviCustomizeToolBarsDialog::closeClicked() +void CustomizeToolBarsDialog::closeClicked() { delete this; } -void KviCustomizeToolBarsDialog::cleanup() +void CustomizeToolBarsDialog::cleanup() { if(!m_pInstance)return; delete m_pInstance; m_pInstance = 0; } -void KviCustomizeToolBarsDialog::display(bool bTopLevel) +void CustomizeToolBarsDialog::display(bool bTopLevel) { if(m_pInstance) { @@ -545,9 +545,9 @@ void KviCustomizeToolBarsDialog::display(bool bTopLevel) } else { if(bTopLevel) { - m_pInstance = new KviCustomizeToolBarsDialog(0); + m_pInstance = new CustomizeToolBarsDialog(0); } else { - m_pInstance = new KviCustomizeToolBarsDialog(g_pFrame->splitter()); + m_pInstance = new CustomizeToolBarsDialog(g_pFrame->splitter()); } } m_pInstance->show(); @@ -555,13 +555,13 @@ void KviCustomizeToolBarsDialog::display(bool bTopLevel) m_pInstance->setFocus(); } -void KviCustomizeToolBarsDialog::closeEvent(QCloseEvent * e) +void CustomizeToolBarsDialog::closeEvent(QCloseEvent * e) { e->ignore(); delete this; } -void KviCustomizeToolBarsDialog::reject() +void CustomizeToolBarsDialog::reject() { cleanup(); } diff --git a/src/modules/toolbareditor/toolbareditor.h b/src/modules/toolbareditor/CustomizeToolBarsDialog.h index 70e5a71b9..71a49f92d 100644 --- a/src/modules/toolbareditor/toolbareditor.h +++ b/src/modules/toolbareditor/CustomizeToolBarsDialog.h @@ -2,7 +2,7 @@ #define _TOOLBAREDITOR_H_ //============================================================================= // -// File : toolbareditor.h +// File : CustomizeToolBarsDialog.h // Creation date : Wed 01 Dec 2004 14:42:20 by Szymon Stefanek // // This file is part of the KVIrc IRC client distribution @@ -39,21 +39,21 @@ class QPushButton; class KviActionDrawer; -class KviCustomizeToolBarsDialog : public QWidget +class CustomizeToolBarsDialog : public QWidget { Q_OBJECT protected: - KviCustomizeToolBarsDialog(QWidget * p); + CustomizeToolBarsDialog(QWidget * p); public: - ~KviCustomizeToolBarsDialog(); + ~CustomizeToolBarsDialog(); protected: KviActionDrawer * m_pDrawer; - static KviCustomizeToolBarsDialog * m_pInstance; + static CustomizeToolBarsDialog * m_pInstance; QPushButton * m_pDeleteToolBarButton; QPushButton * m_pRenameToolBarButton; QPushButton * m_pExportToolBarButton; public: - static KviCustomizeToolBarsDialog * instance(){ return m_pInstance; }; + static CustomizeToolBarsDialog * instance(){ return m_pInstance; }; static void display(bool bTopLevel); static void cleanup(); protected: @@ -70,12 +70,12 @@ protected slots: }; -class KviCustomToolBarPropertiesDialog : public QDialog +class CustomToolBarPropertiesDialog : public QDialog { Q_OBJECT public: - KviCustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId = QString(),const QString &szLabel = QString(),const QString &szIconId = QString()); - ~KviCustomToolBarPropertiesDialog(); + CustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId = QString(),const QString &szLabel = QString(),const QString &szIconId = QString()); + ~CustomToolBarPropertiesDialog(); protected: QString m_szId; QString m_szOriginalId; @@ -101,12 +101,12 @@ protected: }; -class KviTrashcanLabel : public QLabel +class TrashcanLabel : public QLabel { Q_OBJECT public: - KviTrashcanLabel(QWidget * p); - virtual ~KviTrashcanLabel(); + TrashcanLabel(QWidget * p); + virtual ~TrashcanLabel(); protected: unsigned int m_uFlashCount; QTimer * m_pFlashTimer; diff --git a/src/modules/toolbareditor/libkvitoolbareditor.cpp b/src/modules/toolbareditor/libkvitoolbareditor.cpp index 7d49596cb..935467e08 100644 --- a/src/modules/toolbareditor/libkvitoolbareditor.cpp +++ b/src/modules/toolbareditor/libkvitoolbareditor.cpp @@ -22,7 +22,7 @@ // //============================================================================= -#include "toolbareditor.h" +#include "CustomizeToolBarsDialog.h" #include "KviModule.h" #include "KviLocale.h" @@ -52,7 +52,7 @@ QRect g_rectToolBarEditorDialogGeometry(0,0,0,0); static bool toolbareditor_kvs_cmd_open(KviKvsModuleCommandCall *c) { - KviCustomizeToolBarsDialog::display(c->hasSwitch('t',"toplevel")); + CustomizeToolBarsDialog::display(c->hasSwitch('t',"toplevel")); return true; } @@ -69,12 +69,12 @@ static bool toolbareditor_module_init(KviModule * m) static bool toolbareditor_module_can_unload(KviModule *) { - return (!KviCustomizeToolBarsDialog::instance()); + return (!CustomizeToolBarsDialog::instance()); } static bool toolbareditor_module_cleanup(KviModule *m) { - KviCustomizeToolBarsDialog::cleanup(); + CustomizeToolBarsDialog::cleanup(); QString szBuf; m->getDefaultConfigFileName(szBuf); |
