Commit b041bcad authored by Laurent Montel's avatar Laurent Montel 😁

Use QStringLiteral + new connect api

parent 98e532e2
This diff is collapsed.
......@@ -152,8 +152,8 @@ void KMagSelRect::show()
{
if (selectionwindow == 0) {
selectionwindow = new KMagSelWin (selWindowParent);
selectionwindow->setObjectName( QLatin1String("selectionwindow" ));
connect (selectionwindow, SIGNAL (resized()), this, SLOT (selWinResized()));
selectionwindow->setObjectName( QStringLiteral("selectionwindow" ));
connect (selectionwindow, &KMagSelWin::resized, this, &KMagSelRect::selWinResized);
update();
selectionwindow->show();
......@@ -208,39 +208,39 @@ KMagSelWin::KMagSelWin ( QWidget * parent ) :
setPalette(p);
titleBar = new KMagSelWinCorner (this);
titleBar->setObjectName( QLatin1String("titlebar" ));
titleBar->setObjectName( QStringLiteral("titlebar" ));
setPaletteColor(titleBar, QPalette::Background, getTitleColor());
setPaletteColor(titleBar, QPalette::Foreground, getTextColor());
titleBar->setText(i18n("Selection Window")+QLatin1String( " - " )+i18n("KMagnifier"));
connect (titleBar, SIGNAL (startResizing()), this, SLOT (startResizing()));
connect (titleBar, &KMagSelWinCorner::startResizing, this, &KMagSelWin::startResizing);
connect (titleBar, SIGNAL (resized(QPoint)), this, SLOT (titleMoved(QPoint)));
topLeftCorner = new KMagSelWinCorner (this);
topLeftCorner->setObjectName( QLatin1String("topleft" ));
topLeftCorner->setObjectName( QStringLiteral("topleft" ));
topLeftCorner->setCursor (Qt::SizeFDiagCursor);
setPaletteColor(topLeftCorner, QPalette::Background, getTitleBtnColor());
connect (topLeftCorner, SIGNAL (startResizing()), this, SLOT (startResizing()));
connect (topLeftCorner, &KMagSelWinCorner::startResizing, this, &KMagSelWin::startResizing);
connect (topLeftCorner, SIGNAL (resized(QPoint)), this, SLOT (topLeftResized(QPoint)));
topRightCorner = new KMagSelWinCorner (this);
topRightCorner->setObjectName( QLatin1String("topright" ));
topRightCorner->setObjectName( QStringLiteral("topright" ));
topRightCorner->setCursor (Qt::SizeBDiagCursor);
setPaletteColor(topRightCorner, QPalette::Background, getTitleBtnColor ());
connect (topRightCorner, SIGNAL (startResizing()), this, SLOT (startResizing()));
connect (topRightCorner, &KMagSelWinCorner::startResizing, this, &KMagSelWin::startResizing);
connect (topRightCorner, SIGNAL (resized(QPoint)), this, SLOT (topRightResized(QPoint)));
bottomLeftCorner = new KMagSelWinCorner (this);
bottomLeftCorner->setObjectName( QLatin1String("bottomleft" ));
bottomLeftCorner->setObjectName( QStringLiteral("bottomleft" ));
bottomLeftCorner->setCursor (Qt::SizeBDiagCursor);
setPaletteColor(bottomLeftCorner, QPalette::Background, getTitleBtnColor());
connect (bottomLeftCorner, SIGNAL (startResizing()), this, SLOT (startResizing()));
connect (bottomLeftCorner, &KMagSelWinCorner::startResizing, this, &KMagSelWin::startResizing);
connect (bottomLeftCorner, SIGNAL (resized(QPoint)), this, SLOT (bottomLeftResized(QPoint)));
bottomRightCorner = new KMagSelWinCorner (this);
bottomRightCorner->setObjectName( QLatin1String("bottomright" ));
bottomRightCorner->setObjectName( QStringLiteral("bottomright" ));
bottomRightCorner->setCursor (Qt::SizeFDiagCursor);
setPaletteColor(bottomRightCorner, QPalette::Background, getTitleBtnColor ());
connect (bottomRightCorner, SIGNAL (startResizing()), this, SLOT (startResizing()));
connect (bottomRightCorner, &KMagSelWinCorner::startResizing, this, &KMagSelWin::startResizing);
connect (bottomRightCorner, SIGNAL (resized(QPoint)), this, SLOT (bottomRightResized(QPoint)));
}
......
......@@ -109,12 +109,12 @@ KMagZoomView::KMagZoomView(QWidget *parent, const char *name)
setRefreshRate(10);
// connect it to grabFrame()
connect(&m_grabTimer, SIGNAL(timeout()), SLOT(grabFrame()));
connect(&m_grabTimer, &QTimer::timeout, this, &KMagZoomView::grabFrame);
// start the grabTimer
m_grabTimer.start(static_cast<int>(1000.0/m_fps));
// connect it to updateMouseView()
connect(&m_mouseViewTimer, SIGNAL(timeout()), SLOT(updateMouseView()));
connect(&m_mouseViewTimer, &QTimer::timeout, this, &KMagZoomView::updateMouseView);
// start the grabTimer @ 25 frames per second!
m_mouseViewTimer.start(40);
......@@ -122,7 +122,7 @@ KMagZoomView::KMagZoomView(QWidget *parent, const char *name)
selected region. The contents will be magnified according to the zoom level that is set."));
// different ways to show the cursor.
m_showMouseTypes << QLatin1String( "Hidden" ) << QLatin1String( "Box" ) << QLatin1String( "Arrow" ) << QLatin1String( "Actual" );
m_showMouseTypes << QStringLiteral( "Hidden" ) << QStringLiteral( "Box" ) << QStringLiteral( "Arrow" ) << QStringLiteral( "Actual" );
if(m_fitToWindow)
fitToWindow();
......
......@@ -36,22 +36,22 @@ KmagApp *kmagapp;
int main(int argc, char *argv[])
{
// about the application
KAboutData aboutData(QLatin1String("kmag"), i18n("KMagnifier"), QLatin1String(KMAG_VERSION),
KAboutData aboutData(QStringLiteral("kmag"), i18n("KMagnifier"), QStringLiteral(KMAG_VERSION),
i18n("Screen magnifier for the K Desktop Environment (KDE)"),
KAboutLicense::GPL,
i18n("Copyright 2001-2003 Sarang Lakare\nCopyright 2003-2004 Olaf Schmidt\nCopyright 2008 Matthew Woehlke"), QString(),
QLatin1String("http://accessibility.kde.org/"));
QStringLiteral("http://accessibility.kde.org/"));
// about the authors
aboutData.addAuthor(i18n("Sarang Lakare"),
i18n("Rewrite"),QLatin1String("sarang@users.sf.net"),
QLatin1String("http://www.cs.sunysb.edu/~lsarang/linux"));
i18n("Rewrite"),QStringLiteral("sarang@users.sf.net"),
QStringLiteral("http://www.cs.sunysb.edu/~lsarang/linux"));
aboutData.addAuthor(i18n("Michael Forster"),
i18n("Original idea and author (KDE1)"), QLatin1String("forster@fmi.uni-passau.de"));
aboutData.addAuthor(i18n("Olaf Schmidt"), i18n("Rework of the user interface, improved selection window, speed optimization, rotation, bug fixes"), QLatin1String("ojschmidt@kde.org"));
aboutData.addCredit(i18n("Matthew Woehlke"), i18n("Color-blindness simulation"), QLatin1String("mw_triad@users.sourceforge.net"));
aboutData.addCredit(i18n("Sebastian Sauer"), i18n("Focus tracking"), QLatin1String("sebsauer@kdab.com"));
aboutData.addCredit(i18n("Claudiu Costin"), i18n("Some tips"), QLatin1String("claudiuc@work.ro"), QLatin1String("http://www.ro.kde.org"));
i18n("Original idea and author (KDE1)"), QStringLiteral("forster@fmi.uni-passau.de"));
aboutData.addAuthor(i18n("Olaf Schmidt"), i18n("Rework of the user interface, improved selection window, speed optimization, rotation, bug fixes"), QStringLiteral("ojschmidt@kde.org"));
aboutData.addCredit(i18n("Matthew Woehlke"), i18n("Color-blindness simulation"), QStringLiteral("mw_triad@users.sourceforge.net"));
aboutData.addCredit(i18n("Sebastian Sauer"), i18n("Focus tracking"), QStringLiteral("sebsauer@kdab.com"));
aboutData.addCredit(i18n("Claudiu Costin"), i18n("Some tips"), QStringLiteral("claudiuc@work.ro"), QStringLiteral("http://www.ro.kde.org"));
QApplication app(argc, argv);
KAboutData::setApplicationData(aboutData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment