summaryrefslogtreecommitdiffstats
path: root/src/colorpicker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/colorpicker.cpp')
-rw-r--r--src/colorpicker.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/colorpicker.cpp b/src/colorpicker.cpp
index 37049bb..52fe4c5 100644
--- a/src/colorpicker.cpp
+++ b/src/colorpicker.cpp
@@ -19,14 +19,14 @@
***************************************************************************/
#include "colorpicker.h"
-#include "qtimer.h"
+#include "tqtimer.h"
#include <kcolordialog.h>
/// ///
/** DektopColorPicker */
-/* From Qt documentation:
+/* From TQt documentation:
* " Note that only visible widgets can grab mouse input.
* If isVisible() returns FALSE for a widget, that widget cannot call grabMouse(). "
* So, we should use an always visible widget to be able to pick a color from screen,
@@ -35,9 +35,9 @@
*/
DesktopColorPicker::DesktopColorPicker()
- : QDesktopWidget()
+ : TQDesktopWidget()
{
- setName("DesktopColorPicker");
+ TQT_TQWIDGET(this)->setName("DesktopColorPicker");
m_gettingColorFromScreen = false;
}
@@ -49,14 +49,14 @@ void DesktopColorPicker::pickColor()
{
m_gettingColorFromScreen = true;
// Global::mainContainer->setActive(false);
- QTimer::singleShot( 50, this, SLOT(slotDelayedPick()) );
+ TQTimer::singleShot( 50, this, TQT_SLOT(slotDelayedPick()) );
}
/* When firered from basket context menu, and not from menu, grabMouse doesn't work!
* It's perhapse because context menu call slotColorFromScreen() and then
* ungrab the mouse (since menus grab the mouse).
* But why isn't there such bug with normal menus?...
- * By calling this method with a QTimer::singleShot, we are sure context menu code is
+ * By calling this method with a TQTimer::singleShot, we are sure context menu code is
* finished and we can grab the mouse without loosing the grab:
*/
void DesktopColorPicker::slotDelayedPick()
@@ -67,30 +67,30 @@ void DesktopColorPicker::slotDelayedPick()
/* Validate the color
*/
-void DesktopColorPicker::mouseReleaseEvent(QMouseEvent *event)
+void DesktopColorPicker::mouseReleaseEvent(TQMouseEvent *event)
{
if (m_gettingColorFromScreen) {
m_gettingColorFromScreen = false;
releaseMouse();
releaseKeyboard();
- QColor color = KColorDialog::grabColor(event->globalPos());
+ TQColor color = KColorDialog::grabColor(event->globalPos());
emit pickedColor(color);
} else
- QDesktopWidget::mouseReleaseEvent(event);
+ TQDesktopWidget::mouseReleaseEvent(event);
}
/* Cancel the mode
*/
-void DesktopColorPicker::keyPressEvent(QKeyEvent *event)
+void DesktopColorPicker::keyPressEvent(TQKeyEvent *event)
{
if (m_gettingColorFromScreen)
- if (event->key() == Qt::Key_Escape) {
+ if (event->key() == TQt::Key_Escape) {
m_gettingColorFromScreen = false;
releaseMouse();
releaseKeyboard();
emit canceledPick();
}
- QDesktopWidget::keyPressEvent(event);
+ TQDesktopWidget::keyPressEvent(event);
}
#include "colorpicker.moc"