diff options
Diffstat (limited to 'kmag')
-rw-r--r-- | kmag/CMakeL10n.txt | 6 | ||||
-rw-r--r-- | kmag/CMakeLists.txt | 52 | ||||
-rw-r--r-- | kmag/Makefile.am | 4 | ||||
-rw-r--r-- | kmag/images/CMakeLists.txt | 3 | ||||
-rw-r--r-- | kmag/images/Makefile.am | 3 | ||||
-rw-r--r-- | kmag/images/hi16-action-followmouse.png (renamed from kmag/hi16-action-followmouse.png) | bin | 575 -> 575 bytes | |||
-rw-r--r-- | kmag/images/hi16-action-hidemouse.png (renamed from kmag/hi16-action-hidemouse.png) | bin | 275 -> 275 bytes | |||
-rw-r--r-- | kmag/images/hi16-action-window.png (renamed from kmag/hi16-action-window.png) | bin | 314 -> 314 bytes | |||
-rw-r--r-- | kmag/kmag.cpp | 105 | ||||
-rw-r--r-- | kmag/kmag.desktop | 76 | ||||
-rw-r--r-- | kmag/kmag.h | 5 | ||||
-rw-r--r-- | kmag/kmag.kdevprj | 230 | ||||
-rw-r--r-- | kmag/kmag.mdk.spec | 108 | ||||
-rw-r--r-- | kmag/kmagselrect.cpp | 22 | ||||
-rw-r--r-- | kmag/kmagselrect.h | 6 | ||||
-rw-r--r-- | kmag/kmagzoomview.cpp | 44 | ||||
-rw-r--r-- | kmag/kmagzoomview.h | 4 |
17 files changed, 162 insertions, 506 deletions
diff --git a/kmag/CMakeL10n.txt b/kmag/CMakeL10n.txt index d95b69c..d0d3f9d 100644 --- a/kmag/CMakeL10n.txt +++ b/kmag/CMakeL10n.txt @@ -1,3 +1,9 @@ ##### create translation templates ############## tde_l10n_create_template( "kmag" ) + +tde_l10n_create_template( + CATALOG "desktop_files/kmag-desktops/" + SOURCES *.desktop + DESTINATION "${CMAKE_SOURCE_DIR}/translations" +) diff --git a/kmag/CMakeLists.txt b/kmag/CMakeLists.txt new file mode 100644 index 0000000..4203949 --- /dev/null +++ b/kmag/CMakeLists.txt @@ -0,0 +1,52 @@ +add_subdirectory( images ) + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${X11_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### kmag (executable) + +tde_add_executable( kmag AUTOMOC + + SOURCES + kmagzoomview.cpp + kmagselrect.cpp + kmag.cpp + main.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + tdeprint-shared + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### icons + +tde_install_icons( kmag ) + + +##### other data + +install( + FILES kmagui.rc + DESTINATION ${DATA_INSTALL_DIR}/kmag +) + +tde_create_translated_desktop( + SOURCE kmag.desktop + PO_DIR kmag-desktops +) diff --git a/kmag/Makefile.am b/kmag/Makefile.am index 1ecf6db..678b69e 100644 --- a/kmag/Makefile.am +++ b/kmag/Makefile.am @@ -15,9 +15,6 @@ KDE_ICON = kmag xdg_apps_DATA = kmag.desktop -kmagiconsdir = $(kde_datadir)/kmag/icons -kmagicons_ICON = followmouse hidemouse window - # set the include path for X, qt and KDE INCLUDES= $(all_includes) @@ -37,3 +34,4 @@ messages: rc.cpp $(XGETTEXT) $$LIST -o $(podir)/kmag.pot; \ fi +SUBDIRS = images diff --git a/kmag/images/CMakeLists.txt b/kmag/images/CMakeLists.txt new file mode 100644 index 0000000..b2c3d3f --- /dev/null +++ b/kmag/images/CMakeLists.txt @@ -0,0 +1,3 @@ +##### icons + +tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/kmag/icons ) diff --git a/kmag/images/Makefile.am b/kmag/images/Makefile.am new file mode 100644 index 0000000..336246b --- /dev/null +++ b/kmag/images/Makefile.am @@ -0,0 +1,3 @@ + +kmagiconsdir = $(kde_datadir)/kmag/icons +kmagicons_ICON = followmouse hidemouse window diff --git a/kmag/hi16-action-followmouse.png b/kmag/images/hi16-action-followmouse.png Binary files differindex 1b690e8..1b690e8 100644 --- a/kmag/hi16-action-followmouse.png +++ b/kmag/images/hi16-action-followmouse.png diff --git a/kmag/hi16-action-hidemouse.png b/kmag/images/hi16-action-hidemouse.png Binary files differindex b792f7d..b792f7d 100644 --- a/kmag/hi16-action-hidemouse.png +++ b/kmag/images/hi16-action-hidemouse.png diff --git a/kmag/hi16-action-window.png b/kmag/images/hi16-action-window.png Binary files differindex 1563cca..1563cca 100644 --- a/kmag/hi16-action-window.png +++ b/kmag/images/hi16-action-window.png diff --git a/kmag/kmag.cpp b/kmag/kmag.cpp index 5195678..1abc1c1 100644 --- a/kmag/kmag.cpp +++ b/kmag/kmag.cpp @@ -31,12 +31,7 @@ #include <tdeversion.h> // include files for KDE -#if TDE_VERSION > 300 #include <tdeapplication.h> -#else -#include <kapp.h> -#endif // KDE 3.x - #include <kkeydialog.h> #include <kinputdialog.h> #include <kiconloader.h> @@ -78,7 +73,7 @@ KmagApp::KmagApp(TQWidget* , const char* name) : TDEMainWindow(0, name, WStyle_MinMax | WType_TopLevel | WStyle_StaysOnTop | WDestructiveClose | WStyle_ContextHelp), m_defaultMouseCursorType(2) { - config=kapp->config(); + config=tdeApp->config(); zoomArrayString << "5:1" << "2:1" << "1:1" << "1:1.5" << "1:2" << "1:3" << "1:4" << "1:5" << "1:6" << "1:7" << "1:8" << "1:12" << "1:16" << "1:20"; @@ -126,92 +121,92 @@ KmagApp::~KmagApp() void KmagApp::initActions() { - fileNewWindow = new TDEAction(i18n("New &Window"), "window-new", TDEStdAccel::openNew(), TQT_TQOBJECT(this), - TQT_SLOT(slotFileNewWindow()), actionCollection(),"new_window"); + fileNewWindow = new TDEAction(i18n("New &Window"), "window-new", TDEStdAccel::openNew(), this, + TQ_SLOT(slotFileNewWindow()), actionCollection(),"new_window"); fileNewWindow->setToolTip(i18n("Open a new KMagnifier window")); - refreshSwitch = new TDEAction(i18n("&Stop"), "process-stop", TDEStdAccel::reload(), TQT_TQOBJECT(this), - TQT_SLOT(slotToggleRefresh()), actionCollection(), "start_stop_refresh"); + refreshSwitch = new TDEAction(i18n("&Stop"), "process-stop", TDEStdAccel::reload(), this, + TQ_SLOT(slotToggleRefresh()), actionCollection(), "start_stop_refresh"); refreshSwitch->setToolTip(i18n("Click to stop window refresh")); refreshSwitch->setWhatsThis(i18n("Clicking on this icon will <b>start</b> / <b>stop</b>\ updating of the display. Stopping the update will zero the processing power\ required (CPU usage)")); - m_pSnapshot = new TDEAction(i18n("&Save Snapshot As..."), "ksnapshot", TDEStdAccel::save(), TQT_TQOBJECT(this), - TQT_SLOT(saveZoomPixmap()), actionCollection(),"snapshot"); + m_pSnapshot = new TDEAction(i18n("&Save Snapshot As..."), "ksnapshot", TDEStdAccel::save(), this, + TQ_SLOT(saveZoomPixmap()), actionCollection(),"snapshot"); m_pSnapshot->setWhatsThis(i18n("Saves the zoomed view to an image file.")); m_pSnapshot->setToolTip(i18n("Save image to a file")); - m_pPrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(), "print"); + m_pPrint = KStdAction::print(this, TQ_SLOT(slotFilePrint()), actionCollection(), "print"); m_pPrint->setWhatsThis(i18n("Click on this button to print the current zoomed view.")); - m_pQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection(), "quit"); + m_pQuit = KStdAction::quit(this, TQ_SLOT(slotFileQuit()), actionCollection(), "quit"); m_pQuit->setStatusText(i18n("Quits the application")); m_pQuit->setWhatsThis (i18n("Quits the application")); - m_pCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copyToClipBoard()), actionCollection(), "copy"); + m_pCopy = KStdAction::copy(this, TQ_SLOT(copyToClipBoard()), actionCollection(), "copy"); m_pCopy->setWhatsThis(i18n("Click on this button to copy the current zoomed view to the clipboard which you can paste in other applications.")); m_pCopy->setToolTip(i18n("Copy zoomed image to clipboard")); - m_pShowMenu = new TDEToggleAction(i18n("Show &Menu"), "showmenu", CTRL+Key_M, TQT_TQOBJECT(this), - TQT_SLOT(slotShowMenu()), actionCollection(),"show_menu"); + m_pShowMenu = new TDEToggleAction(i18n("Show &Menu"), "showmenu", CTRL+Key_M, this, + TQ_SLOT(slotShowMenu()), actionCollection(),"show_menu"); #ifdef havesetCheckedState m_pShowMenu->setCheckedState(i18n("Hide &Menu")); #endif - m_pShowMainToolBar = new TDEToggleAction(i18n("Show Main &Toolbar"), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(slotShowMainToolBar()), actionCollection(),"show_mainToolBar"); + m_pShowMainToolBar = new TDEToggleAction(i18n("Show Main &Toolbar"), 0, 0, this, + TQ_SLOT(slotShowMainToolBar()), actionCollection(),"show_mainToolBar"); #ifdef havesetCheckedState m_pShowMainToolBar->setCheckedState(i18n("Hide Main &Toolbar")); #endif - m_pShowViewToolBar = new TDEToggleAction(i18n("Show &View Toolbar"), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(slotShowViewToolBar()), actionCollection(),"show_viewToolBar"); + m_pShowViewToolBar = new TDEToggleAction(i18n("Show &View Toolbar"), 0, 0, this, + TQ_SLOT(slotShowViewToolBar()), actionCollection(),"show_viewToolBar"); #ifdef havesetCheckedState m_pShowViewToolBar->setCheckedState(i18n("Hide &View Toolbar")); #endif - m_pShowSettingsToolBar = new TDEToggleAction(i18n("Show &Settings Toolbar"), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(slotShowSettingsToolBar()), actionCollection(),"show_settingsToolBar"); + m_pShowSettingsToolBar = new TDEToggleAction(i18n("Show &Settings Toolbar"), 0, 0, this, + TQ_SLOT(slotShowSettingsToolBar()), actionCollection(),"show_settingsToolBar"); #ifdef havesetCheckedState m_pShowSettingsToolBar->setCheckedState(i18n("Hide &Settings Toolbar")); #endif - m_modeFollowMouse = new TDERadioAction(i18n("&Follow Mouse Mode"), "followmouse", Key_F1, TQT_TQOBJECT(this), - TQT_SLOT(slotModeFollowMouse()), actionCollection(), "mode_followmouse"); + m_modeFollowMouse = new TDERadioAction(i18n("&Follow Mouse Mode"), "followmouse", Key_F1, this, + TQ_SLOT(slotModeFollowMouse()), actionCollection(), "mode_followmouse"); m_modeFollowMouse->setToolTip(i18n("Magnify mouse area into window")); m_modeFollowMouse->setWhatsThis(i18n("In this mode the area around the mouse cursor is shown in a normal window.")); - m_modeSelWin = new TDERadioAction(i18n("S&election Window Mode"), "window", Key_F2, TQT_TQOBJECT(this), - TQT_SLOT(slotModeSelWin()), actionCollection(), "mode_selectionwindow"); + m_modeSelWin = new TDERadioAction(i18n("S&election Window Mode"), "window", Key_F2, this, + TQ_SLOT(slotModeSelWin()), actionCollection(), "mode_selectionwindow"); m_modeSelWin->setToolTip(i18n("Magnify selected area into window")); m_modeSelWin->setWhatsThis(i18n("In this mode a selection window is opened. The selected area is shown in a normal window.")); - m_modeEdgeTop = new TDERadioAction(i18n("&Top Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(slotModeEdgeTop()), actionCollection(),"mode_edgetop"); + m_modeEdgeTop = new TDERadioAction(i18n("&Top Screen Edge Mode"), 0, 0, this, + TQ_SLOT(slotModeEdgeTop()), actionCollection(),"mode_edgetop"); m_modeEdgeTop->setToolTip(i18n("Magnify mouse area to top screen edge")); m_modeEdgeTop->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the top screen edge.")); - m_modeEdgeLeft = new TDERadioAction(i18n("&Left Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(slotModeEdgeLeft()), actionCollection(),"mode_edgeleft"); + m_modeEdgeLeft = new TDERadioAction(i18n("&Left Screen Edge Mode"), 0, 0, this, + TQ_SLOT(slotModeEdgeLeft()), actionCollection(),"mode_edgeleft"); m_modeEdgeLeft->setToolTip(i18n("Magnify mouse area to left screen edge")); m_modeEdgeLeft->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the left screen edge.")); - m_modeEdgeRight = new TDERadioAction(i18n("&Right Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(slotModeEdgeRight()), actionCollection(),"mode_edgeright"); + m_modeEdgeRight = new TDERadioAction(i18n("&Right Screen Edge Mode"), 0, 0, this, + TQ_SLOT(slotModeEdgeRight()), actionCollection(),"mode_edgeright"); m_modeEdgeRight->setToolTip(i18n("Magnify mouse area to right screen edge")); m_modeEdgeRight->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the right screen edge.")); - m_modeEdgeBottom = new TDERadioAction(i18n("&Bottom Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), - TQT_SLOT(slotModeEdgeBottom()), actionCollection(),"mode_edgebottom"); + m_modeEdgeBottom = new TDERadioAction(i18n("&Bottom Screen Edge Mode"), 0, 0, this, + TQ_SLOT(slotModeEdgeBottom()), actionCollection(),"mode_edgebottom"); m_modeEdgeBottom->setToolTip(i18n("Magnify mouse area to bottom screen edge")); m_modeEdgeBottom->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the bottom screen edge.")); - m_hideCursor = new TDEToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Key_F4, TQT_TQOBJECT(this), - TQT_SLOT(slotToggleHideCursor()), actionCollection(), "hidecursor"); + m_hideCursor = new TDEToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Key_F4, this, + TQ_SLOT(slotToggleHideCursor()), actionCollection(), "hidecursor"); #ifdef havesetCheckedState m_hideCursor->setCheckedState(i18n("Show Mouse &Cursor")); #endif m_hideCursor->setToolTip(i18n("Hide the mouse cursor")); - m_pZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), actionCollection(), "zoom_in"); + m_pZoomIn = KStdAction::zoomIn(this, TQ_SLOT(zoomIn()), actionCollection(), "zoom_in"); m_pZoomIn->setWhatsThis(i18n("Click on this button to <b>zoom-in</b> on the selected region.")); m_pZoomBox = new TDESelectAction(i18n("&Zoom"),0,actionCollection(),"zoom"); @@ -219,11 +214,11 @@ void KmagApp::initActions() m_pZoomBox->setWhatsThis(i18n("Select the zoom factor.")); m_pZoomBox->setToolTip(i18n("Zoom factor")); - m_pZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), actionCollection(), "zoom_out"); + m_pZoomOut = KStdAction::zoomOut(this, TQ_SLOT(zoomOut()), actionCollection(), "zoom_out"); m_pZoomOut->setWhatsThis(i18n("Click on this button to <b>zoom-out</b> on the selected region.")); - m_pInvert = new TDEToggleAction(i18n("&Invert Colors"), 0, Key_F6, TQT_TQOBJECT(this), - TQT_SLOT(slotToggleInvert()), actionCollection(), "invert"); + m_pInvert = new TDEToggleAction(i18n("&Invert Colors"), 0, Key_F6, this, + TQ_SLOT(slotToggleInvert()), actionCollection(), "invert"); m_pRotationBox = new TDESelectAction(i18n("&Rotation"),0,actionCollection(),"rotation"); m_pRotationBox->setItems(rotationArrayString); @@ -232,8 +227,8 @@ void KmagApp::initActions() // KHelpMenu *newHelpMenu = new KHelpMenu(this, TDEGlobal::instance()->aboutData()); - m_keyConf = KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( slotConfKeys() ), actionCollection(), "key_conf"); - m_toolConf = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotEditToolbars() ), + m_keyConf = KStdAction::keyBindings( this, TQ_SLOT( slotConfKeys() ), actionCollection(), "key_conf"); + m_toolConf = KStdAction::configureToolbars( this, TQ_SLOT( slotEditToolbars() ), actionCollection(), "toolbar_conf"); m_pFPSBox = new TDESelectAction(i18n("Re&fresh"),0,actionCollection(),"fps_selector"); @@ -260,21 +255,21 @@ void KmagApp::initView() void KmagApp::initConnections() { // change in zoom value -> update the view - connect(this, TQT_SIGNAL(updateZoomValue(float)), m_zoomView, TQT_SLOT(setZoom(float))); - connect(this, TQT_SIGNAL(updateRotationValue(int)), m_zoomView, TQT_SLOT(setRotation(int))); - connect(this, TQT_SIGNAL(updateFPSValue(float)), m_zoomView, TQT_SLOT(setRefreshRate(float))); + connect(this, TQ_SIGNAL(updateZoomValue(float)), m_zoomView, TQ_SLOT(setZoom(float))); + connect(this, TQ_SIGNAL(updateRotationValue(int)), m_zoomView, TQ_SLOT(setRotation(int))); + connect(this, TQ_SIGNAL(updateFPSValue(float)), m_zoomView, TQ_SLOT(setRefreshRate(float))); // change in zoom index -> update the selector - connect(this, TQT_SIGNAL(updateZoomIndex(int)), m_pZoomBox, TQT_SLOT(setCurrentItem(int))); - connect(this, TQT_SIGNAL(updateRotationIndex(int)), m_pRotationBox, TQT_SLOT(setCurrentItem(int))); - connect(this, TQT_SIGNAL(updateFPSIndex(int)), m_pFPSBox, TQT_SLOT(setCurrentItem(int))); + connect(this, TQ_SIGNAL(updateZoomIndex(int)), m_pZoomBox, TQ_SLOT(setCurrentItem(int))); + connect(this, TQ_SIGNAL(updateRotationIndex(int)), m_pRotationBox, TQ_SLOT(setCurrentItem(int))); + connect(this, TQ_SIGNAL(updateFPSIndex(int)), m_pFPSBox, TQ_SLOT(setCurrentItem(int))); // selector selects a zoom index -> set the zoom index - connect(m_pZoomBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setZoomIndex(int))); - connect(m_pRotationBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setRotationIndex(int))); - connect(m_pFPSBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setFPSIndex(int))); + connect(m_pZoomBox, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setZoomIndex(int))); + connect(m_pRotationBox, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setRotationIndex(int))); + connect(m_pFPSBox, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setFPSIndex(int))); - connect(m_zoomView, TQT_SIGNAL(contextMenu(TQPoint)), TQT_TQOBJECT(this), TQT_SLOT(contextMenu(TQPoint))); + connect(m_zoomView, TQ_SIGNAL(contextMenu(TQPoint)), this, TQ_SLOT(contextMenu(TQPoint))); } /** @@ -419,7 +414,7 @@ bool KmagApp::queryExit() ///////////////////////////////////////////////////////////////////// -// TQT_SLOT IMPLEMENTATION +// SLOT IMPLEMENTATION ///////////////////////////////////////////////////////////////////// /** @@ -935,7 +930,7 @@ void KmagApp::slotEditToolbars() { saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); KEditToolbar dlg( actionCollection() ); - connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_TQOBJECT(this), TQT_SLOT( slotNewToolbarConfig() ) ); + connect( &dlg, TQ_SIGNAL( newToolbarConfig() ), this, TQ_SLOT( slotNewToolbarConfig() ) ); if ( dlg.exec() ) createGUI(); } diff --git a/kmag/kmag.desktop b/kmag/kmag.desktop index 16621a6..a65ceac 100644 --- a/kmag/kmag.desktop +++ b/kmag/kmag.desktop @@ -1,75 +1,13 @@ [Desktop Entry] +Name=KMag + +GenericName=Screen Magnifier + +Comment=Tool to zoom screen areas + Type=Application Exec=kmag -caption "%c" %i %m Icon=kmag -X-DocPath=kmag/index.html -Comment= -Comment[ro]=Un utilitar de mărit zone ale ecranului Terminal=false -Name=KMag -Name[el]=K μεγεθυντικός φακός -Name[ne]=केडीई म्याग -Name[sk]=KLupa -Name[sv]=Kmag -Name[tg]=KMag -Name[th]=แว่นขยาย - K -Name[tr]=Kmag -Name[vi]=Kính lúp K -Name[zh_TW]=K-放大鏡 -GenericName=Screen Magnifier -GenericName[ar]=مكبَر الشاشة -GenericName[bg]=Лупа за екрана -GenericName[bs]=Povećalo za ekran -GenericName[ca]=Lupa de la pantalla -GenericName[cs]=Lupa obrazovky -GenericName[cy]=KChwyddwr -GenericName[da]=Skærmforstørrer -GenericName[de]=Bildschirmlupe -GenericName[el]=Μεγεθυντικός φακός οθόνης -GenericName[eo]=Ekrano-pligrandigilo -GenericName[es]=Aumenta la pantalla -GenericName[et]=Ekraani suurendaja -GenericName[eu]=Pantailaren lupa -GenericName[fa]=درشتنمای پرده -GenericName[fi]=Suurennuslasi -GenericName[fr]=Loupe d'écran -GenericName[ga]=Formhéadaitheoir Scáileáin -GenericName[gl]=Ampliación da pantalla -GenericName[he]=זכוכית מגדלת -GenericName[hi]=स्क्रीन का आकार बढ़ाने वाला -GenericName[hu]=Nagyító -GenericName[is]=Skjástækkunargler -GenericName[it]=Lente di ingrandimento per lo schermo -GenericName[ja]=画面拡大鏡 -GenericName[ka]=ეკრანის გამდიდებელი -GenericName[km]= កម្មវិធីពង្រីកអេក្រង់ -GenericName[lt]=Ekrano didintojas -GenericName[mk]=Зголемувач за екранот -GenericName[ms]=Pembesar Skrin -GenericName[nb]=Skjermforstørrer -GenericName[nds]=Schirmluup -GenericName[ne]=पर्दा अभिवर्धक -GenericName[nl]=Schermvergroter -GenericName[nn]=Skjermforstørrar -GenericName[pa]=ਪਰਦਾ ਵੱਡਦਰਸ਼ੀ -GenericName[pl]=Powiększanie fragmentów ekranu -GenericName[pt]=Lupa -GenericName[pt_BR]=Amplificador de Tela -GenericName[ro]=Lupă de ecran -GenericName[ru]=Экранная лупа -GenericName[sk]=Lupa obrazovky -GenericName[sl]=Povečevalnik zaslona -GenericName[sr]=Екрански увеличавач -GenericName[sr@Latn]=Ekranski uveličavač -GenericName[sv]=Förstoringsglas -GenericName[ta]=திரை பெரிதாக்கி -GenericName[tg]=Калон кардани экран -GenericName[th]=แว่นขยายหน้าจอ -GenericName[tr]=Ekran Büyüteci -GenericName[uk]=Збільшувач екрана -GenericName[uz]=Ekranni kattalashtiruvchi -GenericName[uz@cyrillic]=Экранни катталаштирувчи -GenericName[vi]=Kính lúp Màn hình -GenericName[zh_CN]=屏幕放大镜 -GenericName[zh_TW]=螢幕放大鏡 +X-DocPath=kmag/index.html Categories=Qt;TDE;Utility;Accessibility; diff --git a/kmag/kmag.h b/kmag/kmag.h index 10a85a1..e3288aa 100644 --- a/kmag/kmag.h +++ b/kmag/kmag.h @@ -21,9 +21,8 @@ #ifndef KMAG_H #define KMAG_H - #ifdef HAVE_CONFIG_H -#include <config.h> +#include "config.h" #endif #include "kmagzoomview.h" @@ -56,7 +55,7 @@ */ class KmagApp : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: diff --git a/kmag/kmag.kdevprj b/kmag/kmag.kdevprj deleted file mode 100644 index a02efd9..0000000 --- a/kmag/kmag.kdevprj +++ /dev/null @@ -1,230 +0,0 @@ -[AUTHORS] -dist=true -install=true -install_location=/usr/share/doc/kmag -type=DATA - -[COPYING] -dist=true -install=true -install_location=/usr/share/doc/kmag -type=DATA - -[ChangeLog] -dist=true -install=true -install_location=/usr/share/doc/kmag -type=DATA - -[Config for BinMakefileAm] -addcxxflags= -bin_program=kmag -cflags= -cppflags= -cxxflags=\s-O3 -ldadd=-ltdeprint $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_TQT) -ldflags=\s \s - -[General] -AMChanged=false -author=Sarang Lakare -configure_args=--prefix=/usr\s -email=sarang@users.sourceforge.net -kdevprj_version=1.3 -lfv_open_groups=GNU,Headers,Others,Sources,User Interface -make_options=\s-j1 -makefiles=Makefile.am,kmag/Makefile.am,doc/Makefile.am,doc/en/Makefile.am,po/Makefile.am,doc/en/images/Makefile.am -modifyMakefiles=true -project_name=Kmag -project_type=normal_kde2 -sgml_file= -short_info= -sub_dir=kmag/ -version=0.8 -version_control=CVS -workspace=1 - -[INSTALL] -dist=true -install=false -install_location=/usr/share/doc/kmag -type=DATA - -[KPP] -kpp_appgrp=Multimedia -kpp_bldroot=/usr/ -kpp_icon=0 -kpp_license=5 -kpp_summary=Magnifies a part of the screen! -kpp_url=http://kmag.sourceforge.net -kpp_version=0.6 - -[LFV Groups] -GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS -Headers=*.h,*.hh,*.hxx,*.hpp,*.H -Others=* -Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l -Translations=*.po -User Interface=*.kdevdlg,*.ui,*.rc -groups=Headers,Sources,User Interface,Translations,GNU,Others - -[Makefile.am] -files=kmag.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,kmag.lsm,kmag.spec,install-user,install-root -sub_dirs=kmag,po,doc -type=normal - -[README] -dist=true -install=false -install_location=/usr/share/doc/kmag -type=DATA - -[TODO] -dist=true -install=false -install_location= -type=DATA - -[Workspace_1] -browser_file= -cpp_file= -header_file= -openfiles= -show_outputview=true -show_treeview=true - -[doc/Makefile.am] -sub_dirs=en -type=normal - -[doc/en/Makefile.am] -files=doc/en/index.docbook -sub_dirs=images -type=normal - -[doc/en/images/Makefile.am] -files=doc/en/images/screenshot.png -sub_dirs= -type=normal - -[doc/en/images/screenshot.png] -dist=true -install=true -install_location=$$(kde_htmldir)/en/kmag/images/screenshot.png -type=DATA - -[doc/en/index.docbook] -dist=true -install=true -install_location=$$(kde_htmldir)/en/kmag/index.docbook -type=DATA - -[install-root] -dist=true -install=false -install_location= -type=DATA - -[install-user] -dist=true -install=false -install_location= -type=DATA - -[kmag.kdevprj] -dist=true -install=false -install_location= -type=DATA - -[kmag.lsm] -dist=true -install=false -install_location= -type=DATA - -[kmag.spec] -dist=true -install=false -install_location= -type=DATA - -[kmag/Makefile.am] -files=kmag/main.cpp,kmag/kmag.cpp,kmag/kmag.h,kmag/kmagui.rc,kmag/kmag.desktop,kmag/lo32-app-kmag.png,kmag/lo16-app-kmag.png,kmag/kmagselrect.cpp,kmag/kmagselrect.h,kmag/hi16-app-kmag.png,kmag/kmagzoomview.cpp,kmag/kmagzoomview.h -type=prog_main - -[kmag/hi16-app-kmag.png] -dist=true -install=true -install_location=$$(kde_icondir)/hicolor/16x16/apps/kmag.png -type=DATA - -[kmag/kmag.cpp] -dist=true -install=false -install_location= -type=SOURCE - -[kmag/kmag.desktop] -dist=true -install=true -install_location=$$(kde_appsdir)/Applications/Accessibility/kmag.desktop -type=DATA - -[kmag/kmag.h] -dist=true -install=false -install_location= -type=HEADER - -[kmag/kmagselrect.cpp] -dist=true -install=false -install_location= -type=SOURCE - -[kmag/kmagselrect.h] -dist=true -install=false -install_location= -type=HEADER - -[kmag/kmagui.rc] -dist=true -install=false -install_location= -type=DATA - -[kmag/kmagzoomview.cpp] -dist=true -install=false -install_location= -type=SOURCE - -[kmag/kmagzoomview.h] -dist=true -install=false -install_location= -type=HEADER - -[kmag/lo16-app-kmag.png] -dist=true -install=true -install_location=$$(kde_icondir)/locolor/16x16/apps/kmag.png -type=DATA - -[kmag/lo32-app-kmag.png] -dist=true -install=true -install_location=$$(kde_icondir)/locolor/32x32/apps/kmag.png -type=DATA - -[kmag/main.cpp] -dist=true -install=false -install_location= -type=SOURCE - -[po/Makefile.am] -sub_dirs= -type=po diff --git a/kmag/kmag.mdk.spec b/kmag/kmag.mdk.spec deleted file mode 100644 index 1ce7761..0000000 --- a/kmag/kmag.mdk.spec +++ /dev/null @@ -1,108 +0,0 @@ -%define name kmag -%define version 0.8 -%define release 1 - -Name: %{name} -Version: %{version} -Release: %{release} -Summary: KDE Screen Magnifier -Group: Graphical desktop/KDE -License: GPL -Source: %{name}-%{version}.tar.gz -URL: http://kmag.sourceforge.net -Packager: Sarang Lakare <sarang@users.sf.net> -Buildroot: %_tmppath/%{name}-%{version}-buildroot -BuildRequires: gcc-cpp db3 readline pam popt libtermcap2 zlib1 XFree86-devel XFree86-libs Mesa-common -BuildRequires: automake arts autoconf diffutils tdelibs file -BuildRequires: m4 texinfo gettext libjpeg62-devel tdelibs-devel gcc-c++ libbinutils2 libbzip2_1 -BuildRequires: db1 freetype2 libjpeg62 libmng1 libpng libtqt2 libtqt2-devel rpm-build - - -%description -KMagnifier is a screen magnifier for KDE. It is useful for -people with bad sight or others needing to magnify a part of the screen. - -%prep -rm -rf $RPM_BUILD_ROOT - -%setup -n %{name}-%{version} - -%build -CFLAGS="%optflags" CXXFLAGS="%optflags" \ - ./configure --prefix=%_prefix \ - --disable-rpath \ - --disable-debug - -%make - -%install -make DESTDIR=%buildroot install - -install -d $RPM_BUILD_ROOT%_menudir - -kdedesktop2mdkmenu.pl kmag "Applications/Accessibility" %buildroot/%_datadir/applnk/Applications/Accessibility/kmag.desktop %buildroot/%_menudir/kmag - - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -%update_menus - -%postun -%clean_menus - -%files -%defattr(-,root,root) -%_bindir/* -%_menudir/* -# -%_datadir/icons/locolor/16x16/apps/*.png -%_datadir/icons/locolor/32x32/apps/*.png -%_datadir/icons/hicolor/16x16/apps/*.png -# -%_datadir/applnk/Applications/Accessibility/*.desktop -# -%dir %_datadir/apps/kmag/ -%_datadir/apps/kmag/*.rc -# -#%doc README COPYING AUTHORS -#%doc %_docdir/HTML/en/*.docbook -%doc %_docdir/HTML/en/kmag/*.docbook -%doc %_docdir/HTML/en/kmag/images/*.png -#%doc %_docdir/HTML/en/kmag/common - -%changelog -* Sun Apr 21 2002 Sarang Lakare <sarang@users.sf.net> 0.8-1mdk -- Rebuilding ver 0.8 for LM8.2/LM8.1 -- Added KDE documentation and removed GNU documentation - -* Tue Nov 20 2001 Sarang Lakare <sarang@users.sf.net> 0.6-1mdk -- Rebuilding ver 0.6 for LM8.0 - -* Sat Oct 20 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 0.5-2mdk -- Rebuild against libpng3 - -* Wed Sep 19 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 0.5-1mdk -- update code (0.5) - -* Wed Aug 08 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3-6mdk -- rebuild - -* Tue Apr 10 2001 David BAUDENS <baudens@mandrakesoft.com> 0.3-5mdk -- Move KDE menu entriy in %%_datadir/applnk -- Fix and use optimizations -- Fix BuildRequires for non %%ix86 architectures -- Rebuild against latest GCC - -* Fri Mar 30 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 0.3-4mdk -- Fix typo in menu entry - -* Wed Mar 28 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 0.3-3mdk -- Add build requires - -* Tue Mar 13 2001 Laurent MONTEL <lmontel@mandrakesoft.com> 0.3-2mdk -- REbuild with qt-2.3 - -* Sat Feb 24 2001 Daouda Lo <daouda@mandrakesoft.com> 0.3-1mdk -- first mdk package diff --git a/kmag/kmagselrect.cpp b/kmag/kmagselrect.cpp index ba49fe3..997327b 100644 --- a/kmag/kmagselrect.cpp +++ b/kmag/kmagselrect.cpp @@ -162,7 +162,7 @@ void KMagSelRect::show() { if (selectionwindow == 0) { selectionwindow = new KMagSelWin (selWindowParent, "selectionwindow"); - connect (selectionwindow, TQT_SIGNAL (resized ()), this, TQT_SLOT (selWinResized ())); + connect (selectionwindow, TQ_SIGNAL (resized ()), this, TQ_SLOT (selWinResized ())); update(); selectionwindow->show(); @@ -226,32 +226,32 @@ KMagSelWin::KMagSelWin ( TQWidget * parent, const char * name, WFlags ) : titleBar->setPaletteBackgroundColor (getTitleColor ()); titleBar->setPaletteForegroundColor (getTextColor ()); titleBar->setText(i18n("Selection Window")+" - "+i18n("KMagnifier")); - connect (titleBar, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); - connect (titleBar, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (titleMoved (TQPoint))); + connect (titleBar, TQ_SIGNAL (startResizing ()), this, TQ_SLOT (startResizing ())); + connect (titleBar, TQ_SIGNAL (resized (TQPoint)), this, TQ_SLOT (titleMoved (TQPoint))); topLeftCorner = new KMagSelWinCorner (this, "topleft"); topLeftCorner->setCursor (TQt::SizeFDiagCursor); topLeftCorner->setPaletteBackgroundColor (getTitleBtnColor ()); - connect (topLeftCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); - connect (topLeftCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (topLeftResized (TQPoint))); + connect (topLeftCorner, TQ_SIGNAL (startResizing ()), this, TQ_SLOT (startResizing ())); + connect (topLeftCorner, TQ_SIGNAL (resized (TQPoint)), this, TQ_SLOT (topLeftResized (TQPoint))); topRightCorner = new KMagSelWinCorner (this, "topright"); topRightCorner->setCursor (TQt::SizeBDiagCursor); topRightCorner->setPaletteBackgroundColor (getTitleBtnColor ()); - connect (topRightCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); - connect (topRightCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (topRightResized (TQPoint))); + connect (topRightCorner, TQ_SIGNAL (startResizing ()), this, TQ_SLOT (startResizing ())); + connect (topRightCorner, TQ_SIGNAL (resized (TQPoint)), this, TQ_SLOT (topRightResized (TQPoint))); bottomLeftCorner = new KMagSelWinCorner (this, "bottomleft"); bottomLeftCorner->setCursor (TQt::SizeBDiagCursor); bottomLeftCorner->setPaletteBackgroundColor (getTitleBtnColor ()); - connect (bottomLeftCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); - connect (bottomLeftCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (bottomLeftResized (TQPoint))); + connect (bottomLeftCorner, TQ_SIGNAL (startResizing ()), this, TQ_SLOT (startResizing ())); + connect (bottomLeftCorner, TQ_SIGNAL (resized (TQPoint)), this, TQ_SLOT (bottomLeftResized (TQPoint))); bottomRightCorner = new KMagSelWinCorner (this, "bottomright"); bottomRightCorner->setCursor (TQt::SizeFDiagCursor); bottomRightCorner->setPaletteBackgroundColor (getTitleBtnColor ()); - connect (bottomRightCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); - connect (bottomRightCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (bottomRightResized (TQPoint))); + connect (bottomRightCorner, TQ_SIGNAL (startResizing ()), this, TQ_SLOT (startResizing ())); + connect (bottomRightCorner, TQ_SIGNAL (resized (TQPoint)), this, TQ_SLOT (bottomRightResized (TQPoint))); } KMagSelWin::~KMagSelWin() diff --git a/kmag/kmagselrect.h b/kmag/kmagselrect.h index 67c43cb..5da665f 100644 --- a/kmag/kmagselrect.h +++ b/kmag/kmagselrect.h @@ -29,7 +29,7 @@ class KMagSelWinCorner : public TQLabel { - Q_OBJECT + TQ_OBJECT public: @@ -54,7 +54,7 @@ protected: class KMagSelWin : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -99,7 +99,7 @@ protected: */ class KMagSelRect : public TQObject, public TQRect { - Q_OBJECT + TQ_OBJECT public: diff --git a/kmag/kmagzoomview.cpp b/kmag/kmagzoomview.cpp index 644e91a..921465e 100644 --- a/kmag/kmagzoomview.cpp +++ b/kmag/kmagzoomview.cpp @@ -133,10 +133,10 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) m_invert(false), m_fitToWindow(true) { - TDEApplication::setGlobalMouseTracking(TRUE); - viewport()->setMouseTracking(TRUE); + TDEApplication::setGlobalMouseTracking(true); + viewport()->setMouseTracking(true); viewport()->setBackgroundMode (NoBackground); - viewport()->setFocusPolicy(TQ_StrongFocus); + viewport()->setFocusPolicy(TQWidget::StrongFocus); m_ctrlKeyPressed = false; m_shiftKeyPressed = false; @@ -147,12 +147,12 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) setRefreshRate(10); // connect it to grabFrame() - connect(&m_grabTimer, TQT_SIGNAL(timeout()), TQT_SLOT(grabFrame())); + connect(&m_grabTimer, TQ_SIGNAL(timeout()), TQ_SLOT(grabFrame())); // start the grabTimer m_grabTimer.start(static_cast<int>(1000.0/m_fps)); // connect it to updateMouseView() - connect(&m_mouseViewTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateMouseView())); + connect(&m_mouseViewTimer, TQ_SIGNAL(timeout()), TQ_SLOT(updateMouseView())); // start the grabTimer @ 25 frames per second! m_mouseViewTimer.start(25); @@ -167,7 +167,7 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) KMagZoomView::~KMagZoomView() { - TDEApplication::setGlobalMouseTracking(FALSE); + TDEApplication::setGlobalMouseTracking(false); } /** @@ -246,7 +246,7 @@ void KMagZoomView::drawContents ( TQPainter * p, int clipx, int clipy, int clipw // show the pixel under mouse cursor if(m_showMouse) { // paint the mouse cursor - paintMouseCursor(TQT_TQPAINTDEVICE(&clippedPixmap), calcMousePos (m_refreshSwitch)-TQPoint (areaToPaint.x(), areaToPaint.y())); + paintMouseCursor(&clippedPixmap, calcMousePos (m_refreshSwitch)-TQPoint (areaToPaint.x(), areaToPaint.y())); } TQPixmap zoomedPixmap; @@ -294,8 +294,8 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) pz.setPen(TQt::black); pz.setBackgroundColor(TQt::white); - TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE ); - TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE ); + TQBitmap sCursor( 16, 16, left_ptr_bits, true ); + TQBitmap mask( 16, 16, left_ptrmsk_bits, true ); sCursor.setMask(mask); // since hot spot is at 3,1 @@ -307,7 +307,7 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) { // 3. Actual cursor // Get the current cursor type - TQWidget *dummy = TDEApplication::widgetAt(TQCursor::pos(), FALSE); + TQWidget *dummy = TDEApplication::widgetAt(TQCursor::pos(), false); if(!dummy) break; kdDebug() << ">" << dummy->name() << ":" << dummy->cursor().shape() << "-" << endl; @@ -318,8 +318,8 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) pz.setPen(TQt::black); pz.setBackgroundColor(TQt::white); - TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE ); - TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE ); + TQBitmap sCursor( 16, 16, left_ptr_bits, true ); + TQBitmap mask( 16, 16, left_ptrmsk_bits, true ); sCursor.setMask(mask); // since hot spot is at 3,1 @@ -327,8 +327,8 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) } break; default: - TQBitmap sCursor( 32, 32, phand_bits, TRUE ); - TQBitmap mask( 32, 32, phandm_bits, TRUE ); + TQBitmap sCursor( 32, 32, phand_bits, true ); + TQBitmap mask( 32, 32, phandm_bits, true ); sCursor.setMask(mask); pz.drawPixmap(mousePos.x(), mousePos.y(), sCursor); @@ -370,7 +370,7 @@ TQPoint KMagZoomView::calcMousePos(bool updateMousePos) void KMagZoomView::mousePressEvent(TQMouseEvent *e) { switch(e->button()) { - case Qt::LeftButton : + case TQt::LeftButton : if(m_ctrlKeyPressed) { // check if currently in resize mode // don't do anything if fitToWindow is enabled @@ -443,7 +443,7 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) } break; - case Qt::MidButton : + case TQt::MidButton : // check if currently in move mode // don't do anything if follow mouse is enabled if ((m_mouseMode != MoveSelection) && !m_followMouse) { @@ -484,8 +484,8 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) { switch(e->button()) { - case Qt::LeftButton : - case Qt::MidButton : + case TQt::LeftButton : + case TQt::MidButton : // check if currently in move mode if(m_mouseMode == MoveSelection) { // hide the selection window @@ -521,9 +521,9 @@ void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) } break; - case Qt::RightButton : + case TQt::RightButton : break; - case Qt::NoButton : + case TQt::NoButton : break; // do nothing @@ -686,7 +686,7 @@ void KMagZoomView::contextMenuEvent (TQContextMenuEvent *e) void KMagZoomView::focusOutEvent(TQFocusEvent *e) { - if(e->lostFocus() == TRUE) { + if (e->lostFocus()) { m_ctrlKeyPressed = false; m_shiftKeyPressed = false; } @@ -889,7 +889,7 @@ TQPixmap KMagZoomView::getPixmap() TQPixmap mousePixmap(m_grabbedPixmap); // paint the mouse cursor w/o updating to a newer position - paintMouseCursor(TQT_TQPAINTDEVICE(&mousePixmap), calcMousePos(false)); + paintMouseCursor(&mousePixmap, calcMousePos(false)); return(mousePixmap); } else { // no mouse cursor diff --git a/kmag/kmagzoomview.h b/kmag/kmagzoomview.h index 1208d18..960c422 100644 --- a/kmag/kmagzoomview.h +++ b/kmag/kmagzoomview.h @@ -21,7 +21,7 @@ #define KMagZoomView_h_ #ifdef HAVE_CONFIG_H -#include <config.h> +#include "config.h" #endif // include files for TQt @@ -45,7 +45,7 @@ */ class KMagZoomView : public TQScrollView { - Q_OBJECT + TQ_OBJECT public: /// Constructor for the main view |