Changeset 561 for trunk/examples/mainwindows
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/examples/mainwindows/application/application.pro
r2 r561 11 11 sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/application 12 12 INSTALLS += target sources 13 14 symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) -
trunk/examples/mainwindows/application/main.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 50 50 51 51 QApplication app(argc, argv); 52 app.setOrganizationName("Trolltech"); 53 app.setApplicationName("Application Example"); 52 54 MainWindow mainWin; 53 55 mainWin.show(); -
trunk/examples/mainwindows/application/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 175 175 //! [20] 176 176 exitAct = new QAction(tr("E&xit"), this); 177 exitAct->setShortcut (tr("Ctrl+Q"));177 exitAct->setShortcuts(QKeySequence::Quit); 178 178 //! [20] 179 179 exitAct->setStatusTip(tr("Exit the application")); … … 329 329 330 330 QTextStream in(&file); 331 #ifndef QT_NO_CURSOR 331 332 QApplication::setOverrideCursor(Qt::WaitCursor); 333 #endif 332 334 textEdit->setPlainText(in.readAll()); 335 #ifndef QT_NO_CURSOR 333 336 QApplication::restoreOverrideCursor(); 337 #endif 334 338 335 339 setCurrentFile(fileName); … … 352 356 353 357 QTextStream out(&file); 358 #ifndef QT_NO_CURSOR 354 359 QApplication::setOverrideCursor(Qt::WaitCursor); 360 #endif 355 361 out << textEdit->toPlainText(); 362 #ifndef QT_NO_CURSOR 356 363 QApplication::restoreOverrideCursor(); 364 #endif 357 365 358 366 setCurrentFile(fileName); … … 370 378 setWindowModified(false); 371 379 372 QString shownName ;380 QString shownName = curFile; 373 381 if (curFile.isEmpty()) 374 382 shownName = "untitled.txt"; 375 else 376 shownName = strippedName(curFile); 377 378 setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Application"))); 383 setWindowFilePath(shownName); 379 384 } 380 385 //! [47] -
trunk/examples/mainwindows/application/mainwindow.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/dockwidgets/dockwidgets.pro
r2 r561 9 9 sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/dockwidgets 10 10 INSTALLS += target sources 11 12 symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) -
trunk/examples/mainwindows/dockwidgets/main.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/dockwidgets/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 243 243 244 244 quitAct = new QAction(tr("&Quit"), this); 245 quitAct->setShortcut (tr("Ctrl+Q"));245 quitAct->setShortcuts(QKeySequence::Quit); 246 246 quitAct->setStatusTip(tr("Quit the application")); 247 247 connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); … … 336 336 viewMenu->addAction(dock->toggleViewAction()); 337 337 338 connect(customerList, SIGNAL(currentTextChanged( const QString &)),339 this, SLOT(insertCustomer( const QString &)));340 connect(paragraphsList, SIGNAL(currentTextChanged( const QString &)),341 this, SLOT(addParagraph( const QString &)));338 connect(customerList, SIGNAL(currentTextChanged(QString)), 339 this, SLOT(insertCustomer(QString))); 340 connect(paragraphsList, SIGNAL(currentTextChanged(QString)), 341 this, SLOT(addParagraph(QString))); 342 342 } 343 343 //! [9] -
trunk/examples/mainwindows/dockwidgets/mainwindow.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/mainwindows.pro
r2 r561 7 7 sdi 8 8 9 symbian: SUBDIRS = \ 10 menus 11 12 9 13 # install 10 14 target.path = $$[QT_INSTALL_EXAMPLES]/mainwindows … … 12 16 sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows 13 17 INSTALLS += target sources 18 19 symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) -
trunk/examples/mainwindows/mdi/main.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/mdi/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 51 51 mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); 52 52 setCentralWidget(mdiArea); 53 connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow 53 connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), 54 54 this, SLOT(updateMenus())); 55 55 windowMapper = new QSignalMapper(this); 56 connect(windowMapper, SIGNAL(mapped(QWidget 57 this, SLOT(setActiveSubWindow(QWidget 56 connect(windowMapper, SIGNAL(mapped(QWidget*)), 57 this, SLOT(setActiveSubWindow(QWidget*))); 58 58 59 59 createActions(); … … 72 72 { 73 73 mdiArea->closeAllSubWindows(); 74 if ( activeMdiChild()) {74 if (mdiArea->currentSubWindow()) { 75 75 event->ignore(); 76 76 } else { … … 236 236 //! [0] 237 237 exitAct = new QAction(tr("E&xit"), this); 238 exitAct->setShortcut (tr("Ctrl+Q"));238 exitAct->setShortcuts(QKeySequence::Quit); 239 239 exitAct->setStatusTip(tr("Exit the application")); 240 240 connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); … … 260 260 261 261 closeAct = new QAction(tr("Cl&ose"), this); 262 closeAct->setShortcut(tr("Ctrl+F4"));263 262 closeAct->setStatusTip(tr("Close the active window")); 264 263 connect(closeAct, SIGNAL(triggered()), -
trunk/examples/mainwindows/mdi/mainwindow.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/mdi/mdi.pro
r2 r561 11 11 sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/mdi 12 12 INSTALLS += target sources 13 14 symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) -
trunk/examples/mainwindows/mdi/mdichild.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/mdi/mdichild.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/menus/main.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/menus/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 220 220 221 221 exitAct = new QAction(tr("E&xit"), this); 222 exitAct->setShortcut (tr("Ctrl+Q"));222 exitAct->setShortcuts(QKeySequence::Quit); 223 223 exitAct->setStatusTip(tr("Exit the application")); 224 224 connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); … … 241 241 242 242 copyAct = new QAction(tr("&Copy"), this); 243 copyAct->setShortcut (tr("Ctrl+C"));243 copyAct->setShortcuts(QKeySequence::Copy); 244 244 copyAct->setStatusTip(tr("Copy the current selection's contents to the " 245 245 "clipboard")); … … 254 254 boldAct = new QAction(tr("&Bold"), this); 255 255 boldAct->setCheckable(true); 256 boldAct->setShortcut( tr("Ctrl+B"));256 boldAct->setShortcut(QKeySequence::Bold); 257 257 boldAct->setStatusTip(tr("Make the text bold")); 258 258 connect(boldAct, SIGNAL(triggered()), this, SLOT(bold())); … … 264 264 italicAct = new QAction(tr("&Italic"), this); 265 265 italicAct->setCheckable(true); 266 italicAct->setShortcut( tr("Ctrl+I"));266 italicAct->setShortcut(QKeySequence::Italic); 267 267 italicAct->setStatusTip(tr("Make the text italic")); 268 268 connect(italicAct, SIGNAL(triggered()), this, SLOT(italic())); -
trunk/examples/mainwindows/menus/mainwindow.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/menus/menus.pro
r2 r561 8 8 sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/menus 9 9 INSTALLS += target sources 10 11 symbian { 12 TARGET.UID3 = 0xA000CF66 13 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) 14 } -
trunk/examples/mainwindows/recentfiles/main.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 47 47 { 48 48 QApplication app(argc, argv); 49 app.setOrganizationName("Trolltech"); 50 app.setApplicationName("Recent Files Example"); 49 51 MainWindow *mainWin = new MainWindow; 50 52 mainWin->show(); -
trunk/examples/mainwindows/recentfiles/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 (void)statusBar(); 56 56 57 setWindow Title(tr("Recent Files"));57 setWindowFilePath(QString()); 58 58 resize(400, 300); 59 59 } … … 133 133 134 134 exitAct = new QAction(tr("E&xit"), this); 135 exitAct->setShortcut (tr("Ctrl+Q"));135 exitAct->setShortcuts(QKeySequence::Quit); 136 136 exitAct->setStatusTip(tr("Exit the application")); 137 137 connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); … … 210 210 { 211 211 curFile = fileName; 212 if (curFile.isEmpty()) 213 setWindowTitle(tr("Recent Files")); 214 else 215 setWindowTitle(tr("%1 - %2").arg(strippedName(curFile)) 216 .arg(tr("Recent Files"))); 217 218 QSettings settings("Trolltech", "Recent Files Example"); 212 setWindowFilePath(curFile); 213 214 QSettings settings; 219 215 QStringList files = settings.value("recentFileList").toStringList(); 220 216 files.removeAll(fileName); … … 234 230 void MainWindow::updateRecentFileActions() 235 231 { 236 QSettings settings ("Trolltech", "Recent Files Example");232 QSettings settings; 237 233 QStringList files = settings.value("recentFileList").toStringList(); 238 234 -
trunk/examples/mainwindows/recentfiles/mainwindow.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/examples/mainwindows/recentfiles/recentfiles.pro
r2 r561 8 8 sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/recentfiles 9 9 INSTALLS += target sources 10 11 symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) -
trunk/examples/mainwindows/sdi/main.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 48 48 Q_INIT_RESOURCE(sdi); 49 49 QApplication app(argc, argv); 50 app.setApplicationName("SDI Example"); 51 app.setOrganizationName("Trolltech"); 50 52 MainWindow *mainWin = new MainWindow; 51 53 mainWin->show(); -
trunk/examples/mainwindows/sdi/mainwindow.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 181 181 182 182 exitAct = new QAction(tr("E&xit"), this); 183 exitAct->setShortcut (tr("Ctrl+Q"));183 exitAct->setShortcuts(QKeySequence::Quit); 184 184 exitAct->setStatusTip(tr("Exit the application")); 185 185 connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); … … 267 267 void MainWindow::readSettings() 268 268 { 269 QSettings settings ("Trolltech", "SDI Example");269 QSettings settings; 270 270 QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint(); 271 271 QSize size = settings.value("size", QSize(400, 400)).toSize(); … … 276 276 void MainWindow::writeSettings() 277 277 { 278 QSettings settings ("Trolltech", "SDI Example");278 QSettings settings; 279 279 settings.setValue("pos", pos()); 280 280 settings.setValue("size", size()); … … 353 353 textEdit->document()->setModified(false); 354 354 setWindowModified(false); 355 356 setWindowTitle(tr("%1[*] - %2").arg(strippedName(curFile)) 357 .arg(tr("SDI"))); 355 setWindowFilePath(curFile); 358 356 } 359 357 -
trunk/examples/mainwindows/sdi/mainwindow.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the examples of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 51 51 QT_END_NAMESPACE 52 52 53 //! [class definition with macro] 53 54 class MainWindow : public QMainWindow 54 55 { … … 57 58 public: 58 59 MainWindow(); 60 //! [class definition with macro] 59 61 MainWindow(const QString &fileName); 60 62 -
trunk/examples/mainwindows/sdi/sdi.pro
r2 r561 9 9 sources.path = $$[QT_INSTALL_EXAMPLES]/mainwindows/sdi 10 10 INSTALLS += target sources 11 12 symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
Note:
See TracChangeset
for help on using the changeset viewer.