Changeset 7220 in vbox
- Timestamp:
- Feb 29, 2008 3:35:29 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 60 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r7177 r7220 38 38 DEPTH = ../../../.. 39 39 include $(PATH_KBUILD)/header.kmk 40 41 # Disable the debugger for now, this is another story. 42 VBOX_WITH_DEBUGGER_GUI := 43 DEFS := $(filter-out VBOX_WITH_DEBUGGER_GUI,$(DEFS)) 44 45 # Handmade configuration of qt4 46 VBOX_PATH_QT4 = /usr 47 VBOX_MODULE_QT4 = QtCore QtGui QtNetwork Qt3Support 48 VBOX_DEFS_QT4 = QT_CORE_LIB QT_GUI_LIB QT_NETWORK_LIB QT_QT3SUPPORT_LIB 49 VBOX_INCS_QT4 = $(VBOX_PATH_QT4)/share/qt4/mkspecs/linux-g++ $(foreach mod, $(VBOX_MODULE_QT4), $(join $(VBOX_PATH_QT4)/include/qt4/, $(mod))) $(VBOX_PATH_QT4)/include/qt4/Qt $(VBOX_PATH_QT4)/include/qt4 50 VBOX_LIBS_QT4 = $(VBOX_MODULE_QT4) 51 VBOX_LIBPATH_QT4 = $(VBOX_MODULE_QT4)/lib 52 53 # Moc knows ifdefs now 54 VBOX_MOCDEF_QT4 = -DQ_WS_X11 55 56 # Warn about all what you know about porting qt3->qt4. 57 # Disable this if you like to see something on your screen. 58 VBOX_DEFS_QT4 += QT3_SUPPORT_WARNINGS 59 # Some default defs 60 VBOX_DEFS_QT4 += QT3_SUPPORT QT_SHARED HAVE_CONFIG_H QT_NO_DEBUG 61 62 VBOX_UIC4 := $(VBOX_PATH_QT4)/bin/uic3 63 VBOX_MOC4 := $(VBOX_PATH_QT4)/bin/moc 64 VBOX_LUPDATE4 := $(VBOX_PATH_QT4)/bin/lupdate 65 VBOX_LRELEASE4 := $(VBOX_PATH_QT4)/bin/lrelease 66 67 # Template copy from the qt3 stuff. Appended a "4" on the 68 # relevant places. 69 70 # 71 # Template for building Qt GUI executables. 72 # 73 74 TEMPLATE_VBOXQT4GUIEXE = VBox Qt4 GUI Executable 75 TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT $(ARCH_BITS_DEFS) $(VBOX_DEFS_QT4) 76 TEMPLATE_VBOXQT4GUIEXE_INCS = \ 77 $(VBOX_PATH_SDK)/include \ 78 $(VBOX_INCS_QT4) 79 80 ifeq ($(BUILD_TARGET),win) 81 # drag in library configuration (we need QMAKE_PRL_DEFINES) 82 ifneq ($(LIB_QT_PRL),) 83 include $(LIB_QT_PRL) 84 endif 85 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_VCC_TOOL) 86 TEMPLATE_VBOXQT4GUIEXE_DEFS += \ 87 _WIN32_WINNT=0x0500 UNICODE _UNICODE \ 88 QT_DLL _CRT_SECURE_NO_DEPRECATE \ 89 $(QMAKE_PRL_DEFINES) 90 ## @todo VCC70 flags? 91 ifdef VBOX_USE_VCC80 92 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \ 93 -nologo -Zm200 -W3 -MD -Zi -EHsc -Zc:wchar_t- 94 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -RTCsu 95 else 96 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \ 97 -nologo -Zm200 -W3 -MD -Zi -GX 98 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.debug = -GZ 99 endif 100 TEMPLATE_VBOXQT4GUIEXE_INCS += \ 101 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) 102 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS = \ 103 /NOD /NOLOGO /INCREMENTAL:NO /MAPINFO:EXPORTS /DEBUG \ 104 /DELAYLOAD:oleaut32.dll 105 TEMPLATE_VBOXQT4GUIEXE_SDKS = WINPSDK 106 TEMPLATE_VBOXQT4GUIEXE_LIBS = \ 107 $(LIB_QT) \ 108 $(LIB_QTMAIN) \ 109 $(LIB_RUNTIME) \ 110 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \ 111 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \ 112 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \ 113 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \ 114 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib 115 TEMPLATE_VBOXQT4GUIEXE_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS) 116 117 else # the gcc guys: 118 TEMPLATE_VBOXQT4GUIEXE_TOOL = $(VBOX_GCC_TOOL) 119 TEMPLATE_VBOXQT4GUIEXE_DEFS.linux = _REENTRANT 120 121 TEMPLATE_VBOXQT4GUIEXE_DEFS.solaris = _REENTRANT 122 123 TEMPLATE_VBOXQT4GUIEXE_INCS += \ 124 $(LIB_SDL_INC) 125 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \ 126 -pipe -Wall -W -frtti -fno-exceptions -Wno-non-virtual-dtor \ 127 -Wno-long-long -fshort-wchar -fno-strict-aliasing \ 128 $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) 129 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86 = -m32 130 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64 = -m64 131 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread 132 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.x86 = -m32 133 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.amd64 = -m64 134 TEMPLATE_VBOXQT4GUIEXE_LIBS = \ 135 $(VBOX_LIBS_QT4) \ 136 $(LIB_SDL) \ 137 $(LIB_RUNTIME) \ 138 $(LIB_REM) \ 139 $(LIB_VMM) 140 141 ifeq ($(BUILD_TARGET_ARCH),amd64) 142 TEMPLATE_VBOXQT4GUIEXE_LIBPATH = \ 143 $(VBOX_PATH_QT4)/lib64/qt4 $(VBOX_PATH_QT4)/lib/qt4 144 else 145 TEMPLATE_VBOXQT4GUIEXE_LIBPATH = \ 146 $(VBOX_PATH_QT4)/lib/qt4 147 endif 148 149 ifeq ($(BUILD_TARGET),linux) 150 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += $(VBOX_LD_as_needed) 151 else ifeq ($(BUILD_TARGET),darwin) 152 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += -framework Carbon -framework QuickTime -bind_at_load 153 TEMPLATE_VBOXQT4GUIEXE_LIBS += 154 TEMPLATE_VBOXQT4GUIEXE_LIBPATH += 155 else ifeq ($(BUILD_TARGET),os2) 156 # drag in library configuration (we need QMAKE_PRL_DEFINES) 157 ifneq ($(LIB_QT_PRL),) 158 include $(LIB_QT_PRL) 159 endif 160 TEMPLATE_VBOXQT4GUIEXE_DEFS += $(QMAKE_PRL_DEFINES) 161 TEMPLATE_VBOXQT4GUIEXE_LIBS += 162 TEMPLATE_VBOXQT4GUIEXE_LIBPATH += 163 else 164 TEMPLATE_VBOXQT4GUIEXE_INCS += \ 165 $(VBOX_XCURSOR_INCS) 166 TEMPLATE_VBOXQT4GUIEXE_LIBS += \ 167 $(VBOX_XCURSOR_LIBS) \ 168 Xext \ 169 X11 \ 170 m \ 171 $(LIB_PTHREAD) 172 TEMPLATE_VBOXQT4GUIEXE_LIBPATH += \ 173 $(VBOX_LIBPATH_X11) 174 ifeq ($(BUILD_TARGET),freebsd) 175 TEMPLATE_VBOXQT4GUIEXE_INCS += \ 176 /usr/include \ 177 /usr/X11R6/include \ 178 /usr/local/include 179 endif 180 ifeq ($(BUILD_TARGET),solaris) 181 TEMPLATE_VBOXQT4GUIEXE_LDFLAGS += '-R$$(VBOX_ORIGIN):$$(VBOX_ORIGIN)/qtgcc/lib' 182 TEMPLATE_VBOXQT4GUIEXE_LIBS += \ 183 rt socket nsl 184 endif 185 endif 186 187 endif 188 189 # Add COM/XPCOM stuff 190 TEMPLATE_VBOXQT4GUIEXE_LIBS += \ 191 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) 192 ifdef VBOX_WITH_XPCOM 193 ## @todo may be worth creating the VBOX_XPCOM SDK def 194 TEMPLATE_VBOXQT4GUIEXE_DEFS += VBOX_WITH_XPCOM 195 TEMPLATE_VBOXQT4GUIEXE_INCS += \ 196 $(VBOX_XPCOM_INCS) 197 TEMPLATE_VBOXQT4GUIEXE_LIBS += \ 198 $(LIB_XPCOM) 199 VBOX_MOCDEF_QT4 += -DVBOX_WITH_XPCOM 200 endif 201 202 # 203 # Template for building Qt GUI components. 204 # 205 TEMPLATE_VBOXQT4GUI = VBox Qt GUI Components 206 TEMPLATE_VBOXQT4GUI_EXTENDS = VBOXQTGUIEXE 207 TEMPLATE_VBOXQT4GUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQT4GUIEXE_LIBS)) 208 ifeq ($(BUILD_TARGET),darwin) 209 TEMPLATE_VBOXQT4GUI_LDFLAGS = $(filter-out -framework Carbon -framework QuickTime -bind_at_load,$(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS)) 210 endif 211 ifeq ($(filter-out solaris.x86 %.amd64,$(BUILD_TARGET).$(BUILD_TARGET_ARCH)),) 212 ifneq ($(BUILD_TARGET),win) 213 TEMPLATE_VBOXQT4GUI_DEFS = PIC $(TEMPLATE_VBOXQT4GUIEXE_DEFS) 214 TEMPLATE_VBOXQT4GUI_CFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CFLAGS) 215 TEMPLATE_VBOXQT4GUI_CXXFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS) 216 TEMPLATE_VBOXQT4GUI_LDFLAGS = -fPIC $(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS) 217 endif 218 endif 40 219 41 220 … … 120 299 # VirtualBox - The GUI program. 121 300 # 122 VirtualBox_TEMPLATE = VBOXQT GUIEXE301 VirtualBox_TEMPLATE = VBOXQT4GUIEXE 123 302 VirtualBox_SDKS.win = WINPSDK DXSDK 124 303 #ifeq ($(filter-out freebsd linux netbsd openbsd os2 solaris,$(BUILD_TARGET)),) - later … … 199 378 $(foreach moc,$(notdir $(basename $(VirtualBox_QT_MOCHDRS))), $(PATH_VirtualBox)/moc/moc_$(moc).cpp) \ 200 379 $(foreach ui,$(notdir $(basename $(VirtualBox_QT_UISRCS))), $(PATH_VirtualBox)/ui/$(ui).cpp $(PATH_VirtualBox)/moc/moc_$(ui).cpp) \ 201 $(PATH_VirtualBox)/ui/vbox_image_collection.cpp380 # $(PATH_VirtualBox)/ui/vbox_image_collection.cpp 202 381 203 382 # All generated headers. Note: this list MUST be in sync with Qt source … … 467 646 $$(call MSG_TOOL,moc,$(target),$(mochdr),$$@) 468 647 $$(QUIET)$$(MKDIR) -p $$(@D) 469 $$(QUIET)$$(VBOX_MOC ) $(mochdr) -o $$@648 $$(QUIET)$$(VBOX_MOC4) $(VBOX_MOCDEF_QT4) $(mochdr) -o $$@ 470 649 471 650 endef … … 488 667 $$(call MSG_TOOL,moc,$(target),$(mocsrc),$$@) 489 668 $$(QUIET)$$(MKDIR) -p $$(@D) 490 $$(QUIET)$$(VBOX_MOC ) -i $(mocsrc) -o $$@669 $$(QUIET)$$(VBOX_MOC4) $(VBOX_MOCDEF_QT4) -i $(mocsrc) -o $$@ 491 670 492 671 endef … … 509 688 $$(call MSG_TOOL,moc,$(target),$(mocuihdr),$$@) 510 689 $$(QUIET)$$(MKDIR) -p $$(@D) 511 $$(QUIET)$$(VBOX_MOC ) -i $(mocuihdr) -o $$@690 $$(QUIET)$$(VBOX_MOC4) $(VBOX_MOCDEF_QT4) -i $(mocuihdr) -o $$@ 512 691 513 692 endef … … 528 707 $(uihdr): $(uifile) | $$(call DIRDEP,$(dir $(uihdr))) 529 708 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@) 530 $$(QUIET)$$(VBOX_UIC ) $(uifile) -o $$@709 $$(QUIET)$$(VBOX_UIC4) $(uifile) -o $$@ 531 710 532 711 $(uisrc): $(uihdr) $(uifile) $(wildcard $(uifile).h) | $$(call DIRDEP,$(dir $(uisrc))) 533 712 $$(call MSG_TOOL,uic,$(target),$(uifile),$$@) 534 $$(QUIET)$$(VBOX_UIC) $(uifile) -i $(uihdr) -o $$@ 713 $$(QUIET)$$(VBOX_UIC4) -impl $(uihdr) $(uifile) -o $$@ 714 715 #$$(QUIET)$$(VBOX_UIC4) $(uifile) -i $(uihdr) -o $$@ 535 716 536 717 $(mocsrc): $(uihdr) | $$(call DIRDEP,$(dir $(mocsrc))) 537 718 $$(call MSG_TOOL,moc,$(target),$(uihdr),$$@) 538 $$(QUIET)$$(VBOX_MOC ) $(uihdr) -o $$@719 $$(QUIET)$$(VBOX_MOC4) $(VBOX_MOCDEF_QT4) $(uihdr) -o $$@ 539 720 540 721 endef … … 558 739 $(qmfile): $(tsfile) | $$(call DIRDEP,$(dir $(qmfile))) 559 740 $$(call MSG_TOOLS,lrelease,$(target),$(tsfile),$$@) 560 $$(QUIET)$$(VBOX_LRELEASE ) -nocompress $(tsfile) -qm $$@741 $$(QUIET)$$(VBOX_LRELEASE4) -nocompress $(tsfile) -qm $$@ 561 742 562 743 endef … … 612 793 # static images imported from VBoxUI.pro as VirtualBox_QT_IMAGES 613 794 614 $(PATH_VirtualBox)/ui/vbox_image_collection.txt: VBoxUI.pro $(VirtualBox_QT_IMAGES)615 $(RM) -f $@616 $(APPEND) -v $@ VirtualBox_QT_IMAGES617 618 $(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $(PATH_VirtualBox)/ui/vbox_image_collection.txt619 $(call MSG_TOOL,uic,VirtualBox,$<,$@)620 $(QUIET)$(VBOX_UIC) -o $@ -embed VBoxGUI -f $<621 622 VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp623 OTHER_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.txt795 #$(PATH_VirtualBox)/ui/vbox_image_collection.txt: VBoxUI.pro $(VirtualBox_QT_IMAGES) 796 # $(RM) -f $@ 797 # $(APPEND) -v $@ VirtualBox_QT_IMAGES 798 # 799 #$(PATH_VirtualBox)/ui/vbox_image_collection.cpp: $(PATH_VirtualBox)/ui/vbox_image_collection.txt 800 # $(call MSG_TOOL,uic,VirtualBox,$<,$@) 801 # $(QUIET)$(VBOX_UIC4) -o $@ -embed VBoxGUI -f $< 802 # 803 #VirtualBox_GENSRCS += $(PATH_VirtualBox)/ui/vbox_image_collection.cpp 804 #OTHER_CLEAN += $(PATH_VirtualBox)/ui/vbox_image_collection.txt 624 805 625 806 … … 650 831 updatenls: $(VirtualBox_SOURCES) $(VirtualBox_HEADERS) 651 832 $(call MSG_L1,lupdate all languages (nls/*.ts)) 652 $(QUIET)$(VBOX_LUPDATE ) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts833 $(QUIET)$(VBOX_LUPDATE4) $^ -ts $(VirtualBox_QT_TRANSLATIONS) nls/VirtualBox_xx_YY.ts 653 834 654 835 -
trunk/src/VBox/Frontends/VirtualBox4/include/COMDefs.h
r7207 r7220 79 79 #include <qstring.h> 80 80 #include <quuid.h> 81 #include <q valuevector.h>81 #include <q3valuevector.h> 82 82 83 83 #include <iprt/memory> // for auto_copy_ptr … … 225 225 226 226 template <typename QT, typename CT> 227 static void ToSafeArray (const Q ValueVector <QT> &aVec, com::SafeArray <CT> &aArr)227 static void ToSafeArray (const Q3ValueVector <QT> &aVec, com::SafeArray <CT> &aArr) 228 228 { 229 229 AssertMsgFailedReturnVoid (("No conversion!\n")); … … 231 231 232 232 template <typename CT, typename QT> 233 static void FromSafeArray (const com::SafeArray <CT> &aArr, Q ValueVector <QT> &aVec)233 static void FromSafeArray (const com::SafeArray <CT> &aArr, Q3ValueVector <QT> &aVec) 234 234 { 235 235 AssertMsgFailedReturnVoid (("No conversion!\n")); … … 237 237 238 238 template <typename QT, typename CT> 239 static void ToSafeArray (const Q ValueVector <QT *> &aVec, com::SafeArray <CT *> &aArr)239 static void ToSafeArray (const Q3ValueVector <QT *> &aVec, com::SafeArray <CT *> &aArr) 240 240 { 241 241 AssertMsgFailedReturnVoid (("No conversion!\n")); … … 243 243 244 244 template <typename CT, typename QT> 245 static void FromSafeArray (const com::SafeArray <CT *> &aArr, Q ValueVector <QT *> &aVec)245 static void FromSafeArray (const com::SafeArray <CT *> &aArr, Q3ValueVector <QT *> &aVec) 246 246 { 247 247 AssertMsgFailedReturnVoid (("No conversion!\n")); … … 251 251 252 252 template <typename T> 253 static void ToSafeArray (const Q ValueVector <T> &aVec, com::SafeArray <T> &aArr)253 static void ToSafeArray (const Q3ValueVector <T> &aVec, com::SafeArray <T> &aArr) 254 254 { 255 255 aArr.reset (aVec.size()); 256 256 size_t i = 0; 257 for (typename Q ValueVector <T>::const_iterator it = aVec.begin();257 for (typename Q3ValueVector <T>::const_iterator it = aVec.begin(); 258 258 it != aVec.end(); ++ it, ++ i) 259 259 aArr [i] = *it; … … 261 261 262 262 template <typename T> 263 static void FromSafeArray (const com::SafeArray <T> &aArr, Q ValueVector <T> &aVec)264 { 265 aVec = Q ValueVector <T> (aArr.size());263 static void FromSafeArray (const com::SafeArray <T> &aArr, Q3ValueVector <T> &aVec) 264 { 265 aVec = Q3ValueVector <T> (aArr.size()); 266 266 size_t i = 0; 267 for (typename Q ValueVector <T>::iterator it = aVec.begin();267 for (typename Q3ValueVector <T>::iterator it = aVec.begin(); 268 268 it != aVec.end(); ++ it, ++ i) 269 269 *it = aArr [i]; … … 272 272 /* Arrays of strings */ 273 273 274 static void ToSafeArray (const Q ValueVector <QString> &aVec,274 static void ToSafeArray (const Q3ValueVector <QString> &aVec, 275 275 com::SafeArray <BSTR> &aArr); 276 276 static void FromSafeArray (const com::SafeArray <BSTR> &aArr, 277 Q ValueVector <QString> &aVec);277 Q3ValueVector <QString> &aVec); 278 278 279 279 /* Arrays of interface pointers. Note: we need a separate pair of names … … 287 287 288 288 template <class CI, class I> 289 static void ToSafeIfaceArray (const Q ValueVector <CI> &aVec,289 static void ToSafeIfaceArray (const Q3ValueVector <CI> &aVec, 290 290 com::SafeIfaceArray <I> &aArr) 291 291 { 292 292 aArr.reset (aVec.size()); 293 293 size_t i = 0; 294 for (typename Q ValueVector <CI>::const_iterator it = aVec.begin();294 for (typename Q3ValueVector <CI>::const_iterator it = aVec.begin(); 295 295 it != aVec.end(); ++ it, ++ i) 296 296 { … … 303 303 template <class I, class CI> 304 304 static void FromSafeIfaceArray (const com::SafeIfaceArray <I> &aArr, 305 Q ValueVector <CI> &aVec)306 { 307 aVec = Q ValueVector <CI> (aArr.size());305 Q3ValueVector <CI> &aVec) 306 { 307 aVec = Q3ValueVector <CI> (aArr.size()); 308 308 size_t i = 0; 309 for (typename Q ValueVector <CI>::iterator it = aVec.begin();309 for (typename Q3ValueVector <CI>::iterator it = aVec.begin(); 310 310 it != aVec.end(); ++ it, ++ i) 311 311 (*it).attach (aArr [i]); -
trunk/src/VBox/Frontends/VirtualBox4/include/COMWrappers.xsl
r7216 r7220 234 234 (//param[@safearray='yes' and not(../@internal='yes') and @type=current()/@name]) 235 235 "> 236 <xsl:text>typedef Q ValueVector <C</xsl:text>236 <xsl:text>typedef Q3ValueVector <C</xsl:text> 237 237 <xsl:value-of select="substring(@name,2)"/> 238 238 <xsl:text>> C</xsl:text> … … 1150 1150 <xsl:otherwise> 1151 1151 <xsl:if test="../@safearray"> 1152 <xsl:text>Q ValueVector <</xsl:text>1152 <xsl:text>Q3ValueVector <</xsl:text> 1153 1153 </xsl:if> 1154 1154 <xsl:choose> … … 1551 1551 <xsl:if test="(name()='attribute' and $isSetter) or 1552 1552 (name()='param' and @dir='in')"> 1553 <!-- convert Q ValueVector to SafeArray -->1553 <!-- convert Q3ValueVector to SafeArray --> 1554 1554 <xsl:choose> 1555 1555 <!-- interface types need special treatment here --> … … 1577 1577 <xsl:if test="(name()='attribute' and not($isSetter)) or 1578 1578 (name()='param' and (@dir='out' or @dir='return'))"> 1579 <!-- convert SafeArray to Q ValueVector -->1579 <!-- convert SafeArray to Q3ValueVector --> 1580 1580 <xsl:choose> 1581 1581 <!-- interface types need special treatment here --> -
trunk/src/VBox/Frontends/VirtualBox4/include/QIHotKeyEdit.h
r5999 r7220 21 21 22 22 #include <qlabel.h> 23 //Added by qt3to4: 24 #include <QPalette> 25 #include <QFocusEvent> 23 26 #if defined(Q_WS_X11) 24 27 #include <qmap.h> … … 61 64 62 65 #if defined (Q_WS_PM) || defined (Q_WS_X11) 63 static void languageChange ();66 static void languageChange_qt3(); 64 67 #endif 65 68 static QString keyName (int aKeyVal); -
trunk/src/VBox/Frontends/VirtualBox4/include/QIMessageBox.h
r5999 r7220 21 21 22 22 #include <qdialog.h> 23 #include <q vbox.h>23 #include <q3vbox.h> 24 24 #include <qmessagebox.h> 25 25 #include <qcheckbox.h> 26 #include <qtextedit.h> 26 #include <q3textedit.h> 27 //Added by qt3to4: 28 #include <QLabel> 27 29 28 30 class QIRichLabel; … … 61 63 Icon aIcon, int aButton0, int aButton1 = 0, int aButton2 = 0, 62 64 QWidget *aParent = 0, const char *aName = 0, bool aModal = TRUE, 63 WFlags aFlags =WStyle_DialogBorder);65 Qt::WFlags aFlags = Qt::WStyle_DialogBorder); 64 66 65 67 QString buttonText (int aButton) const; … … 100 102 QIRichLabel *mTextLabel; 101 103 QPushButton *mButton0PB, *mButton1PB, *mButton2PB; 102 Q VBox *mMessageVBox;104 Q3VBox *mMessageVBox; 103 105 QCheckBox *mFlagCB, *mFlagCB_Main, *mFlagCB_Details; 104 Q VBox *mDetailsVBox;105 Q TextEdit *mDetailsText;106 Q3VBox *mDetailsVBox; 107 Q3TextEdit *mDetailsText; 106 108 QSpacerItem *mSpacer; 107 109 }; -
trunk/src/VBox/Frontends/VirtualBox4/include/QIRichLabel.h
r5999 r7220 24 24 #define __QIRichLabel_h__ 25 25 26 #include "qframe.h" 26 #include "q3frame.h" 27 //Added by qt3to4: 28 #include <Q3Accel> 29 #include <Q3Picture> 30 #include <QPixmap> 31 #include <QResizeEvent> 32 #include <QMouseEvent> 33 #include <QContextMenuEvent> 34 #include <QKeyEvent> 35 #include <Q3PopupMenu> 36 #include <QFocusEvent> 27 37 28 class Q SimpleRichText;38 class Q3SimpleRichText; 29 39 class QLabelPrivate; 30 40 class QAction; 31 class Q PopupMenu;41 class Q3PopupMenu; 32 42 33 class QIRichLabel : public Q Frame43 class QIRichLabel : public Q3Frame 34 44 { 35 45 Q_OBJECT 36 46 Q_PROPERTY( QString text READ text WRITE setText ) 37 Q_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat )47 Q_PROPERTY( Qt::TextFormat textFormat READ textFormat WRITE setTextFormat ) 38 48 Q_PROPERTY( QPixmap pixmap READ pixmap WRITE setPixmap ) 39 49 Q_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents ) 40 Q_PROPERTY(Alignment alignment READ alignment WRITE setAlignment )50 // Q_PROPERTY( Qt::Alignment alignment READ alignment WRITE setAlignment ) 41 51 Q_PROPERTY( int indent READ indent WRITE setIndent ) 42 Q_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true )52 Q_OVERRIDE( Qt::BackgroundMode backgroundMode DESIGNABLE true ) 43 53 44 54 public: 45 QIRichLabel (QWidget *parent, const char* name=0, WFlags f=0);55 QIRichLabel (QWidget *parent, const char* name=0, Qt::WFlags f=0); 46 56 QIRichLabel (const QString &text, QWidget *parent, const char* name=0, 47 WFlags f=0);57 Qt::WFlags f=0); 48 58 QIRichLabel (QWidget *buddy, const QString &, 49 QWidget *parent, const char* name=0, WFlags f=0 );59 QWidget *parent, const char* name=0, Qt::WFlags f=0 ); 50 60 ~QIRichLabel(); 51 61 52 62 QString text() const { return ltext; } 53 63 QPixmap *pixmap() const { return lpixmap; } 54 Q Picture *picture() const { return lpicture; }64 Q3Picture *picture() const { return lpicture; } 55 65 QMovie *movie() const; 56 66 57 TextFormat textFormat() const;58 void setTextFormat( TextFormat );67 Qt::TextFormat textFormat() const; 68 void setTextFormat( Qt::TextFormat ); 59 69 60 70 int alignment() const { return align; } … … 81 91 virtual void setText( const QString &); 82 92 virtual void setPixmap( const QPixmap & ); 83 virtual void setPicture( const Q Picture & );93 virtual void setPicture( const Q3Picture & ); 84 94 virtual void setMovie( const QMovie & ); 85 95 virtual void setNum( int ); … … 120 130 bool mIsMainTip; 121 131 QPixmap *lpixmap; 122 Q Picture *lpicture;132 Q3Picture *lpicture; 123 133 QMovie *lmovie; 124 Q PopupMenu *popupMenu;134 Q3PopupMenu *popupMenu; 125 135 QString popupBuffer; 126 136 QWidget *lbuddy; … … 130 140 uint scaledcontents :1; 131 141 uint baseheight; 132 TextFormat textformat;133 Q Accel *accel;142 Qt::TextFormat textformat; 143 Q3Accel *accel; 134 144 QLabelPrivate *d; 135 Q SimpleRichText *doc;145 Q3SimpleRichText *doc; 136 146 bool mMaxHeightMode; 137 147 -
trunk/src/VBox/Frontends/VirtualBox4/include/QIStateIndicator.h
r5999 r7220 20 20 #define __QIStateIndicator_h__ 21 21 22 #include <q frame.h>22 #include <q3frame.h> 23 23 #include <qpixmap.h> 24 24 25 #include <qintdict.h> 25 #include <q3intdict.h> 26 //Added by qt3to4: 27 #include <QMouseEvent> 28 #include <QContextMenuEvent> 26 29 27 class QIStateIndicator : public Q Frame30 class QIStateIndicator : public Q3Frame 28 31 { 29 32 Q_OBJECT … … 33 36 QIStateIndicator (int aState, 34 37 QWidget *aParent, const char *aName = 0, 35 WFlags aFlags = 0);38 Qt::WFlags aFlags = 0); 36 39 37 40 virtual QSize sizeHint() const; … … 82 85 }; 83 86 84 Q IntDict <Icon> mStateIcons;87 Q3IntDict <Icon> mStateIcons; 85 88 }; 86 89 -
trunk/src/VBox/Frontends/VirtualBox4/include/QIStatusBar.h
r5999 r7220 21 21 22 22 #include <qstatusbar.h> 23 //Added by qt3to4: 24 #include <QPaintEvent> 23 25 24 26 class QPaintEvent; -
trunk/src/VBox/Frontends/VirtualBox4/include/QIWidgetValidator.h
r5999 r7220 24 24 #include <qobject.h> 25 25 #include <qvalidator.h> 26 #include <q valuelist.h>26 #include <q3valuelist.h> 27 27 28 28 class QIWidgetValidator : public QObject … … 74 74 }; 75 75 76 Q ValueList <Watched> mWatched;76 Q3ValueList <Watched> mWatched; 77 77 Watched mLastInvalid; 78 78 … … 87 87 88 88 QIULongValidator (QObject *aParent, const char *aName = 0) 89 : QValidator (aParent , aName)89 : QValidator (aParent) 90 90 , mBottom (0), mTop (ULONG_MAX) {} 91 91 92 92 QIULongValidator (ulong aMinimum, ulong aMaximum, 93 93 QObject *aParent, const char *aName = 0) 94 : QValidator (aParent , aName)94 : QValidator (aParent) 95 95 , mBottom (aMinimum), mTop (aMaximum) {} 96 96 -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxAquaStyle.h
r5999 r7220 21 21 22 22 #include <qstyle.h> 23 //Added by qt3to4: 24 #include <QPixmap> 25 #include <Q3PopupMenu> 23 26 24 27 /** … … 46 49 virtual void unPolish( QApplication *app ); 47 50 virtual void polish( QPalette &p ); 48 virtual void polishPopupMenu( Q PopupMenu *m );51 virtual void polishPopupMenu( Q3PopupMenu *m ); 49 52 virtual QRect itemRect( QPainter *p, const QRect &r, int flags, bool enabled, const QPixmap *pixmap, 50 53 const QString &text, int len = -1 ) const; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h
r7207 r7220 26 26 27 27 #include <qdatetime.h> 28 #include <q scrollview.h>28 #include <q3scrollview.h> 29 29 #include <qpixmap.h> 30 30 #include <qimage.h> 31 31 32 32 #include <qkeysequence.h> 33 //Added by qt3to4: 34 #include <QTimerEvent> 35 #include <QPaintEvent> 36 #include <QLabel> 37 #include <QEvent> 33 38 34 39 #if defined (Q_WS_PM) … … 52 57 class QMenuData; 53 58 54 class VBoxConsoleView : public Q ScrollView59 class VBoxConsoleView : public Q3ScrollView 55 60 { 56 61 Q_OBJECT … … 70 75 const CConsole &console, 71 76 VBoxDefs::RenderMode rm, 72 QWidget *parent = 0, const char *name = 0, WFlags f = 0);77 QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0); 73 78 ~VBoxConsoleView(); 74 79 … … 144 149 wchar_t *aUniKey = NULL); 145 150 bool mouseEvent (int aType, const QPoint &aPos, const QPoint &aGlobalPos, 146 ButtonState aButton,147 ButtonState aState,ButtonState aStateAfter,148 int aWheelDelta, Orientation aWheelDir);151 Qt::ButtonState aButton, 152 Qt::ButtonState aState, Qt::ButtonState aStateAfter, 153 int aWheelDelta, Qt::Orientation aWheelDir); 149 154 150 155 void emitKeyboardStateChanged() -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
r7207 r7220 22 22 #include "COMDefs.h" 23 23 24 #include <q mainwindow.h>24 #include <q3mainwindow.h> 25 25 26 26 #include <qmap.h> 27 #include <qobject list.h>27 #include <qobject.h> 28 28 #include <qcolor.h> 29 29 #include <qdialog.h> 30 //Added by qt3to4: 31 #include <QContextMenuEvent> 32 #include <QLabel> 33 #include <Q3PopupMenu> 34 #include <QEvent> 35 #include <Q3ActionGroup> 36 #include <QShowEvent> 37 #include <QCloseEvent> 30 38 31 39 #ifdef VBOX_WITH_DEBUGGER_GUI … … 39 47 40 48 class QAction; 41 class Q ActionGroup;42 class Q HBox;49 class Q3ActionGroup; 50 class Q3HBox; 43 51 class QLabel; 44 52 class QSpacerItem; … … 50 58 class VBoxSwitchMenu; 51 59 52 class VBoxConsoleWnd : public Q MainWindow60 class VBoxConsoleWnd : public Q3MainWindow 53 61 { 54 62 Q_OBJECT … … 58 66 VBoxConsoleWnd (VBoxConsoleWnd **aSelf, 59 67 QWidget* aParent = 0, const char* aName = 0, 60 WFlags aFlags =WType_TopLevel);68 Qt::WFlags aFlags = Qt::WType_TopLevel); 61 69 virtual ~VBoxConsoleWnd(); 62 70 … … 194 202 195 203 /** Popup version of the main menu */ 196 Q PopupMenu *mMainMenu;197 198 Q ActionGroup *mRunningActions;199 Q ActionGroup *mRunningOrPausedActions;204 Q3PopupMenu *mMainMenu; 205 206 Q3ActionGroup *mRunningActions; 207 Q3ActionGroup *mRunningOrPausedActions; 200 208 201 209 // Machine actions … … 243 251 244 252 // Devices popup menus 245 Q PopupMenu *devicesMenu;246 Q PopupMenu *devicesMountFloppyMenu;247 Q PopupMenu *devicesMountDVDMenu;248 Q PopupMenu *devicesSFMenu;249 Q PopupMenu *devicesNetworkMenu;253 Q3PopupMenu *devicesMenu; 254 Q3PopupMenu *devicesMountFloppyMenu; 255 Q3PopupMenu *devicesMountDVDMenu; 256 Q3PopupMenu *devicesSFMenu; 257 Q3PopupMenu *devicesNetworkMenu; 250 258 VBoxUSBMenu *devicesUSBMenu; 251 259 VBoxSwitchMenu *devicesVRDPMenu; … … 266 274 #ifdef VBOX_WITH_DEBUGGER_GUI 267 275 // Debugger popup menu 268 Q PopupMenu *dbgMenu;276 Q3PopupMenu *dbgMenu; 269 277 #endif 270 278 … … 291 299 QIStateIndicator *autoresize_state; 292 300 QIStateIndicator *vrdp_state; 293 Q HBox *hostkey_hbox;301 Q3HBox *hostkey_hbox; 294 302 QLabel *hostkey_name; 295 303 -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDownloaderWgt.h
r5999 r7220 22 22 #include "HappyHttp.h" 23 23 #include "qwidget.h" 24 #include "q url.h"24 #include "q3url.h" 25 25 #include "qmutex.h" 26 //Added by qt3to4: 27 #include <QEvent> 26 28 class QStatusBar; 27 29 class QAction; 28 class Q ProgressBar;30 class Q3ProgressBar; 29 31 class QToolButton; 30 32 class QThread; … … 86 88 void abortConnection(); 87 89 88 Q Url mUrl;90 Q3Url mUrl; 89 91 QString mTarget; 90 92 QStatusBar *mStatusBar; 91 93 QAction *mAction; 92 Q ProgressBar *mProgressBar;94 Q3ProgressBar *mProgressBar; 93 95 QToolButton *mCancelButton; 94 96 bool mIsChecking; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFrameBuffer.h
r6794 r7220 21 21 22 22 #include "COMDefs.h" 23 //Added by qt3to4: 24 #include <QMoveEvent> 25 #include <QPaintEvent> 23 26 24 27 class VBoxConsoleView; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h
r7207 r7220 26 26 #include <qapplication.h> 27 27 #include <qpixmap.h> 28 #include <qicon set.h>28 #include <qicon.h> 29 29 #include <qcolor.h> 30 30 #include <quuid.h> 31 31 #include <qthread.h> 32 #include <q popupmenu.h>32 #include <q3popupmenu.h> 33 33 #include <qtooltip.h> 34 34 35 #include <qptrvector.h> 36 #include <qvaluevector.h> 37 #include <qvaluelist.h> 38 #include <qdict.h> 39 #include <qintdict.h> 35 #include <q3ptrvector.h> 36 #include <q3valuevector.h> 37 #include <q3valuelist.h> 38 #include <q3dict.h> 39 #include <q3intdict.h> 40 //Added by qt3to4: 41 #include <QLabel> 42 #include <QEvent> 40 43 41 44 class QAction; … … 61 64 }; 62 65 63 typedef Q ValueList <VBoxMedia> VBoxMediaList;66 typedef Q3ValueList <VBoxMedia> VBoxMediaList; 64 67 65 68 // VirtualBox callback events … … 477 480 static void loadLanguage (const QString &aLangId = QString::null); 478 481 479 static QIcon SeticonSet (const char *aNormal,482 static QIcon iconSet (const char *aNormal, 480 483 const char *aDisabled = 0, 481 484 const char *aActive = 0); 482 static QIcon SeticonSetEx (const char *aNormal, const char *aSmallNormal,485 static QIcon iconSetEx (const char *aNormal, const char *aSmallNormal, 483 486 const char *aDisabled = 0, const char *aSmallDisabled = 0, 484 487 const char *aActive = 0, const char *aSmallActive = 0); … … 615 618 CVirtualBoxCallback callback; 616 619 617 typedef Q ValueVector <QString> QStringVector;620 typedef Q3ValueVector <QString> QStringVector; 618 621 619 622 QString verString; 620 623 621 Q ValueVector <CGuestOSType> vm_os_types;622 Q Dict <QPixmap> vm_os_type_icons;623 Q PtrVector <QColor> vm_state_color;624 625 Q IntDict <QPixmap> mStateIcons;624 Q3ValueVector <CGuestOSType> vm_os_types; 625 Q3Dict <QPixmap> vm_os_type_icons; 626 Q3PtrVector <QColor> vm_state_color; 627 628 Q3IntDict <QPixmap> mStateIcons; 626 629 QPixmap mOfflineSnapshotIcon, mOnlineSnapshotIcon; 627 630 … … 695 698 * This class provides the list of USB devices attached to the host. 696 699 */ 697 class VBoxUSBMenu : public Q PopupMenu700 class VBoxUSBMenu : public Q3PopupMenu 698 701 { 699 702 Q_OBJECT … … 726 729 * This class provides enable/disable menu items. 727 730 */ 728 class VBoxSwitchMenu : public Q PopupMenu731 class VBoxSwitchMenu : public Q3PopupMenu 729 732 { 730 733 Q_OBJECT -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxMediaComboBox.h
r5999 r7220 23 23 24 24 #include <qcombobox.h> 25 //Added by qt3to4: 26 #include <QPixmap> 25 27 26 class Q ListBoxItem;28 class Q3ListBoxItem; 27 29 28 30 class VBoxMediaComboBox : public QComboBox … … 51 53 void mediaUpdated (const VBoxMedia &); 52 54 void mediaRemoved (VBoxDefs::DiskType, const QUuid &); 53 void processOnItem (Q ListBoxItem *);55 void processOnItem (Q3ListBoxItem *); 54 56 void processActivated (int); 55 57 -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxNetworkFramework.h
r5999 r7220 23 23 #include <qobject.h> 24 24 #include <qthread.h> 25 //Added by qt3to4: 26 #include <QEvent> 27 #include <QDataStream> 25 28 typedef happyhttp::Connection HConnect; 26 29 … … 36 39 37 40 VBoxNetworkFramework() 38 : mDataStream ( mDataArray, IO_ReadWrite)41 : mDataStream (&mDataArray, QIODevice::ReadWrite) 39 42 , mNetworkThread (0) {} 40 43 -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxProblemReporter.h
r7207 r7220 25 25 #include <qobject.h> 26 26 27 class Q Process;27 class Q3Process; 28 28 29 29 class VBoxProblemReporter : public QObject -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h
r6932 r7220 25 25 26 26 #include <qapplication.h> 27 #include <q mainwindow.h>28 #include <q listbox.h>29 #include <q groupbox.h>27 #include <q3mainwindow.h> 28 #include <q3listbox.h> 29 #include <q3groupbox.h> 30 30 #include <qaction.h> 31 31 32 #include <qvaluelist.h> 32 #include <q3valuelist.h> 33 //Added by qt3to4: 34 #include <QEvent> 35 #include <QLabel> 36 #include <Q3PopupMenu> 33 37 34 38 class VBoxVMListBox; … … 39 43 40 44 class QLabel; 41 class Q TextBrowser;45 class Q3TextBrowser; 42 46 class QTabWidget; 43 47 struct QUuid; 44 48 45 class VBoxSelectorWnd : public Q MainWindow49 class VBoxSelectorWnd : public Q3MainWindow 46 50 { 47 51 Q_OBJECT … … 51 55 VBoxSelectorWnd (VBoxSelectorWnd **aSelf, 52 56 QWidget* aParent = 0, const char* aName = 0, 53 WFlags aFlags =WType_TopLevel);57 Qt::WFlags aFlags = Qt::WType_TopLevel); 54 58 virtual ~VBoxSelectorWnd(); 55 59 … … 77 81 bool aDescription); 78 82 79 void showContextMenu (Q ListBoxItem *, const QPoint &);83 void showContextMenu (Q3ListBoxItem *, const QPoint &); 80 84 81 85 protected: … … 110 114 111 115 /** VM list context menu */ 112 Q PopupMenu *mVMCtxtMenu;116 Q3PopupMenu *mVMCtxtMenu; 113 117 114 118 /* actions */ … … 137 141 VBoxVMDescriptionPage *vmDescriptionPage; 138 142 139 Q ValueList <CSession> sessions;143 Q3ValueList <CSession> sessions; 140 144 141 145 QPoint normal_pos; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h
r5999 r7220 20 20 #define __VBoxToolBar_h__ 21 21 22 #include <q toolbar.h>22 #include <q3toolbar.h> 23 23 #include <qtoolbutton.h> 24 #include <qmainwindow.h> 25 #include <qobjectlist.h> 24 #include <q3mainwindow.h> 25 #include <qobject.h> 26 //Added by qt3to4: 27 #include <QContextMenuEvent> 26 28 #ifdef Q_WS_MAC 27 29 # include "VBoxAquaStyle.h" … … 32 34 * its built-in context menu and add some default behavior we need. 33 35 */ 34 class VBoxToolBar : public Q ToolBar36 class VBoxToolBar : public Q3ToolBar 35 37 { 36 38 public: 37 39 38 VBoxToolBar (Q MainWindow *mainWindow, QWidget *parent, const char *name)39 : Q ToolBar (QString::null, mainWindow, parent, FALSE, name)40 VBoxToolBar (Q3MainWindow *mainWindow, QWidget *parent, const char *name) 41 : Q3ToolBar (QString::null, mainWindow, parent, FALSE, name) 40 42 { 41 43 setResizeEnabled (false); … … 56 58 else 57 59 { 58 QObjectList *list = queryList ("QToolButton"); 59 QObjectListIt it (*list); 60 QObjectList list = queryList ("QToolButton"); 60 61 QObject *obj; 61 while ((obj = it.current()) != 0)62 foreach(obj, list) 62 63 { 63 QToolButton *btn = ::qt_cast<QToolButton *> (obj);64 QToolButton *btn = qobject_cast<QToolButton *> (obj); 64 65 btn->setUsesBigPixmap (enable); 65 ++ it;66 66 } 67 delete list;68 67 } 69 68 } … … 75 74 else 76 75 { 77 QObjectList *list = queryList ("QToolButton"); 78 QObjectListIt it (*list); 76 QObjectList list = queryList ("QToolButton"); 79 77 QObject *obj; 80 while ((obj = it.current()) != 0)78 foreach(obj, list) 81 79 { 82 QToolButton *btn = ::qt_cast<QToolButton *> (obj);80 QToolButton *btn = qobject_cast<QToolButton *> (obj); 83 81 btn->setUsesTextLabel (enable); 84 ++ it;85 82 } 86 delete list;87 83 } 88 84 } -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxUtils.h
r6812 r7220 22 22 #include <qobject.h> 23 23 #include <qevent.h> 24 #include <q listview.h>25 #include <q textedit.h>24 #include <q3listview.h> 25 #include <q3textedit.h> 26 26 #include <qlabel.h> 27 27 #include <qlayout.h> 28 //Added by qt3to4: 29 #include <QPixmap> 30 #include <QResizeEvent> 31 #include <QMouseEvent> 32 #include <QKeyEvent> 28 33 29 34 /** … … 36 41 public: 37 42 38 QIListViewSelectionPreserver (QObject *parent, Q ListView *alv)43 QIListViewSelectionPreserver (QObject *parent, Q3ListView *alv) 39 44 : QObject (parent), lv (alv) 40 45 { … … 60 65 private: 61 66 62 Q ListView *lv;67 Q3ListView *lv; 63 68 }; 64 69 … … 72 77 public: 73 78 74 QIKeyFilter (QObject *aParent, Key aKey) : QObject (aParent), mKey (aKey) {}79 QIKeyFilter (QObject *aParent, Qt::Key aKey) : QObject (aParent), mKey (aKey) {} 75 80 76 81 void watchOn (QObject *o) { o->installEventFilter (this); } … … 94 99 } 95 100 96 Key mKey;101 Qt::Key mKey; 97 102 }; 98 103 … … 171 176 * for getting more compact layout. 172 177 */ 173 class QITextEdit : public Q TextEdit178 class QITextEdit : public Q3TextEdit 174 179 { 175 180 Q_OBJECT … … 178 183 179 184 QITextEdit (QWidget *aParent) 180 : Q TextEdit (aParent) {}185 : Q3TextEdit (aParent) {} 181 186 182 187 QSize sizeHint() const … … 210 215 0, 0, 211 216 sizePolicy().hasHeightForWidth())); 212 setAlignment (int (Q Label::WordBreak | QLabel::AlignTop));217 setAlignment (int (Qt::AlignTop)); 213 218 /* install show-parent-widget watcher */ 214 219 aParent->topLevelWidget()->installEventFilter (this); -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMListBox.h
r7207 r7220 25 25 #include "VBoxGlobal.h" 26 26 27 #include <q listbox.h>27 #include <q3listbox.h> 28 28 #include <qfont.h> 29 29 #include <qdatetime.h> 30 //Added by qt3to4: 31 #include <QFocusEvent> 30 32 31 33 struct QUuid; … … 43 45 * class. 44 46 */ 45 class VBoxVMListBox : public Q ListBox47 class VBoxVMListBox : public Q3ListBox 46 48 { 47 49 Q_OBJECT … … 50 52 51 53 VBoxVMListBox (QWidget *aParent = 0, const char *aName = NULL, 52 WFlags aFlags = 0);54 Qt::WFlags aFlags = 0); 53 55 54 56 virtual ~VBoxVMListBox(); … … 97 99 * get an access to various VM data. 98 100 */ 99 class VBoxVMListBoxItem : public Q ListBoxItem101 class VBoxVMListBoxItem : public Q3ListBoxItem 100 102 { 101 103 public: … … 118 120 QString toolTipText() const; 119 121 120 int height (const Q ListBox *) const;121 int width (const Q ListBox *) const;122 int height (const Q3ListBox *) const; 123 int width (const Q3ListBox *) const; 122 124 123 125 QUuid id() const { return mId; } -
trunk/src/VBox/Frontends/VirtualBox4/src/COMDefs.cpp
r6851 r7220 183 183 184 184 /* static */ 185 void COMBase::ToSafeArray (const Q ValueVector <QString> &aVec,185 void COMBase::ToSafeArray (const Q3ValueVector <QString> &aVec, 186 186 com::SafeArray <BSTR> &aArr) 187 187 { 188 188 aArr.reset (aVec.size()); 189 189 size_t i = 0; 190 for (Q ValueVector <QString>::const_iterator it = aVec.begin();190 for (Q3ValueVector <QString>::const_iterator it = aVec.begin(); 191 191 it != aVec.end(); ++ it, ++ i) 192 192 aArr [i] = SysAllocString ((const OLECHAR *) (*it).ucs2()); … … 195 195 /* static */ 196 196 void COMBase::FromSafeArray (const com::SafeArray <BSTR> &aArr, 197 Q ValueVector <QString> &aVec)198 { 199 aVec = Q ValueVector <QString> (aArr.size());197 Q3ValueVector <QString> &aVec) 198 { 199 aVec = Q3ValueVector <QString> (aArr.size()); 200 200 size_t i = 0; 201 for (Q ValueVector <QString>::iterator it = aVec.begin();201 for (Q3ValueVector <QString>::iterator it = aVec.begin(); 202 202 it != aVec.end(); ++ it, ++ i) 203 203 *it = QString::fromUcs2 (aArr [i]); -
trunk/src/VBox/Frontends/VirtualBox4/src/QIHotKeyEdit.cpp
r5999 r7220 18 18 19 19 #include "QIHotKeyEdit.h" 20 //Added by qt3to4: 21 #include <QLabel> 22 #include <QFocusEvent> 20 23 21 24 #include "VBoxDefs.h" … … 114 117 clear(); 115 118 116 setFrameStyle ( LineEditPanel | Sunken);117 setAlignment ( AlignHCenter |AlignBottom);118 setFocusPolicy ( StrongFocus);119 setFrameStyle (QFrame::StyledPanel | Sunken); 120 setAlignment (Qt::AlignHCenter | Qt::AlignBottom); 121 setFocusPolicy (Qt::StrongFocus); 119 122 120 123 QPalette p = palette(); … … 203 206 int w = fm.width( 'x' ) * 17; // "some" 204 207 int m = frameWidth() * 2; 205 return (style().sizeFromContents (QStyle::CT_LineEdit, this, 206 QSize (w + m, h + m) 207 .expandedTo(QApplication::globalStrut()))); 208 #warning port me 209 // return (style()->sizeFromContents (QStyle::CT_LineEdit, this, 210 // QSize (w + m, h + m) 211 // .expandedTo(QApplication::globalStrut()))); 212 QSize(10,10); 208 213 } 209 214 … … 278 283 */ 279 284 /* static */ 280 void QIHotKeyEdit::languageChange ()285 void QIHotKeyEdit::languageChange_qt3() 281 286 { 282 287 /* Note: strings for the same key must match strings in languageChange() … … 333 338 */ 334 339 /* static */ 335 void QIHotKeyEdit::languageChange ()340 void QIHotKeyEdit::languageChange_qt3() 336 341 { 337 342 /* Note: strings for the same key must match strings in languageChange() … … 726 731 void QIHotKeyEdit::drawContents (QPainter * p) 727 732 { 728 QLabel::drawContents (p); 729 if (hasFocus()) 730 { 731 style().drawPrimitive ( 732 QStyle::PE_FocusRect, p, contentsRect(), colorGroup(), 733 QStyle::Style_Default, 734 QStyleOption( colorGroup().background())); 735 } 733 #warning port me 734 // QLabel::drawContents (p); 735 // if (hasFocus()) 736 // { 737 // style().drawPrimitive ( 738 // QStyle::PE_FocusRect, p, contentsRect(), colorGroup(), 739 // QStyle::State_None, 740 // QStyleOption( colorGroup().background())); 741 // } 736 742 } 737 743 -
trunk/src/VBox/Frontends/VirtualBox4/src/QIMessageBox.cpp
r5999 r7220 18 18 19 19 #include "QIMessageBox.h" 20 //Added by qt3to4: 21 #include <Q3HBoxLayout> 22 #include <q3mimefactory.h> 23 #include <Q3VBoxLayout> 20 24 #include "VBoxDefs.h" 21 25 #include "QIRichLabel.h" … … 24 28 #include <qlabel.h> 25 29 #include <qpushbutton.h> 26 #include <q hbox.h>30 #include <q3hbox.h> 27 31 #include <qlayout.h> 28 32 … … 45 49 Icon aIcon, int aButton0, int aButton1, int aButton2, 46 50 QWidget *aParent, const char *aName, bool aModal, 47 WFlags aFlags)51 Qt::WFlags aFlags) 48 52 : QDialog (aParent, aName, aModal, 49 aFlags | WStyle_Customize |WStyle_NormalBorder |50 WStyle_Title |WStyle_SysMenu)53 aFlags | Qt::WStyle_Customize | Qt::WStyle_NormalBorder | 54 Qt::WStyle_Title | Qt::WStyle_SysMenu) 51 55 { 52 56 setCaption (aCaption); … … 56 60 mButton2 = aButton2; 57 61 58 Q VBoxLayout *layout = new QVBoxLayout (this);62 Q3VBoxLayout *layout = new Q3VBoxLayout (this); 59 63 /* setAutoAdd() behavior is really poor (it messes up with the order 60 64 * of widgets), never use it: layout->setAutoAdd (true); */ 61 65 layout->setMargin (11); 62 66 layout->setSpacing (10); 63 layout->setResizeMode (QLayout:: Minimum);64 65 Q HBox *main = new QHBox (this);67 layout->setResizeMode (QLayout::SetMinimumSize); 68 69 Q3HBox *main = new Q3HBox (this); 66 70 main->setMargin (0); 67 71 main->setSpacing (10); … … 72 76 mIconLabel->setPixmap (QMessageBox::standardIcon ((QMessageBox::Icon) aIcon)); 73 77 else if (aIcon == GuruMeditation) 74 mIconLabel->setPixmap ( QPixmap::fromMimeSource ("meditation_32px.png"));78 mIconLabel->setPixmap (qPixmapFromMimeSource ("meditation_32px.png")); 75 79 mIconLabel->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum); 76 mIconLabel->setAlignment ( AlignHCenter |AlignTop);77 78 mMessageVBox = new Q VBox (main);80 mIconLabel->setAlignment (Qt::AlignHCenter | Qt::AlignTop); 81 82 mMessageVBox = new Q3VBox (main); 79 83 mMessageVBox->setMargin (0); 80 84 mMessageVBox->setSpacing (10); 81 85 82 86 mTextLabel = new QIRichLabel (aText, mMessageVBox); 83 mTextLabel->setAlignment ( AlignAuto | AlignTop | ExpandTabs | WordBreak);87 mTextLabel->setAlignment (Qt::AlignLeft | Qt::AlignTop | Qt::TextExpandTabs | Qt::TextWordWrap); 84 88 mTextLabel->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred, true); 85 89 mTextLabel->setMinimumWidth (mTextLabel->sizeHint().width()); … … 88 92 mFlagCB_Main->hide(); 89 93 90 mDetailsVBox = new Q VBox (this);94 mDetailsVBox = new Q3VBox (this); 91 95 mDetailsVBox->setMargin (0); 92 96 mDetailsVBox->setSpacing (10); 93 97 layout->addWidget (mDetailsVBox); 94 98 95 mDetailsText = new Q TextEdit (mDetailsVBox);99 mDetailsText = new Q3TextEdit (mDetailsVBox); 96 100 { 97 101 /* calculate the minimum size dynamically, approx. for 40 chars and … … 101 105 } 102 106 mDetailsText->setReadOnly (true); 103 mDetailsText->setWrapPolicy (Q TextEdit::AtWordOrDocumentBoundary);107 mDetailsText->setWrapPolicy (Q3TextEdit::AtWordOrDocumentBoundary); 104 108 mDetailsText->setSizePolicy (QSizePolicy::Expanding, 105 109 QSizePolicy::MinimumExpanding); … … 111 115 layout->addItem (mSpacer); 112 116 113 Q HBoxLayout *buttons = new QHBoxLayout (new QWidget (this));117 Q3HBoxLayout *buttons = new Q3HBoxLayout (new QWidget (this)); 114 118 layout->addWidget (buttons->mainWidget()); 115 119 buttons->setAutoAdd (true); … … 128 132 connect (mButton2PB, SIGNAL (clicked()), SLOT (done2())); 129 133 130 buttons->setAlignment ( AlignHCenter);134 buttons->setAlignment (Qt::AlignHCenter); 131 135 132 136 /* this call is a must -- it initializes mFlagCB and mSpacer */ -
trunk/src/VBox/Frontends/VirtualBox4/src/QIRichLabel.cpp
r5999 r7220 24 24 25 25 #include <qpainter.h> 26 #include <q accel.h>26 #include <q3accel.h> 27 27 #include <qmovie.h> 28 28 #include <qimage.h> 29 #include <q picture.h>29 #include <q3picture.h> 30 30 #include <qapplication.h> 31 #include <q simplerichtext.h>32 #include <q stylesheet.h>31 #include <q3simplerichtext.h> 32 #include <q3stylesheet.h> 33 33 #include <qstyle.h> 34 34 #include <qregexp.h> 35 #include <qfocusdata.h>35 //#include <qfocusdata.h> 36 36 #include <qtooltip.h> 37 #include <q popupmenu.h>37 #include <q3popupmenu.h> 38 38 #include <qaction.h> 39 39 #include <qclipboard.h> 40 40 #include <qcursor.h> 41 //Added by qt3to4: 42 #include <QContextMenuEvent> 43 #include <QKeyEvent> 44 #include <QPixmap> 45 #include <QBitmap> 46 #include <Q3Frame> 47 #include <QResizeEvent> 48 #include <QFocusEvent> 49 #include <QMouseEvent> 41 50 42 51 class QLabelPrivate … … 54 63 55 64 56 QIRichLabel::QIRichLabel (QWidget *parent, const char *name, WFlags f)57 : Q Frame (parent, name, f |WMouseNoMask)65 QIRichLabel::QIRichLabel (QWidget *parent, const char *name, Qt::WFlags f) 66 : Q3Frame (parent, name, f | Qt::WMouseNoMask) 58 67 { 59 68 init(); … … 62 71 63 72 QIRichLabel::QIRichLabel (const QString &text, QWidget *parent, const char *name, 64 WFlags f)65 : Q Frame (parent, name, f |WMouseNoMask)73 Qt::WFlags f) 74 : Q3Frame (parent, name, f | Qt::WMouseNoMask) 66 75 { 67 76 init(); … … 71 80 72 81 QIRichLabel::QIRichLabel (QWidget *buddy, const QString &text, 73 QWidget *parent, const char *name, WFlags f)74 : Q Frame (parent, name, f |WMouseNoMask)82 QWidget *parent, const char *name, Qt::WFlags f) 83 : Q3Frame (parent, name, f | Qt::WMouseNoMask) 75 84 { 76 85 init(); … … 98 107 lpixmap = 0; 99 108 lpicture = 0; 100 align = AlignAuto | AlignVCenter |ExpandTabs;109 align = Qt::AlignLeft | Qt::AlignVCenter | Qt::TextExpandTabs; 101 110 extraMargin = -1; 102 111 autoresize = FALSE; … … 112 121 copyAction->setMenuText (tr ("Copy to clipboard")); 113 122 114 popupMenu = new Q PopupMenu (this, "contextMenu");123 popupMenu = new Q3PopupMenu (this, "contextMenu"); 115 124 copyAction->addTo (popupMenu); 116 125 … … 122 131 { 123 132 baseheight = aHeight; 124 Q Frame::setFixedHeight (baseheight);133 Q3Frame::setFixedHeight (baseheight); 125 134 } 126 135 … … 136 145 ltext = text; 137 146 138 bool useRichText = (textformat == RichText ||139 ((textformat == AutoText) && QStyleSheet::mightBeRichText (ltext)));147 bool useRichText = (textformat == Qt::RichText || 148 ((textformat == Qt::AutoText) && Q3StyleSheet::mightBeRichText (ltext))); 140 149 141 150 // ### Setting accelerators for rich text labels will not work. … … 143 152 // not intended. 144 153 if (!useRichText) { 145 int p = Q Accel::shortcutKey (ltext);154 int p = Q3Accel::shortcutKey (ltext); 146 155 if (p) { 147 156 if (!accel) 148 accel = new Q Accel (this, "accel label accel");157 accel = new Q3Accel (this, "accel label accel"); 149 158 accel->connectItem (accel->insertItem (p), 150 159 this, SLOT (acceleratorSlot())); … … 154 163 if (useRichText) { 155 164 if (!hadRichtext) 156 align |= WordBreak;165 align |= Qt::TextWordWrap; 157 166 QString t = ltext; 158 if (align & AlignRight)167 if (align & Qt::AlignRight) 159 168 t.prepend ("<div align=\"right\">"); 160 else if (align & AlignHCenter)169 else if (align & Qt::AlignHCenter) 161 170 t.prepend ("<div align=\"center\">"); 162 if ((align & WordBreak) == 0)171 if ((align & Qt::TextWordWrap) == 0) 163 172 t.prepend ("<nobr>"); 164 doc = new Q SimpleRichText (compressText(0), font());173 doc = new Q3SimpleRichText (compressText(0), font()); 165 174 } 166 175 … … 170 179 { 171 180 baseheight = heightForWidth (width()); 172 Q Frame::setFixedHeight (baseheight);181 Q3Frame::setFixedHeight (baseheight); 173 182 } 174 183 } … … 197 206 198 207 199 void QIRichLabel::setPicture (const Q Picture &picture)208 void QIRichLabel::setPicture (const Q3Picture &picture) 200 209 { 201 210 QSize osh = sizeHint(); 202 211 clearContents(); 203 lpicture = new Q Picture (picture);212 lpicture = new Q3Picture (picture); 204 213 205 214 updateLabel (osh); … … 230 239 231 240 if (lbuddy) 232 align = alignment | ShowPrefix;241 align = alignment | Qt::TextShowMnemonic; 233 242 else 234 243 align = alignment; … … 271 280 QRect br; 272 281 QPixmap *pix = pixmap(); 273 Q Picture *pic = picture();282 Q3Picture *pic = picture(); 274 283 QMovie *mov = movie(); 275 284 … … 283 292 m = xw / 2 - margin(); 284 293 if (m >= 0) { 285 int horizAlign = QApplication::horizontalAlignment(align );286 if ((horizAlign & AlignLeft) || (horizAlign &AlignRight))294 Qt::Alignment horizAlign = QApplication::horizontalAlignment( (Qt::Alignment)align ); 295 if ((horizAlign & Qt::AlignLeft) || (horizAlign & Qt::AlignRight)) 287 296 hextra += m; 288 if ((align & AlignTop) || (align &AlignBottom))297 if ((align & Qt::AlignTop) || (align & Qt::AlignBottom)) 289 298 vextra += m; 290 299 } … … 299 308 else if (doc) { 300 309 int oldW = doc->width(); 301 if ( align & WordBreak) {310 if ( align & Qt::TextWordWrap ) { 302 311 if (w < 0) 303 312 doc->adjustSize(); … … 309 318 } 310 319 else { 311 bool tryWidth = (w < 0) && (align & WordBreak);320 bool tryWidth = (w < 0) && (align & Qt::TextWordWrap); 312 321 if (tryWidth) 313 322 w = xw * 80; … … 332 341 if ( 333 342 doc || 334 (align & WordBreak))343 (align & Qt::TextWordWrap)) 335 344 return sizeForWidth (w).height(); 336 345 return QWidget::heightForWidth(w); … … 358 367 if ( 359 368 !doc && 360 (align & WordBreak) == 0) {369 (align & Qt::TextWordWrap) == 0) { 361 370 sz = d->sh; 362 371 } else { … … 385 394 if (mIsMainTip) 386 395 { 387 mTipText = QToolTip::textFor (this); 396 #warning port me 397 // mTipText = QToolTip::textFor (this); 388 398 QToolTip::remove (this); 389 399 QToolTip::add (this, link); … … 411 421 QString link = doc->anchorAt (aEvent->pos()); 412 422 /* Check for mouse left button clicked on the link */ 413 if (!link.isEmpty() && aEvent->button() == LeftButton)423 if (!link.isEmpty() && aEvent->button() == Qt::LeftButton) 414 424 emit clickedOnLink (link); 415 425 } … … 418 428 void QIRichLabel::resizeEvent (QResizeEvent *e) 419 429 { 420 Q Frame::resizeEvent (e);430 Q3Frame::resizeEvent (e); 421 431 422 432 static const bool doc = FALSE; 423 433 424 434 // optimize for standard labels 425 if (frameShape() == NoFrame && (align & WordBreak) == 0 && !doc && 426 (e->oldSize().width() >= e->size().width() && (align & AlignLeft) == AlignLeft) 427 && (e->oldSize().height() >= e->size().height() && (align & AlignTop) == AlignTop)) { 428 setWFlags (WResizeNoErase); 435 if (frameShape() == NoFrame && (align & Qt::TextWordWrap) == 0 && !doc && 436 (e->oldSize().width() >= e->size().width() && (align & Qt::AlignLeft) == Qt::AlignLeft) 437 && (e->oldSize().height() >= e->size().height() && (align & Qt::AlignTop) == Qt::AlignTop)) { 438 #warning port me 439 // setWFlags (Qt::WResizeNoErase); 429 440 return; 430 441 } 431 442 432 clearWFlags (WResizeNoErase); 443 #warning port me 444 // clearWFlags (Qt::WResizeNoErase); 433 445 QRect cr = contentsRect(); 434 446 if ( !lpixmap || !cr.isValid() || 435 447 // masked pixmaps can only reduce flicker when being top/left 436 448 // aligned and when we do not perform scaled contents 437 (lpixmap->hasAlpha() && (scaledcontents || ((align & ( AlignLeft|AlignTop)) != (AlignLeft|AlignTop)))))449 (lpixmap->hasAlpha() && (scaledcontents || ((align & (Qt::AlignLeft|Qt::AlignTop)) != (Qt::AlignLeft|Qt::AlignTop))))) 438 450 return; 439 451 440 setWFlags (WResizeNoErase); 452 #warning port me 453 // setWFlags (Qt::WResizeNoErase); 441 454 442 455 if (!scaledcontents) { … … 473 486 void QIRichLabel::focusInEvent (QFocusEvent *aEvent) 474 487 { 475 Q Frame::focusInEvent (aEvent);488 Q3Frame::focusInEvent (aEvent); 476 489 repaint(); 477 490 } … … 480 493 void QIRichLabel::keyPressEvent (QKeyEvent *aEvent) 481 494 { 482 switch (aEvent->key()) 483 { 484 case Qt::Key_Up: 485 focusData()->home(); 486 focusData()->prev()->setFocus(); 487 break; 488 case Qt::Key_Down: 489 focusData()->home(); 490 focusData()->next()->setFocus(); 491 break; 492 default: 493 aEvent->ignore(); 494 } 495 #warning port me 496 // switch (aEvent->key()) 497 // { 498 // case Qt::Key_Up: 499 // focusData()->home(); 500 // focusData()->prev()->setFocus(); 501 // break; 502 // case Qt::Key_Down: 503 // focusData()->home(); 504 // focusData()->next()->setFocus(); 505 // break; 506 // default: 507 // aEvent->ignore(); 508 // } 495 509 } 496 510 … … 578 592 579 593 QPixmap *pix = pixmap(); 580 Q Picture *pic = picture();594 Q3Picture *pic = picture(); 581 595 QMovie *mov = movie(); 582 596 … … 586 600 m = fontMetrics().width ('x') / 2 - margin(); 587 601 if (m > 0) { 588 int hAlign = QApplication::horizontalAlignment ( align);589 if (hAlign & AlignLeft)602 int hAlign = QApplication::horizontalAlignment ((Qt::Alignment)align); 603 if (hAlign & Qt::AlignLeft) 590 604 cr.setLeft (cr.left() + m); 591 if (hAlign & AlignRight)605 if (hAlign & Qt::AlignRight) 592 606 cr.setRight (cr.right() - m); 593 if (align & AlignTop)607 if (align & Qt::AlignTop) 594 608 cr.setTop (cr.top() + m); 595 if (align & AlignBottom)609 if (align & Qt::AlignBottom) 596 610 cr.setBottom (cr.bottom() - m); 597 611 } … … 599 613 600 614 if (mov) { 615 #warning port me 601 616 // ### should add movie to qDrawItem 602 QRect r = style().itemRect (p, cr, align, isEnabled(), &(mov->framePixmap()),603 QString::null);617 // QRect r = style()->itemRect (p, cr, align, isEnabled(), &(mov->framePixmap()), 618 // QString::null); 604 619 // ### could resize movie frame at this point 605 p->drawPixmap (r.x(), r.y(), mov->framePixmap());620 // p->drawPixmap (r.x(), r.y(), mov->framePixmap()); 606 621 } 607 622 else … … 610 625 QToolTip::remove (this); 611 626 QString filteredText = compressText(); 612 doc = new Q SimpleRichText (filteredText, font());627 doc = new Q3SimpleRichText (filteredText, font()); 613 628 /* focus indent */ 614 629 doc->setWidth (p, cr.width() - 2*3); 615 630 int rh = doc->height(); 616 631 int yo = 0; 617 if (align & AlignVCenter)632 if (align & Qt::AlignVCenter) 618 633 yo = (cr.height()-rh)/2; 619 else if (align & AlignBottom)634 else if (align & Qt::AlignBottom) 620 635 yo = cr.height()-rh; 621 if (! isEnabled() && 622 style().styleHint (QStyle::SH_EtchDisabledText, this)) { 623 QColorGroup cg = colorGroup(); 624 cg.setColor (QColorGroup::Text, cg.light()); 625 doc->draw (p, cr.x()+1, cr.y()+yo+1, cr, cg, 0); 626 } 636 #warning port me 637 // if (! isEnabled() && 638 // style().styleHint (QStyle::SH_EtchDisabledText, this)) { 639 // QColorGroup cg = colorGroup(); 640 // cg.setColor (QColorGroup::Text, cg.light()); 641 // doc->draw (p, cr.x()+1, cr.y()+yo+1, cr, cg, 0); 642 // } 627 643 628 644 // QSimpleRichText always draws with QColorGroup::Text as with … … 640 656 standartGroup.color (QColorGroup::HighlightedText)); 641 657 paper.setColor (standartGroup.color (QColorGroup::Highlight)); 642 paper.setStyle (Q Brush::SolidPattern);658 paper.setStyle (Qt::SolidPattern); 643 659 } 644 660 else … … 647 663 648 664 doc->draw (p, cr.x()+3, cr.y()+yo, cr, cg, &paper); 649 if (hasFocus()) 650 style().drawPrimitive (QStyle::PE_FocusRect, p, cr, cg, 651 QStyle::Style_FocusAtBorder, 652 cg.highlight()); 665 #warning port me 666 // if (hasFocus()) 667 // style().drawPrimitive (QStyle::PE_FocusRect, p, cr, cg, 668 // QStyle::State_FocusAtBorder, 669 // cg.highlight()); 653 670 654 671 if (filteredText != ltext) … … 668 685 int xo = 0; 669 686 int yo = 0; 670 if (align & AlignVCenter)687 if (align & Qt::AlignVCenter) 671 688 yo = (cr.height()-rh)/2; 672 else if (align & AlignBottom)689 else if (align & Qt::AlignBottom) 673 690 yo = cr.height()-rh; 674 if (align & AlignRight)691 if (align & Qt::AlignRight) 675 692 xo = cr.width()-rw; 676 else if (align & AlignHCenter)693 else if (align & Qt::AlignHCenter) 677 694 xo = (cr.width()-rw)/2; 678 695 p->drawPicture (cr.x()+xo-br.x(), cr.y()+yo-br.y(), *pic); … … 691 708 } 692 709 int alignment = align; 693 if ((align & ShowPrefix) && !style().styleHint(QStyle::SH_UnderlineAccelerator, this)) 694 alignment |= NoAccel; 710 #warning port me 711 // if ((align & Qt::TextShowMnemonic) && !style().styleHint(QStyle::SH_UnderlineShortcut, this)) 712 // alignment |= Qt::TextHideMnemonic; 695 713 // ordinary text or pixmap label 696 style().drawItem ( p, cr, alignment, colorGroup(), isEnabled(),697 pix, ltext );714 // style().drawItem ( p, cr, alignment, colorGroup(), isEnabled(), 715 // pix, ltext ); 698 716 } 699 717 } … … 704 722 d->valid_hints = -1; 705 723 QSizePolicy policy = sizePolicy(); 706 bool wordBreak = align & WordBreak;724 bool wordBreak = align & Qt::TextWordWrap; 707 725 policy.setHeightForWidth (wordBreak); 708 726 if (policy != sizePolicy()) … … 729 747 w->isEnabled() && 730 748 w->isVisible() && 731 w->focusPolicy() != NoFocus) { 732 QFocusEvent::setReason (QFocusEvent::Shortcut); 749 w->focusPolicy() != Qt::NoFocus) { 750 #warning port me 751 // QFocusEvent::setReason (QFocusEvent::Shortcut); 733 752 w->setFocus(); 734 QFocusEvent::resetReason(); 753 #warning port me 754 // QFocusEvent::resetReason(); 735 755 } 736 756 } … … 746 766 { 747 767 if (buddy) 748 setAlignment (alignment() | ShowPrefix);768 setAlignment (alignment() | Qt::TextShowMnemonic); 749 769 else 750 setAlignment (alignment() & ~ ShowPrefix);770 setAlignment (alignment() & ~Qt::TextShowMnemonic); 751 771 752 772 if (lbuddy) … … 758 778 return; 759 779 760 if (!( textformat == RichText || (textformat ==AutoText &&761 Q StyleSheet::mightBeRichText(ltext))))780 if (!( textformat == Qt::RichText || (textformat == Qt::AutoText && 781 Q3StyleSheet::mightBeRichText(ltext)))) 762 782 { 763 int p = Q Accel::shortcutKey (ltext);783 int p = Q3Accel::shortcutKey (ltext); 764 784 if (p) { 765 785 if (!accel) 766 accel = new Q Accel (this, "accel label accel");786 accel = new Q3Accel (this, "accel label accel"); 767 787 accel->connectItem (accel->insertItem (p), 768 788 this, SLOT (acceleratorSlot())); … … 785 805 if (mov && !mov->isNull()) { 786 806 QRect r = contentsRect(); 787 r = style().itemRect (0, r, align, isEnabled(), &(mov->framePixmap()), 788 QString::null); 807 #warning port me 808 // r = style().itemRect (0, r, align, isEnabled(), &(mov->framePixmap()), 809 // QString::null); 789 810 r.moveBy (rect.x(), rect.y()); 790 811 r.setWidth (QMIN (r.width(), rect.width())); 791 812 r.setHeight (QMIN (r.height(), rect.height())); 792 repaint (r, mov->framePixmap().mask() != 0); 813 #warning port me 814 // repaint (r, mov->framePixmap().mask() != 0); 793 815 } 794 816 } … … 807 829 void QIRichLabel::setMovie (const QMovie &movie) 808 830 { 809 QSize osh = sizeHint(); 810 clearContents(); 811 812 lmovie = new QMovie (movie); 813 lmovie->connectResize (this, SLOT (movieResized (const QSize&))); 814 lmovie->connectUpdate (this, SLOT (movieUpdated (const QRect&))); 815 816 if (!lmovie->running()) // Assume that if the movie is running, 817 updateLabel (osh); // resize/update signals will come soon enough 831 #warning port me 832 // QSize osh = sizeHint(); 833 // clearContents(); 834 // 835 // lmovie = new QMovie (movie); 836 // lmovie->connectResize (this, SLOT (movieResized (const QSize&))); 837 // lmovie->connectUpdate (this, SLOT (movieUpdated (const QRect&))); 838 // 839 // if (!lmovie->running()) // Assume that if the movie is running, 840 // updateLabel (osh); // resize/update signals will come soon enough 818 841 } 819 842 … … 842 865 843 866 if (lmovie) { 844 lmovie->disconnectResize (this, SLOT (movieResized (const QSize&))); 845 lmovie->disconnectUpdate (this, SLOT (movieUpdated (const QRect&))); 867 #warning port me 868 // lmovie->disconnectResize (this, SLOT (movieResized (const QSize&))); 869 // lmovie->disconnectUpdate (this, SLOT (movieUpdated (const QRect&))); 846 870 delete lmovie; 847 871 lmovie = 0; … … 908 932 void QIRichLabel::setFont (const QFont &f) 909 933 { 910 Q Frame::setFont (f);911 } 934 Q3Frame::setFont (f); 935 } -
trunk/src/VBox/Frontends/VirtualBox4/src/QIStateIndicator.cpp
r5999 r7220 20 20 21 21 #include <qpainter.h> 22 //Added by qt3to4: 23 #include <QPixmap> 24 #include <QMouseEvent> 25 #include <Q3Frame> 26 #include <QContextMenuEvent> 22 27 23 28 /** @clas QIStateIndicator … … 36 41 QIStateIndicator::QIStateIndicator (int aState, 37 42 QWidget *aParent, const char *aName, 38 WFlags aFlags)39 : Q Frame (aParent, aName, aFlags | WStaticContents |WMouseNoMask)43 Qt::WFlags aFlags) 44 : Q3Frame (aParent, aName, aFlags | Qt::WStaticContents | Qt::WMouseNoMask) 40 45 { 41 46 mState = aState; … … 99 104 else 100 105 { 101 if (testWFlags (WNoAutoErase)) 106 // if (testAttribute (Qt::WNoAutoErase)) 107 #warning port me 108 if(0) 102 109 { 103 110 QColor bgColor = paletteBackgroundColor(); … … 130 137 } 131 138 /* paint the icon on top of the widget background sample */ 132 bitBlt (&icon->cached, 0, 0, &icon->pixmap, 133 0, 0, w, h, CopyROP, false); 139 #warning port me 140 // bitBlt (&icon->cached, 0, 0, &icon->pixmap, 141 // 0, 0, w, h, CopyROP, false); 134 142 /* store the new values */ 135 143 icon->bgColor = bgColor; … … 159 167 aEv->accept(); 160 168 else 161 Q Frame::mousePressEvent (aEv);169 Q3Frame::mousePressEvent (aEv); 162 170 } 163 171 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox4/src/QIStatusBar.cpp
r5999 r7220 21 21 #include <qpainter.h> 22 22 #include <qsizegrip.h> 23 //Added by qt3to4: 24 #include <QPaintEvent> 23 25 24 26 /** @clas QIStatusLine … … 57 59 if (!message.isEmpty()) { 58 60 p.setPen (colorGroup().foreground()); 59 p.drawText (6, 0, psx, height(), AlignVCenter |SingleLine, message);61 p.drawText (6, 0, psx, height(), Qt::AlignVCenter | Qt::TextSingleLine, message); 60 62 } 61 63 } -
trunk/src/VBox/Frontends/VirtualBox4/src/QIWidgetValidator.cpp
r5999 r7220 19 19 #include "QIWidgetValidator.h" 20 20 21 #include <qobject list.h>21 #include <qobject.h> 22 22 #include <qlineedit.h> 23 23 #include <qcombobox.h> 24 24 #include <qlabel.h> 25 //Added by qt3to4: 26 #include <Q3ValueList> 25 27 26 28 #include <iprt/assert.h> … … 152 154 QValidator::State state = QValidator::Acceptable; 153 155 154 for (Q ValueList <Watched>::ConstIterator it = mWatched.begin();156 for (Q3ValueList <Watched>::ConstIterator it = mWatched.begin(); 155 157 it != mWatched.end(); ++ it) 156 158 { … … 212 214 Watched watched; 213 215 214 QObjectList *list = mWidget->queryList();216 QObjectList list = mWidget->queryList(); 215 217 QObject *obj; 216 218 217 219 /* detect all widgets that support validation */ 218 Q ObjectListIterator it (*list);219 while ( (obj = it.current()) != 0)220 QListIterator<QObject*> it (list); 221 while (it.hasNext()) 220 222 { 221 ++ it;223 obj = it.next(); 222 224 if (obj->inherits ("QLineEdit")) 223 225 { … … 247 249 /* try to find a buddy widget in order to determine the title for 248 250 * the watched widget which is used in the warning text */ 249 Q ObjectListIterator it2 (*list);250 while ( (obj = it2.current()) != 0)251 { 252 ++ it2;251 QListIterator<QObject*> it2 (list); 252 while (it2.hasNext()) 253 { 254 obj = it2.next(); 253 255 if (obj->inherits ("QLabel")) 254 256 { … … 265 267 mWatched << watched; 266 268 } 267 268 /* don't forget to delete the list */269 delete list;270 269 } 271 270 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp
r7207 r7220 41 41 #include <qmenudata.h> 42 42 #include <qmenubar.h> 43 #include <qwidget list.h>43 #include <qwidget.h> 44 44 #include <qtimer.h> 45 //Added by qt3to4: 46 #include <QDesktopWidget> 47 #include <QTimerEvent> 48 #include <QMoveEvent> 49 #include <QWheelEvent> 50 #include <QMouseEvent> 51 #include <QKeyEvent> 52 #include <QEvent> 53 #include <QPaintEvent> 45 54 46 55 #ifdef Q_WS_WIN … … 54 63 55 64 #ifdef Q_WS_X11 65 #include <QX11Info> 56 66 // We need to capture some X11 events directly which 57 67 // requires the XEvent structure to be defined. However, … … 594 604 const CConsole &console, 595 605 VBoxDefs::RenderMode rm, 596 QWidget *parent, const char *name, WFlags f)597 : Q ScrollView (parent, name, f | WStaticContents |WNoAutoErase)606 QWidget *parent, const char *name, Qt::WFlags f) 607 : Q3ScrollView (parent, name, f | Qt::WStaticContents | Qt::WNoAutoErase) 598 608 , mMainWnd (mainWnd) 599 609 , mConsole (console) … … 746 756 AssertWrapperOk (mConsole); 747 757 748 viewport()->setEraseColor ( black);758 viewport()->setEraseColor (Qt::black); 749 759 750 760 setSizePolicy (QSizePolicy (QSizePolicy::Maximum, QSizePolicy::Maximum)); 751 761 setMaximumSize (sizeHint()); 752 762 753 setFocusPolicy ( WheelFocus);763 setFocusPolicy (Qt::WheelFocus); 754 764 755 765 #if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT) … … 970 980 * no the required API. */ 971 981 if (enabled) 972 viewport()->setCursor (QCursor ( BlankCursor));982 viewport()->setCursor (QCursor (Qt::BlankCursor)); 973 983 974 984 mMouseIntegration = enabled; … … 1079 1089 resizeContents (re->width(), re->height()); 1080 1090 /* let our toplevel widget calculate its sizeHint properly */ 1081 QApplication::sendPostedEvents (0, QEvent::Layout Hint);1091 QApplication::sendPostedEvents (0, QEvent::LayoutRequest); 1082 1092 1083 1093 normalizeGeometry (true /* adjustPosition */); … … 1213 1223 { 1214 1224 ActivateMenuEvent *ame = (ActivateMenuEvent *) e; 1215 ame->menuData()->activateItemAt (ame->index()); 1225 #warning port me 1226 // ame->menuData()->activateItemAt (ame->index()); 1216 1227 1217 1228 /* … … 1221 1232 * destroyed widgets. 1222 1233 */ 1223 QWidgetList *list = QApplication::topLevelWidgets(); 1224 bool destroyed = list->find (mMainWnd) < 0; 1225 delete list; 1234 QWidgetList list = QApplication::topLevelWidgets(); 1235 bool destroyed = list.indexOf (mMainWnd) < 0; 1226 1236 if (!destroyed && mMainWnd->statusBar()) 1227 1237 mMainWnd->statusBar()->clear(); … … 1302 1312 const bool kShift = (gs.hostKey() == VK_SHIFT || 1303 1313 gs.hostKey() == VK_LSHIFT) && 1304 (ke->state() & ShiftButton);1314 (ke->state() & Qt::ShiftModifier); 1305 1315 /* define hot keys according to the Shift state */ 1306 const int kAltTab = kShift ? Key_Exclam :Key_1;1307 const int kAltShiftTab = kShift ? Key_At :Key_2;1308 const int kCtrlEsc = kShift ? Key_AsciiTilde :Key_QuoteLeft;1316 const int kAltTab = kShift ? Qt::Key_Exclam : Qt::Key_1; 1317 const int kAltShiftTab = kShift ? Qt::Key_At : Qt::Key_2; 1318 const int kCtrlEsc = kShift ? Qt::Key_AsciiTilde : Qt::Key_QuoteLeft; 1309 1319 1310 1320 /* Simulate Alt+Tab on Host+1 and Alt+Shift+Tab on Host+2 */ … … 1370 1380 if (mIsHostkeyPressed && e->type() == QEvent::KeyPress) 1371 1381 { 1372 if (ke->key() >= Key_F1 && ke->key() <=Key_F12)1382 if (ke->key() >= Qt::Key_F1 && ke->key() <= Qt::Key_F12) 1373 1383 { 1374 1384 LONG combo [6]; … … 1377 1387 combo [4] = 0xb8; /* Alt up */ 1378 1388 combo [5] = 0x9d; /* Ctrl up */ 1379 if (ke->key() >= Key_F1 && ke->key() <=Key_F10)1389 if (ke->key() >= Qt::Key_F1 && ke->key() <= Qt::Key_F10) 1380 1390 { 1381 combo [2] = 0x3b + (ke->key() - Key_F1); /* F1-F10 down */1382 combo [3] = 0xbb + (ke->key() - Key_F1); /* F1-F10 up */1391 combo [2] = 0x3b + (ke->key() - Qt::Key_F1); /* F1-F10 down */ 1392 combo [3] = 0xbb + (ke->key() - Qt::Key_F1); /* F1-F10 up */ 1383 1393 } 1384 1394 /* some scan slice */ 1385 else if (ke->key() >= Key_F11 && ke->key() <=Key_F12)1395 else if (ke->key() >= Qt::Key_F11 && ke->key() <= Qt::Key_F12) 1386 1396 { 1387 combo [2] = 0x57 + (ke->key() - Key_F11); /* F11-F12 down */1388 combo [3] = 0xd7 + (ke->key() - Key_F11); /* F11-F12 up */1397 combo [2] = 0x57 + (ke->key() - Qt::Key_F11); /* F11-F12 down */ 1398 combo [3] = 0xd7 + (ke->key() - Qt::Key_F11); /* F11-F12 up */ 1389 1399 } 1390 1400 else … … 1394 1404 keyboard.PutScancodes (combo, 6); 1395 1405 } 1396 else if (ke->key() == Key_Home)1406 else if (ke->key() == Qt::Key_Home) 1397 1407 { 1398 1408 /* activate the main menu */ … … 1406 1416 /* process hot keys not processed in keyEvent() 1407 1417 * (as in case of non-alphanumeric keys) */ 1408 processHotKey (QKeySequence (ke->key()), 1409 mMainWnd->menuBar()); 1418 #warning port me 1419 // processHotKey (QKeySequence (ke->key()), 1420 // mMainWnd->menuBar()); 1410 1421 } 1411 1422 } … … 1452 1463 } 1453 1464 1454 return Q ScrollView::event (e);1465 return Q3ScrollView::event (e); 1455 1466 } 1456 1467 … … 1469 1480 if (mouseEvent (me->type(), me->pos(), me->globalPos(), 1470 1481 me->button(), me->state(), me->stateAfter(), 1471 0, Horizontal))1482 0, Qt::Horizontal)) 1472 1483 return true; /* stop further event handling */ 1473 1484 break; … … 1477 1488 QWheelEvent *we = (QWheelEvent *) e; 1478 1489 if (mouseEvent (we->type(), we->pos(), we->globalPos(), 1479 NoButton, we->state(), we->state(),1490 Qt::NoButton, we->state(), we->state(), 1480 1491 we->delta(), we->orientation())) 1481 1492 return true; /* stop further event handling */ … … 1573 1584 { 1574 1585 QKeyEvent *ke = (QKeyEvent *) e; 1575 if (ke->key() == Key_Escape && !(ke->state() & KeyButtonMask))1586 if (ke->key() == Qt::Key_Escape && !(ke->state() & Qt::KeyboardModifierMask)) 1576 1587 if (mMainWnd->menuBar()->hasFocus()) 1577 1588 setFocus(); … … 1583 1594 } 1584 1595 1585 return Q ScrollView::eventFilter (watched, e);1596 return Q3ScrollView::eventFilter (watched, e); 1586 1597 } 1587 1598 … … 2165 2176 2166 2177 uKeyMaskCaps = LockMask; 2167 XModifierKeymap* map = XGetModifierMapping( qt_xdisplay());2168 KeyCode keyCodeNum = XKeysymToKeycode( qt_xdisplay(), XK_Num_Lock);2169 KeyCode keyCodeScroll = XKeysymToKeycode( qt_xdisplay(), XK_Scroll_Lock);2178 XModifierKeymap* map = XGetModifierMapping(QX11Info::display()); 2179 KeyCode keyCodeNum = XKeysymToKeycode(QX11Info::display(), XK_Num_Lock); 2180 KeyCode keyCodeScroll = XKeysymToKeycode(QX11Info::display(), XK_Scroll_Lock); 2170 2181 2171 2182 for (int i = 0; i < 8; i++) … … 2178 2189 uKeyMaskScroll = 1 << i; 2179 2190 } 2180 XQueryPointer( qt_xdisplay(), DefaultRootWindow(qt_xdisplay()), &wDummy1, &wDummy2,2191 XQueryPointer(QX11Info::display(), DefaultRootWindow(QX11Info::display()), &wDummy1, &wDummy2, 2181 2192 &iDummy3, &iDummy4, &iDummy5, &iDummy6, &uMask); 2182 2193 XFreeModifiermap(map); … … 2489 2500 ch = 0; 2490 2501 if (ch) 2491 processed = processHotKey (QKeySequence ( UNICODE_ACCEL +2502 processed = processHotKey (QKeySequence (Qt::UNICODE_ACCEL + 2492 2503 QChar (ch).upper().unicode()), 2493 2504 mMainWnd->menuBar()); … … 2509 2520 { 2510 2521 QChar c = QString::fromLocal8Bit (&ch, 1) [0]; 2511 processed = processHotKey (QKeySequence (UNICODE_ACCEL + 2512 c.upper().unicode()), 2513 mMainWnd->menuBar()); 2522 #warning port me 2523 // processed = processHotKey (QKeySequence (Qt::UNICODE_ACCEL + 2524 // c.upper().unicode()), 2525 // mMainWnd->menuBar()); 2514 2526 } 2515 2527 } 2516 2528 #elif defined (Q_WS_MAC) 2517 2529 if (aUniKey && aUniKey [0] && !aUniKey [1]) 2518 processed = processHotKey (QKeySequence ( UNICODE_ACCEL +2530 processed = processHotKey (QKeySequence (Qt::UNICODE_ACCEL + 2519 2531 QChar (aUniKey [0]).upper().unicode()), 2520 2532 mMainWnd->menuBar()); … … 2570 2582 */ 2571 2583 bool VBoxConsoleView::mouseEvent (int aType, const QPoint &aPos, 2572 const QPoint &aGlobalPos, ButtonState aButton,2573 ButtonState aState,ButtonState aStateAfter,2574 int aWheelDelta, Orientation aWheelDir)2584 const QPoint &aGlobalPos, Qt::ButtonState aButton, 2585 Qt::ButtonState aState, Qt::ButtonState aStateAfter, 2586 int aWheelDelta, Qt::Orientation aWheelDir) 2575 2587 { 2576 2588 #if 0 … … 2588 2600 2589 2601 int state = 0; 2590 if (aStateAfter & LeftButton)2602 if (aStateAfter & Qt::LeftButton) 2591 2603 state |= KMouseButtonState_LeftButton; 2592 if (aStateAfter & RightButton)2604 if (aStateAfter & Qt::RightButton) 2593 2605 state |= KMouseButtonState_RightButton; 2594 if (aStateAfter & MidButton)2606 if (aStateAfter & Qt::MidButton) 2595 2607 state |= KMouseButtonState_MiddleButton; 2596 2608 2597 2609 int wheel = 0; 2598 if (aWheelDir == Vertical)2610 if (aWheelDir == Qt::Vertical) 2599 2611 { 2600 2612 /* the absolute value of wheel delta is 120 units per every wheel … … 2887 2899 setMaximumSize (sizeHint()); 2888 2900 /* let our toplevel widget calculate its sizeHint properly */ 2889 QApplication::sendPostedEvents (0, QEvent::Layout Hint);2901 QApplication::sendPostedEvents (0, QEvent::LayoutRequest); 2890 2902 normalizeGeometry(); 2891 2903 } … … 2915 2927 /* draw a part of vbuf */ 2916 2928 const QRect &r = pe->rect(); 2917 ::bitBlt (viewport(), r.x(), r.y(), 2918 &pm, r.x() + contentsX(), r.y() + contentsY(), 2919 r.width(), r.height(), 2920 CopyROP, TRUE); 2929 #warning port me 2930 // ::bitBlt (viewport(), r.x(), r.y(), 2931 // &pm, r.x() + contentsX(), r.y() + contentsY(), 2932 // r.width(), r.height(), 2933 // CopyROP, TRUE); 2921 2934 } 2922 2935 else … … 3050 3063 mCapturedPos = QCursor::pos(); 3051 3064 #ifdef Q_WS_WIN32 3052 viewport()->setCursor (QCursor ( BlankCursor));3065 viewport()->setCursor (QCursor (Qt::BlankCursor)); 3053 3066 /* move the mouse to the center of the visible area */ 3054 3067 QCursor::setPos (mapToGlobal (visibleRect().center())); … … 3099 3112 */ 3100 3113 3101 for (uint i = 0; i < data->count(); i++) 3102 { 3103 int id = data->idAt (i); 3104 QMenuItem *item = data->findItem (id); 3105 if (item->popup()) 3106 { 3107 if (processHotKey (key, item->popup())) 3108 return true; 3109 } 3110 else 3111 { 3112 QStringList list = QStringList::split ("\tHost+", data->text (id)); 3113 if (list.count() == 2) 3114 { 3115 if (key.matches (QKeySequence (list[1])) == Identical) 3116 { 3117 /* 3118 * we asynchronously post a special event instead of calling 3119 * data->activateItemAt (i) directly, to let key presses 3120 * and releases be processed correctly by Qt first. 3121 * Note: we assume that nobody will delete the menu item 3122 * corresponding to the key sequence, so that the pointer to 3123 * menu data posted along with the event will remain valid in 3124 * the event handler, at least until the main window is closed. 3125 */ 3126 3127 QApplication::postEvent (this, 3128 new ActivateMenuEvent (data, i)); 3129 return true; 3130 } 3131 } 3132 } 3133 } 3114 #warning port me 3115 // for (uint i = 0; i < data->count(); i++) 3116 // { 3117 // int id = data->idAt (i); 3118 // QMenuItem *item = data->findItem (id); 3119 // if (item->popup()) 3120 // { 3121 // if (processHotKey (key, item->popup())) 3122 // return true; 3123 // } 3124 // else 3125 // { 3126 // QStringList list = QStringList::split ("\tHost+", data->text (id)); 3127 // if (list.count() == 2) 3128 // { 3129 // if (key.matches (QKeySequence (list[1])) == Identical) 3130 // { 3131 // /* 3132 // * we asynchronously post a special event instead of calling 3133 // * data->activateItemAt (i) directly, to let key presses 3134 // * and releases be processed correctly by Qt first. 3135 // * Note: we assume that nobody will delete the menu item 3136 // * corresponding to the key sequence, so that the pointer to 3137 // * menu data posted along with the event will remain valid in 3138 // * the event handler, at least until the main window is closed. 3139 // */ 3140 // 3141 // QApplication::postEvent (this, 3142 // new ActivateMenuEvent (data, i)); 3143 // return true; 3144 // } 3145 // } 3146 // } 3147 // } 3134 3148 3135 3149 return false; … … 3242 3256 if (mMouseCaptured) 3243 3257 { 3244 viewport()->setCursor (QCursor ( BlankCursor));3258 viewport()->setCursor (QCursor (Qt::BlankCursor)); 3245 3259 #ifdef Q_WS_WIN32 3246 3260 QRect r = viewport()->rect(); … … 3509 3523 else 3510 3524 { 3511 viewport()->setCursor (Q Cursor::BlankCursor);3525 viewport()->setCursor (Qt::BlankCursor); 3512 3526 } 3513 3527 } -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r7207 r7220 32 32 #include <qaction.h> 33 33 #include <qmenubar.h> 34 #include <q buttongroup.h>34 #include <q3buttongroup.h> 35 35 #include <qradiobutton.h> 36 36 #include <qfile.h> … … 41 41 #include <qeventloop.h> 42 42 #include <qregexp.h> 43 //Added by qt3to4: 44 #include <QDesktopWidget> 45 #include <QResizeEvent> 46 #include <QContextMenuEvent> 47 #include <QLabel> 48 #include <QCloseEvent> 49 #include <Q3GridLayout> 50 #include <QShowEvent> 51 #include <q3mimefactory.h> 52 #include <Q3HBoxLayout> 53 #include <QEvent> 54 #include <Q3VBoxLayout> 55 #include <Q3Frame> 56 #include <Q3PopupMenu> 57 #include <Q3ActionGroup> 43 58 44 59 #include <VBox/VBoxGuest.h> … … 79 94 80 95 #ifdef RT_OS_DARWIN 81 class Q Http;82 class Q HttpResponseHeader;96 class Q3Http; 97 class Q3HttpResponseHeader; 83 98 #endif 84 99 … … 102 117 VBoxConsoleWnd:: 103 118 VBoxConsoleWnd (VBoxConsoleWnd **aSelf, QWidget* aParent, const char* aName, 104 WFlags aFlags)105 : Q MainWindow (aParent, aName, aFlags)119 Qt::WFlags aFlags) 120 : Q3MainWindow (aParent, aName, aFlags) 106 121 , mMainMenu (0) 107 122 #ifdef VBOX_WITH_DEBUGGER_GUI … … 116 131 , mIsSeamless (false) 117 132 , mIsSeamlessSupported (false) 118 , normal_wflags (getWFlags()) 133 #warning port me 134 // , normal_wflags (getWFlags()) 119 135 , was_max (false) 120 136 , console_style (0) … … 140 156 /* default application icon (will change to the VM-specific icon in 141 157 * openView()) */ 142 setIcon ( QPixmap::fromMimeSource ("ico40x01.png"));158 setIcon (qPixmapFromMimeSource ("ico40x01.png")); 143 159 144 160 /* ensure status bar is created */ … … 150 166 * Note that only actions whose enabled state depends exclusively on the 151 167 * execution state of the VM are added to this group. */ 152 mRunningActions = new Q ActionGroup (this);168 mRunningActions = new Q3ActionGroup (this); 153 169 mRunningActions->setExclusive (false); 154 170 … … 156 172 * paused. Note that only actions whose enabled state depends exclusively 157 173 * on the execution state of the VM are added to this group. */ 158 mRunningOrPausedActions = new Q ActionGroup (this);174 mRunningOrPausedActions = new Q3ActionGroup (this); 159 175 mRunningOrPausedActions->setExclusive (false); 160 176 … … 281 297 ///// Menubar /////////////////////////////////////////////////////////// 282 298 283 mMainMenu = new Q PopupMenu (this, "mMainMenu");299 mMainMenu = new Q3PopupMenu (this, "mMainMenu"); 284 300 285 301 /* Machine submenu */ 286 302 287 Q PopupMenu *vmMenu = new QPopupMenu (this, "vmMenu");303 Q3PopupMenu *vmMenu = new Q3PopupMenu (this, "vmMenu"); 288 304 289 305 /* dynamic & status line popup menus */ … … 319 335 /* Devices submenu */ 320 336 321 devicesMenu = new Q PopupMenu (this, "devicesMenu");337 devicesMenu = new Q3PopupMenu (this, "devicesMenu"); 322 338 323 339 /* dynamic & statusline popup menus */ 324 devicesMountFloppyMenu = new Q PopupMenu (devicesMenu, "devicesMountFloppyMenu");325 devicesMountDVDMenu = new Q PopupMenu (devicesMenu, "devicesMountDVDMenu");326 devicesSFMenu = new Q PopupMenu (devicesMenu, "devicesSFMenu");327 devicesNetworkMenu = new Q PopupMenu (devicesMenu, "devicesNetworkMenu");340 devicesMountFloppyMenu = new Q3PopupMenu (devicesMenu, "devicesMountFloppyMenu"); 341 devicesMountDVDMenu = new Q3PopupMenu (devicesMenu, "devicesMountDVDMenu"); 342 devicesSFMenu = new Q3PopupMenu (devicesMenu, "devicesSFMenu"); 343 devicesNetworkMenu = new Q3PopupMenu (devicesMenu, "devicesNetworkMenu"); 328 344 devicesUSBMenu = new VBoxUSBMenu (devicesMenu); 329 345 devicesVRDPMenu = new VBoxSwitchMenu (devicesMenu, devicesSwitchVrdpAction); … … 368 384 if (vboxGlobal().isDebuggerEnabled()) 369 385 { 370 dbgMenu = new Q PopupMenu (this, "dbgMenu");386 dbgMenu = new Q3PopupMenu (this, "dbgMenu"); 371 387 dbgStatisticsAction->addTo (dbgMenu); 372 388 dbgCommandLineAction->addTo (dbgMenu); … … 380 396 /* Help submenu */ 381 397 382 Q PopupMenu *helpMenu = new QPopupMenu( this, "helpMenu" );398 Q3PopupMenu *helpMenu = new Q3PopupMenu( this, "helpMenu" ); 383 399 384 400 helpContentsAction->addTo (helpMenu); … … 399 415 ///// Status bar //////////////////////////////////////////////////////// 400 416 401 Q HBox *indicatorBox = new QHBox (0, "indicatorBox");417 Q3HBox *indicatorBox = new Q3HBox (0, "indicatorBox"); 402 418 indicatorBox->setSpacing (5); 403 419 /* i/o devices */ 404 hd_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "hd_light", WNoAutoErase);405 hd_light->setStateIcon (KDeviceActivity_Idle, QPixmap::fromMimeSource ("hd_16px.png"));406 hd_light->setStateIcon (KDeviceActivity_Reading, QPixmap::fromMimeSource ("hd_read_16px.png"));407 hd_light->setStateIcon (KDeviceActivity_Writing, QPixmap::fromMimeSource ("hd_write_16px.png"));408 hd_light->setStateIcon (KDeviceActivity_Null, QPixmap::fromMimeSource ("hd_disabled_16px.png"));409 cd_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "cd_light", WNoAutoErase);410 cd_light->setStateIcon (KDeviceActivity_Idle, QPixmap::fromMimeSource ("cd_16px.png"));411 cd_light->setStateIcon (KDeviceActivity_Reading, QPixmap::fromMimeSource ("cd_read_16px.png"));412 cd_light->setStateIcon (KDeviceActivity_Writing, QPixmap::fromMimeSource ("cd_write_16px.png"));413 cd_light->setStateIcon (KDeviceActivity_Null, QPixmap::fromMimeSource ("cd_disabled_16px.png"));414 fd_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "fd_light", WNoAutoErase);415 fd_light->setStateIcon (KDeviceActivity_Idle, QPixmap::fromMimeSource ("fd_16px.png"));416 fd_light->setStateIcon (KDeviceActivity_Reading, QPixmap::fromMimeSource ("fd_read_16px.png"));417 fd_light->setStateIcon (KDeviceActivity_Writing, QPixmap::fromMimeSource ("fd_write_16px.png"));418 fd_light->setStateIcon (KDeviceActivity_Null, QPixmap::fromMimeSource ("fd_disabled_16px.png"));419 net_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "net_light", WNoAutoErase);420 net_light->setStateIcon (KDeviceActivity_Idle, QPixmap::fromMimeSource ("nw_16px.png"));421 net_light->setStateIcon (KDeviceActivity_Reading, QPixmap::fromMimeSource ("nw_read_16px.png"));422 net_light->setStateIcon (KDeviceActivity_Writing, QPixmap::fromMimeSource ("nw_write_16px.png"));423 net_light->setStateIcon (KDeviceActivity_Null, QPixmap::fromMimeSource ("nw_disabled_16px.png"));424 usb_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "usb_light", WNoAutoErase);425 usb_light->setStateIcon (KDeviceActivity_Idle, QPixmap::fromMimeSource ("usb_16px.png"));426 usb_light->setStateIcon (KDeviceActivity_Reading, QPixmap::fromMimeSource ("usb_read_16px.png"));427 usb_light->setStateIcon (KDeviceActivity_Writing, QPixmap::fromMimeSource ("usb_write_16px.png"));428 usb_light->setStateIcon (KDeviceActivity_Null, QPixmap::fromMimeSource ("usb_disabled_16px.png"));429 sf_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "sf_light", WNoAutoErase);430 sf_light->setStateIcon (KDeviceActivity_Idle, QPixmap::fromMimeSource ("shared_folder_16px.png"));431 sf_light->setStateIcon (KDeviceActivity_Reading, QPixmap::fromMimeSource ("shared_folder_read_16px.png"));432 sf_light->setStateIcon (KDeviceActivity_Writing, QPixmap::fromMimeSource ("shared_folder_write_16px.png"));433 sf_light->setStateIcon (KDeviceActivity_Null, QPixmap::fromMimeSource ("shared_folder_disabled_16px.png"));434 435 (new Q Frame (indicatorBox))->setFrameStyle (QFrame::VLine | QFrame::Sunken);420 hd_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "hd_light", Qt::WNoAutoErase); 421 hd_light->setStateIcon (KDeviceActivity_Idle, qPixmapFromMimeSource ("hd_16px.png")); 422 hd_light->setStateIcon (KDeviceActivity_Reading, qPixmapFromMimeSource ("hd_read_16px.png")); 423 hd_light->setStateIcon (KDeviceActivity_Writing, qPixmapFromMimeSource ("hd_write_16px.png")); 424 hd_light->setStateIcon (KDeviceActivity_Null, qPixmapFromMimeSource ("hd_disabled_16px.png")); 425 cd_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "cd_light", Qt::WNoAutoErase); 426 cd_light->setStateIcon (KDeviceActivity_Idle, qPixmapFromMimeSource ("cd_16px.png")); 427 cd_light->setStateIcon (KDeviceActivity_Reading, qPixmapFromMimeSource ("cd_read_16px.png")); 428 cd_light->setStateIcon (KDeviceActivity_Writing, qPixmapFromMimeSource ("cd_write_16px.png")); 429 cd_light->setStateIcon (KDeviceActivity_Null, qPixmapFromMimeSource ("cd_disabled_16px.png")); 430 fd_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "fd_light", Qt::WNoAutoErase); 431 fd_light->setStateIcon (KDeviceActivity_Idle, qPixmapFromMimeSource ("fd_16px.png")); 432 fd_light->setStateIcon (KDeviceActivity_Reading, qPixmapFromMimeSource ("fd_read_16px.png")); 433 fd_light->setStateIcon (KDeviceActivity_Writing, qPixmapFromMimeSource ("fd_write_16px.png")); 434 fd_light->setStateIcon (KDeviceActivity_Null, qPixmapFromMimeSource ("fd_disabled_16px.png")); 435 net_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "net_light", Qt::WNoAutoErase); 436 net_light->setStateIcon (KDeviceActivity_Idle, qPixmapFromMimeSource ("nw_16px.png")); 437 net_light->setStateIcon (KDeviceActivity_Reading, qPixmapFromMimeSource ("nw_read_16px.png")); 438 net_light->setStateIcon (KDeviceActivity_Writing, qPixmapFromMimeSource ("nw_write_16px.png")); 439 net_light->setStateIcon (KDeviceActivity_Null, qPixmapFromMimeSource ("nw_disabled_16px.png")); 440 usb_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "usb_light", Qt::WNoAutoErase); 441 usb_light->setStateIcon (KDeviceActivity_Idle, qPixmapFromMimeSource ("usb_16px.png")); 442 usb_light->setStateIcon (KDeviceActivity_Reading, qPixmapFromMimeSource ("usb_read_16px.png")); 443 usb_light->setStateIcon (KDeviceActivity_Writing, qPixmapFromMimeSource ("usb_write_16px.png")); 444 usb_light->setStateIcon (KDeviceActivity_Null, qPixmapFromMimeSource ("usb_disabled_16px.png")); 445 sf_light = new QIStateIndicator (KDeviceActivity_Idle, indicatorBox, "sf_light", Qt::WNoAutoErase); 446 sf_light->setStateIcon (KDeviceActivity_Idle, qPixmapFromMimeSource ("shared_folder_16px.png")); 447 sf_light->setStateIcon (KDeviceActivity_Reading, qPixmapFromMimeSource ("shared_folder_read_16px.png")); 448 sf_light->setStateIcon (KDeviceActivity_Writing, qPixmapFromMimeSource ("shared_folder_write_16px.png")); 449 sf_light->setStateIcon (KDeviceActivity_Null, qPixmapFromMimeSource ("shared_folder_disabled_16px.png")); 450 451 (new Q3Frame (indicatorBox))->setFrameStyle (Q3Frame::VLine | Q3Frame::Sunken); 436 452 437 453 #if 0 // do not show these indicators, information overload 438 454 /* vrdp state */ 439 vrdp_state = new QIStateIndicator (0, indicatorBox, "vrdp_state", WNoAutoErase);440 vrdp_state->setStateIcon (0, QPixmap::fromMimeSource ("vrdp_disabled_16px.png"));441 vrdp_state->setStateIcon (1, QPixmap::fromMimeSource ("vrdp_16px.png"));455 vrdp_state = new QIStateIndicator (0, indicatorBox, "vrdp_state", Qt::WNoAutoErase); 456 vrdp_state->setStateIcon (0, qPixmapFromMimeSource ("vrdp_disabled_16px.png")); 457 vrdp_state->setStateIcon (1, qPixmapFromMimeSource ("vrdp_16px.png")); 442 458 /* auto resize state */ 443 autoresize_state = new QIStateIndicator (1, indicatorBox, "autoresize_state", WNoAutoErase);444 autoresize_state->setStateIcon (0, QPixmap::fromMimeSource ("auto_resize_off_disabled_16px.png"));445 autoresize_state->setStateIcon (1, QPixmap::fromMimeSource ("auto_resize_off_16px.png"));446 autoresize_state->setStateIcon (2, QPixmap::fromMimeSource ("auto_resize_on_disabled_16px.png"));447 autoresize_state->setStateIcon (3, QPixmap::fromMimeSource ("auto_resize_on_16px.png"));459 autoresize_state = new QIStateIndicator (1, indicatorBox, "autoresize_state", Qt::WNoAutoErase); 460 autoresize_state->setStateIcon (0, qPixmapFromMimeSource ("auto_resize_off_disabled_16px.png")); 461 autoresize_state->setStateIcon (1, qPixmapFromMimeSource ("auto_resize_off_16px.png")); 462 autoresize_state->setStateIcon (2, qPixmapFromMimeSource ("auto_resize_on_disabled_16px.png")); 463 autoresize_state->setStateIcon (3, qPixmapFromMimeSource ("auto_resize_on_16px.png")); 448 464 #endif 449 465 450 466 /* mouse */ 451 mouse_state = new QIStateIndicator (0, indicatorBox, "mouse_state", WNoAutoErase);452 mouse_state->setStateIcon (0, QPixmap::fromMimeSource ("mouse_disabled_16px.png"));453 mouse_state->setStateIcon (1, QPixmap::fromMimeSource ("mouse_16px.png"));454 mouse_state->setStateIcon (2, QPixmap::fromMimeSource ("mouse_seamless_16px.png"));455 mouse_state->setStateIcon (3, QPixmap::fromMimeSource ("mouse_can_seamless_16px.png"));456 mouse_state->setStateIcon (4, QPixmap::fromMimeSource ("mouse_can_seamless_uncaptured_16px.png"));467 mouse_state = new QIStateIndicator (0, indicatorBox, "mouse_state", Qt::WNoAutoErase); 468 mouse_state->setStateIcon (0, qPixmapFromMimeSource ("mouse_disabled_16px.png")); 469 mouse_state->setStateIcon (1, qPixmapFromMimeSource ("mouse_16px.png")); 470 mouse_state->setStateIcon (2, qPixmapFromMimeSource ("mouse_seamless_16px.png")); 471 mouse_state->setStateIcon (3, qPixmapFromMimeSource ("mouse_can_seamless_16px.png")); 472 mouse_state->setStateIcon (4, qPixmapFromMimeSource ("mouse_can_seamless_uncaptured_16px.png")); 457 473 /* host key */ 458 hostkey_hbox = new Q HBox (indicatorBox, "hostkey_hbox");474 hostkey_hbox = new Q3HBox (indicatorBox, "hostkey_hbox"); 459 475 hostkey_hbox->setSpacing (3); 460 476 hostkey_state = new QIStateIndicator (0, hostkey_hbox, "hostkey_state"); 461 hostkey_state->setStateIcon (0, QPixmap::fromMimeSource ("hostkey_16px.png"));462 hostkey_state->setStateIcon (1, QPixmap::fromMimeSource ("hostkey_captured_16px.png"));463 hostkey_state->setStateIcon (2, QPixmap::fromMimeSource ("hostkey_pressed_16px.png"));464 hostkey_state->setStateIcon (3, QPixmap::fromMimeSource ("hostkey_captured_pressed_16px.png"));477 hostkey_state->setStateIcon (0, qPixmapFromMimeSource ("hostkey_16px.png")); 478 hostkey_state->setStateIcon (1, qPixmapFromMimeSource ("hostkey_captured_16px.png")); 479 hostkey_state->setStateIcon (2, qPixmapFromMimeSource ("hostkey_pressed_16px.png")); 480 hostkey_state->setStateIcon (3, qPixmapFromMimeSource ("hostkey_captured_pressed_16px.png")); 465 481 hostkey_name = new QLabel (QIHotKeyEdit::keyName (vboxGlobal().settings().hostKey()), 466 482 hostkey_hbox, "hostkey_name"); … … 594 610 SetApplicationDockTileImage (dockImgOS); 595 611 #endif 596 mMaskShift.scale (0, 0, Q Size::ScaleFree);612 mMaskShift.scale (0, 0, Qt::IgnoreAspectRatio); 597 613 } 598 614 … … 639 655 { 640 656 setCentralWidget (new QWidget (this, "centralWidget")); 641 Q GridLayout *pMainLayout = new QGridLayout(centralWidget(), 3, 3, 0, 0);657 Q3GridLayout *pMainLayout = new Q3GridLayout(centralWidget(), 3, 3, 0, 0); 642 658 mShiftingSpacerLeft = new QSpacerItem (0, 0, 643 659 QSizePolicy::Fixed, … … 670 686 activateUICustomizations(); 671 687 672 static_cast<Q GridLayout*>(centralWidget()->layout())->addWidget(console, 1, 1, AlignVCenter |AlignHCenter);688 static_cast<Q3GridLayout*>(centralWidget()->layout())->addWidget(console, 1, 1, Qt::AlignVCenter | Qt::AlignHCenter); 673 689 674 690 CMachine cmachine = csession.GetMachine(); … … 713 729 /* maximize if needed */ 714 730 if (max) 715 setWindowState (windowState() | WindowMaximized);731 setWindowState (windowState() | Qt::WindowMaximized); 716 732 was_max = max; 717 733 … … 1164 1180 } 1165 1181 1166 return Q MainWindow::event (e);1182 return Q3MainWindow::event (e); 1167 1183 } 1168 1184 … … 1962 1978 ULONG64 usedBits = screen.width() /* display width */ 1963 1979 * screen.height() /* display height */ 1964 * QColor::numBitPlanes(); /* bit per pixel */ 1980 #warning port me: check this 1981 * depth(); /* bit per pixel */ 1982 // * QColor::numBitPlanes(); /* bit per pixel */ 1965 1983 if (aOn && (availBits < usedBits)) 1966 1984 { 1967 1985 vboxProblem().cannotEnterSeamlessMode (screen.width(), 1968 screen.height(), QColor::numBitPlanes()); 1986 #warning port me: check this 1987 screen.height(), depth()); 1988 // screen.height(), QColor::numBitPlanes()); 1969 1989 return false; 1970 1990 } … … 2069 2089 2070 2090 /* Hide all but the central widget containing the console view. */ 2071 QObjectList *list = queryList (NULL, NULL, false, false);2072 for (QObject *obj = list->first(); obj != NULL; obj = list->next())2091 QObjectList list = queryList (NULL, NULL, false, false); 2092 foreach (QObject *obj, list) 2073 2093 { 2074 2094 if (obj->isWidgetType() && obj != centralWidget()) … … 2082 2102 } 2083 2103 } 2084 delete list;2085 2104 2086 2105 #ifdef Q_WS_MAC … … 2096 2115 /* Adjust colors and appearance. */ 2097 2116 mEraseColor = centralWidget()->eraseColor(); 2098 centralWidget()->setEraseColor ( black);2117 centralWidget()->setEraseColor (Qt::black); 2099 2118 console_style = console->frameStyle(); 2100 console->setFrameStyle (Q Frame::NoFrame);2119 console->setFrameStyle (Q3Frame::NoFrame); 2101 2120 console->setMaximumSize (scrGeo.size()); 2102 console->setVScrollBarMode (Q ScrollView::AlwaysOff);2103 console->setHScrollBarMode (Q ScrollView::AlwaysOff);2121 console->setVScrollBarMode (Q3ScrollView::AlwaysOff); 2122 console->setHScrollBarMode (Q3ScrollView::AlwaysOff); 2104 2123 2105 2124 /* Going fullscreen */ 2106 setWindowState (windowState() ^ WindowFullScreen);2125 setWindowState (windowState() ^ Qt::WindowFullScreen); 2107 2126 #ifdef Q_WS_MAC /* setMask seems to not include the far border pixels. */ 2108 2127 // QRect maskRect = dtw->screenGeometry (this); … … 2186 2205 console->setFrameStyle (console_style); 2187 2206 console->setMaximumSize (console->sizeHint()); 2188 console->setVScrollBarMode (Q ScrollView::Auto);2189 console->setHScrollBarMode (Q ScrollView::Auto);2207 console->setVScrollBarMode (Q3ScrollView::Auto); 2208 console->setHScrollBarMode (Q3ScrollView::Auto); 2190 2209 2191 2210 /* Show everything hidden when going fullscreen. */ 2192 for (QObject *obj = hidden_children.first(); obj != NULL; 2193 obj = hidden_children.next()) 2211 foreach (QObject *obj, hidden_children) 2194 2212 ((QWidget *) obj)->show(); 2195 2213 hidden_children.clear(); 2196 2214 2197 2215 /* Going normal || maximized */ 2198 setWindowState (windowState() ^ WindowFullScreen);2216 setWindowState (windowState() ^ Qt::WindowFullScreen); 2199 2217 2200 2218 qApp->processEvents(); … … 2242 2260 QRect sRect = dtw->screenGeometry (this); 2243 2261 QRect aRect (aTargetRect); 2244 mMaskShift.scale (aTargetRect.left(), aTargetRect.top(), Q Size::ScaleFree);2262 mMaskShift.scale (aTargetRect.left(), aTargetRect.top(), Qt::IgnoreAspectRatio); 2245 2263 #ifdef Q_WS_MAC 2246 2264 /* On mac os x this isn't necessary cause the screen starts … … 2470 2488 if (!console) return; 2471 2489 2472 VBoxDiskImageManagerDlg dlg (this, "VBoxDiskImageManagerDlg", WType_Dialog |WShowModal);2490 VBoxDiskImageManagerDlg dlg (this, "VBoxDiskImageManagerDlg", Qt::WType_Dialog | Qt::WShowModal); 2473 2491 QUuid id = csession.GetMachine().GetId(); 2474 2492 dlg.setup (VBoxDefs::FD, true, &id); … … 2514 2532 if (!console) return; 2515 2533 2516 VBoxDiskImageManagerDlg dlg (this, "VBoxDiskImageManagerDlg", WType_Dialog |WShowModal);2534 VBoxDiskImageManagerDlg dlg (this, "VBoxDiskImageManagerDlg", Qt::WType_Dialog | Qt::WShowModal); 2517 2535 QUuid id = csession.GetMachine().GetId(); 2518 2536 dlg.setup (VBoxDefs::CD, true, &id); … … 2728 2746 } 2729 2747 #else 2730 Q MainWindow::setMask (region);2748 Q3MainWindow::setMask (region); 2731 2749 #endif 2732 2750 } … … 3048 3066 devicesSFMenu->exec (e->globalPos()); 3049 3067 #else 3050 if (devicesSFDialogAction->isEnabled()) 3051 devicesSFDialogAction->activate(); 3068 #warning port me 3069 // if (devicesSFDialogAction->isEnabled()) 3070 // devicesSFDialogAction->activate(); 3052 3071 #endif 3053 3072 } … … 3299 3318 void VBoxConsoleWnd::tryClose() 3300 3319 { 3301 LogFlowFunc (("eventLoopLevel=%d\n", qApp->eventLoop()->loopLevel())); 3302 3303 if (qApp->eventLoop()->loopLevel() > 1) 3304 { 3305 if (QApplication::activeModalWidget()) 3306 QApplication::activeModalWidget()->close(); 3307 else if (QApplication::activePopupWidget()) 3308 QApplication::activePopupWidget()->close(); 3309 else 3310 { 3320 #warning port me 3321 // LogFlowFunc (("eventLoopLevel=%d\n", qApp->eventLoop()->loopLevel())); 3322 // 3323 // if (qApp->eventLoop()->loopLevel() > 1) 3324 // { 3325 // if (QApplication::activeModalWidget()) 3326 // QApplication::activeModalWidget()->close(); 3327 // else if (QApplication::activePopupWidget()) 3328 // QApplication::activePopupWidget()->close(); 3329 // else 3330 // { 3311 3331 /// @todo (r=dmik) in general, the following is not that correct 3312 3332 // because some custom modal event loop may not expect to be … … 3314 3334 // flags before calling exitLoop()). The alternative is to do 3315 3335 // nothing but wait keeping to post singleShot timers. 3316 qApp->eventLoop()->exitLoop();3317 }3318 3319 QTimer::singleShot (0, this, SLOT (tryClose()));3320 }3321 else3322 close();3336 // qApp->eventLoop()->exitLoop(); 3337 // } 3338 // 3339 // QTimer::singleShot (0, this, SLOT (tryClose())); 3340 // } 3341 // else 3342 // close(); 3323 3343 } 3324 3344 … … 3403 3423 VBoxSFDialog::VBoxSFDialog (QWidget *aParent, CSession &aSession) 3404 3424 : QDialog (aParent, "VBoxSFDialog", true /* modal */, 3405 WType_Dialog |WShowModal)3425 Qt::WType_Dialog | Qt::WShowModal) 3406 3426 , mSettings (0), mSession (aSession) 3407 3427 { 3408 3428 /* Setup Dialog's options */ 3409 3429 setCaption (tr ("Shared Folders")); 3410 setIcon ( QPixmap::fromMimeSource ("select_file_16px.png"));3430 setIcon (qPixmapFromMimeSource ("select_file_16px.png")); 3411 3431 setSizeGripEnabled (true); 3412 3432 3413 3433 /* Setup main dialog's layout */ 3414 Q VBoxLayout *mainLayout = new QVBoxLayout (this, 10, 10, "mainLayout");3434 Q3VBoxLayout *mainLayout = new Q3VBoxLayout (this, 10, 10, "mainLayout"); 3415 3435 3416 3436 /* Setup settings layout */ … … 3423 3443 3424 3444 /* Setup button's layout */ 3425 Q HBoxLayout *buttonLayout = new QHBoxLayout (mainLayout, 10, "buttonLayout");3445 Q3HBoxLayout *buttonLayout = new Q3HBoxLayout (mainLayout, 10, "buttonLayout"); 3426 3446 QPushButton *pbHelp = new QPushButton (tr ("Help"), this, "pbHelp"); 3427 3447 QSpacerItem *spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDownloaderWgt.cpp
r5999 r7220 23 23 24 24 #include "qaction.h" 25 #include "q progressbar.h"25 #include "q3progressbar.h" 26 26 #include "qtoolbutton.h" 27 27 #include "qlayout.h" … … 29 29 #include "qdir.h" 30 30 #include "qtimer.h" 31 //Added by qt3to4: 32 #include <Q3HBoxLayout> 33 #include <QEvent> 31 34 32 35 /* These notifications are used to notify the GUI thread about different … … 129 132 , mConn (new HConnect (mUrl.host(), 80)) 130 133 , mRequestThread (0) 131 , mDataStream ( mDataArray, IO_WriteOnly)134 , mDataStream (&mDataArray, QIODevice::WriteOnly) 132 135 , mTimeout (new QTimer (this)) 133 136 { … … 140 143 setFixedHeight (16); 141 144 142 mProgressBar = new Q ProgressBar (this);145 mProgressBar = new Q3ProgressBar (this); 143 146 mProgressBar->setFixedWidth (100); 144 147 mProgressBar->setPercentageVisible (true); … … 147 150 mCancelButton = new QToolButton (this); 148 151 mCancelButton->setAutoRaise (true); 149 mCancelButton->setFocusPolicy ( TabFocus);152 mCancelButton->setFocusPolicy (Qt::TabFocus); 150 153 connect (mCancelButton, SIGNAL (clicked()), 151 154 this, SLOT (processAbort())); 152 155 153 Q HBoxLayout *mainLayout = new QHBoxLayout (this);156 Q3HBoxLayout *mainLayout = new Q3HBoxLayout (this); 154 157 mainLayout->addWidget (mProgressBar); 155 158 mainLayout->addWidget (mCancelButton); … … 241 244 { 242 245 QFile file (mTarget); 243 if (file.open ( IO_WriteOnly))246 if (file.open (QIODevice::WriteOnly)) 244 247 { 245 248 file.writeBlock (mDataArray); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFBDDRAW.cpp
r7207 r7220 24 24 25 25 #include <qapplication.h> 26 //Added by qt3to4: 27 #include <QMoveEvent> 28 #include <QPaintEvent> 26 29 27 30 #include <iprt/param.h> -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFBQuartz2D.cpp
r7207 r7220 29 29 /* Qt includes */ 30 30 #include <qapplication.h> 31 #include <q mainwindow.h>31 #include <q3mainwindow.h> 32 32 #include <qstatusbar.h> 33 //Added by qt3to4: 34 #include <QPaintEvent> 35 #include <Q3MemArray> 33 36 34 37 /** @class VBoxQuartz2DFrameBuffer … … 237 240 /* Ok, for more performance we set a clipping path of the 238 241 * regions given by this paint event. */ 239 Q MemArray <QRect> a = pe->region().rects();242 Q3MemArray <QRect> a = pe->region().rects(); 240 243 if (a.size() > 0) 241 244 { -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp
r7207 r7220 24 24 25 25 #include <qapplication.h> 26 //Added by qt3to4: 27 #include <QPaintEvent> 26 28 27 29 // … … 341 343 r.width(), r.height())); 342 344 343 ::bitBlt (mView->viewport(), r.x(), r.y(), 344 &mPM, 0, 0, 345 r.width(), r.height(), 346 Qt::CopyROP, TRUE); 345 #warning port me 346 // ::bitBlt (mView->viewport(), r.x(), r.y(), 347 // &mPM, 0, 0, 348 // r.width(), r.height(), 349 // Qt::CopyROP, TRUE); 347 350 } 348 351 else … … 353 356 0, 0, QImage::LittleEndian)); 354 357 355 ::bitBlt (mView->viewport(), r.x(), r.y(), 356 &mPM, r.x() + mView->contentsX(), 0, 357 r.width(), r.height(), 358 Qt::CopyROP, TRUE); 358 #warning port me 359 // ::bitBlt (mView->viewport(), r.x(), r.y(), 360 // &mPM, r.x() + mView->contentsX(), 0, 361 // r.width(), r.height(), 362 // Qt::CopyROP, TRUE); 359 363 } 360 364 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r7207 r7220 24 24 #include "VBoxProblemReporter.h" 25 25 #include "QIHotKeyEdit.h" 26 //Added by qt3to4: 27 #include <QDesktopWidget> 28 #include <Q3CString> 29 #include <q3mimefactory.h> 30 #include <QTranslator> 31 #include <Q3VBoxLayout> 32 #include <Q3Frame> 33 #include <QEvent> 34 #include <QShowEvent> 35 #include <Q3PopupMenu> 36 #include <Q3HBoxLayout> 26 37 27 38 #ifdef VBOX_WITH_REGISTRATION … … 32 43 #include <qmessagebox.h> 33 44 #include <qpixmap.h> 34 #include <qicon set.h>35 #include <qwidget list.h>36 #include <q filedialog.h>45 #include <qicon.h> 46 #include <qwidget.h> 47 #include <q3filedialog.h> 37 48 #include <qimage.h> 38 49 #include <qlabel.h> … … 40 51 41 52 #ifdef Q_WS_X11 42 #include <q textbrowser.h>53 #include <q3textbrowser.h> 43 54 #include <qpushbutton.h> 44 55 #include <qlayout.h> … … 50 61 #include <qregexp.h> 51 62 #include <qlocale.h> 52 #include <q process.h>63 #include <q3process.h> 53 64 54 65 #if defined (Q_WS_MAC) … … 415 426 { 416 427 winfilters += *it; 417 winfilters += QChar:: null;428 winfilters += QChar::Null; 418 429 winfilters += extractFilter (*it); 419 winfilters += QChar:: null;420 } 421 winfilters += QChar:: null;430 winfilters += QChar::Null; 431 } 432 winfilters += QChar::Null; 422 433 return winfilters; 423 434 } … … 557 568 { 558 569 setCaption ("VirtualBox License"); 559 setIcon ( QPixmap::fromMimeSource ("ico40x01.png"));560 561 mLicenseText = new Q TextBrowser (this);570 setIcon (qPixmapFromMimeSource ("ico40x01.png")); 571 572 mLicenseText = new Q3TextBrowser (this); 562 573 mAgreeButton = new QPushButton (tr ("I &Agree"), this); 563 574 mDisagreeButton = new QPushButton (tr ("I &Disagree"), this); … … 570 581 connect (mDisagreeButton, SIGNAL (clicked()), SLOT (reject())); 571 582 572 Q VBoxLayout *mainLayout = new QVBoxLayout (this, 10, 10);583 Q3VBoxLayout *mainLayout = new Q3VBoxLayout (this, 10, 10); 573 584 mainLayout->addWidget (mLicenseText); 574 585 575 Q HBoxLayout *buttonLayout = new QHBoxLayout (mainLayout, 10);586 Q3HBoxLayout *buttonLayout = new Q3HBoxLayout (mainLayout, 10); 576 587 buttonLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding, 577 588 QSizePolicy::Preferred)); … … 590 601 /* read & show the license file */ 591 602 QFile file (mFilePath); 592 if (file.open ( IO_ReadOnly))603 if (file.open (QIODevice::ReadOnly)) 593 604 { 594 605 mLicenseText->setText (file.readAll()); … … 622 633 QDialog::showEvent (aEvent); 623 634 bool isScrollBarHidden = mLicenseText->verticalScrollBar()->isHidden() 624 && !(windowState() & WindowMinimized);635 && !(windowState() & Qt::WindowMinimized); 625 636 mAgreeButton->setEnabled (isScrollBarHidden); 626 637 mDisagreeButton->setEnabled (isScrollBarHidden); … … 633 644 case QEvent::Hide: 634 645 if (aObject == mLicenseText->verticalScrollBar() && 635 (windowState() & WindowActive))646 (windowState() & Qt::WindowActive)) 636 647 unlockButtons(); 637 648 default: … … 642 653 643 654 QString mFilePath; 644 Q TextBrowser *mLicenseText;655 Q3TextBrowser *mLicenseText; 645 656 QPushButton *mAgreeButton; 646 657 QPushButton *mDisagreeButton; … … 1429 1440 if (device == KDeviceType_Null) 1430 1441 continue; 1431 if ( bootOrder)1442 if (!bootOrder.isEmpty()) 1432 1443 bootOrder += ", "; 1433 1444 bootOrder += toString (device); 1434 1445 } 1435 if ( !bootOrder)1446 if (bootOrder.isEmpty()) 1436 1447 bootOrder = toString (KDeviceType_Null); 1437 1448 … … 2305 2316 * human readable key names, we keep a table of them, which must be 2306 2317 * updated when the language is changed. */ 2307 QIHotKeyEdit::languageChange(); 2318 #warning port me 2319 QIHotKeyEdit::languageChange_qt3(); 2308 2320 #endif 2309 2321 } … … 2343 2355 AssertReturnVoid (aLabel); 2344 2356 2345 QPixmap *pix = aLabel->pixmap();2357 const QPixmap *pix = aLabel->pixmap(); 2346 2358 QImage img = pix->convertToImage(); 2347 2359 QRgb rgbBack = img.pixel (img.width() - 1, img.height() - 1); 2348 2360 QRgb rgbFrame = img.pixel (img.width() - 1, 0); 2349 2361 2350 aLabel->setAlignment ( AlignTop);2362 aLabel->setAlignment (Qt::AlignTop); 2351 2363 2352 2364 aLabel->setPaletteBackgroundColor (QColor (rgbBack)); 2353 aLabel->setFrameShadow (Q Frame::Plain);2354 aLabel->setFrameShape (Q Frame::Box);2365 aLabel->setFrameShadow (Q3Frame::Plain); 2366 aLabel->setFrameShape (Q3Frame::Box); 2355 2367 aLabel->setPaletteForegroundColor (QColor (rgbFrame)); 2356 2368 } … … 2372 2384 { 2373 2385 QFile file (aFileName); 2374 if (!file.open ( IO_ReadOnly))2386 if (!file.open (QIODevice::ReadOnly)) 2375 2387 return false; 2376 2388 mData = file.readAll(); … … 2535 2547 2536 2548 /* static */ 2537 QIcon SetVBoxGlobal::iconSet (const char *aNormal,2549 QIcon VBoxGlobal::iconSet (const char *aNormal, 2538 2550 const char *aDisabled /* = 0 */, 2539 2551 const char *aActive /* = 0 */) … … 2541 2553 Assert (aNormal); 2542 2554 2543 QIcon SeticonSet;2544 2545 iconSet.setPixmap ( QPixmap::fromMimeSource (aNormal),2546 QIcon Set::Automatic, QIconSet::Normal);2555 QIcon iconSet; 2556 2557 iconSet.setPixmap (qPixmapFromMimeSource (aNormal), 2558 QIcon::Automatic, QIcon::Normal); 2547 2559 if (aDisabled) 2548 iconSet.setPixmap ( QPixmap::fromMimeSource (aDisabled),2549 QIcon Set::Automatic, QIconSet::Disabled);2560 iconSet.setPixmap (qPixmapFromMimeSource (aDisabled), 2561 QIcon::Automatic, QIcon::Disabled); 2550 2562 if (aActive) 2551 iconSet.setPixmap ( QPixmap::fromMimeSource (aActive),2552 QIcon Set::Automatic, QIconSet::Active);2563 iconSet.setPixmap (qPixmapFromMimeSource (aActive), 2564 QIcon::Automatic, QIcon::Active); 2553 2565 return iconSet; 2554 2566 } 2555 2567 2556 2568 /* static */ 2557 QIcon SetVBoxGlobal::2569 QIcon VBoxGlobal:: 2558 2570 iconSetEx (const char *aNormal, const char *aSmallNormal, 2559 2571 const char *aDisabled /* = 0 */, const char *aSmallDisabled /* = 0 */, … … 2563 2575 Assert (aSmallNormal); 2564 2576 2565 QIcon SeticonSet;2566 2567 iconSet.setPixmap ( QPixmap::fromMimeSource (aNormal),2568 QIcon Set::Large, QIconSet::Normal);2569 iconSet.setPixmap ( QPixmap::fromMimeSource (aSmallNormal),2570 QIcon Set::Small, QIconSet::Normal);2577 QIcon iconSet; 2578 2579 iconSet.setPixmap (qPixmapFromMimeSource (aNormal), 2580 QIcon::Large, QIcon::Normal); 2581 iconSet.setPixmap (qPixmapFromMimeSource (aSmallNormal), 2582 QIcon::Small, QIcon::Normal); 2571 2583 if (aSmallDisabled) 2572 2584 { 2573 iconSet.setPixmap ( QPixmap::fromMimeSource (aDisabled),2574 QIcon Set::Large, QIconSet::Disabled);2575 iconSet.setPixmap ( QPixmap::fromMimeSource (aSmallDisabled),2576 QIcon Set::Small, QIconSet::Disabled);2585 iconSet.setPixmap (qPixmapFromMimeSource (aDisabled), 2586 QIcon::Large, QIcon::Disabled); 2587 iconSet.setPixmap (qPixmapFromMimeSource (aSmallDisabled), 2588 QIcon::Small, QIcon::Disabled); 2577 2589 } 2578 2590 if (aSmallActive) 2579 2591 { 2580 iconSet.setPixmap ( QPixmap::fromMimeSource (aActive),2581 QIcon Set::Large, QIconSet::Active);2582 iconSet.setPixmap ( QPixmap::fromMimeSource (aSmallActive),2583 QIcon Set::Small, QIconSet::Active);2592 iconSet.setPixmap (qPixmapFromMimeSource (aActive), 2593 QIcon::Large, QIcon::Active); 2594 iconSet.setPixmap (qPixmapFromMimeSource (aSmallActive), 2595 QIcon::Small, QIcon::Active); 2584 2596 } 2585 2597 … … 2606 2618 2607 2619 /* remember the icon set as setText() will kill it */ 2608 QIcon Setiset = aToolButton->iconSet();2620 QIcon iset = aToolButton->iconSet(); 2609 2621 /* re-use the setText() method to detect and set the accelerator */ 2610 2622 aToolButton->setText (aTextLabel); … … 2701 2713 int extraw = 0, extrah = 0; 2702 2714 2703 QWidgetList *list = QApplication::topLevelWidgets();2704 Q WidgetListIt it (*list);2705 while ((extraw == 0 || extrah == 0) && it. current() != 0)2715 QWidgetList list = QApplication::topLevelWidgets(); 2716 QListIterator<QWidget*> it (list); 2717 while ((extraw == 0 || extrah == 0) && it.hasNext()) 2706 2718 { 2707 2719 int framew, frameh; 2708 QWidget *current = it.current(); 2709 ++ it; 2720 QWidget *current = it.next(); 2710 2721 if (!current->isVisible()) 2711 2722 continue; … … 2717 2728 extrah = QMAX (extrah, frameh); 2718 2729 } 2719 delete list;2720 2730 2721 2731 /// @todo (r=dmik) not sure if we really need this … … 3140 3150 #else 3141 3151 3142 return Q FileDialog::getExistingDirectory (aDir, aParent, aName, aCaption,3152 return Q3FileDialog::getExistingDirectory (aDir, aParent, aName, aCaption, 3143 3153 aDirOnly, aResolveSymlinks); 3144 3154 … … 3282 3292 #else 3283 3293 3284 return Q FileDialog::getOpenFileName (aStartWith, aFilters, aParent, aName,3294 return Q3FileDialog::getOpenFileName (aStartWith, aFilters, aParent, aName, 3285 3295 aCaption, aSelectedFilter, aResolveSymlinks); 3286 3296 … … 3496 3506 if (aParent == NULL) 3497 3507 { 3498 QWidgetList *list = QApplication::topLevelWidgets(); 3499 QWidgetListIt it (*list); 3500 QWidget *w = NULL; 3501 for (; (w = it.current()) != NULL; ++ it) 3508 QWidgetList list = QApplication::topLevelWidgets(); 3509 QWidget* w = NULL; 3510 foreach(w, list) 3502 3511 { 3503 3512 if ((!aName || strcmp (w->name(), aName) == 0) && … … 3511 3520 } 3512 3521 } 3513 delete list;3514 3522 return w; 3515 3523 } 3516 3524 3517 QObjectList *list = aParent->queryList (aName, aClassName, false, true); 3518 QObjectListIt it (*list); 3525 QObjectList list = aParent->queryList (aName, aClassName, false, true); 3519 3526 QObject *obj = NULL; 3520 for (; (obj = it.current()) != NULL; ++ it)3527 foreach(obj, list) 3521 3528 { 3522 3529 if (obj->isWidgetType()) 3523 3530 break; 3524 3531 } 3525 delete list;3526 3532 return (QWidget *) obj; 3527 3533 } … … 3579 3585 QStringList args = QStringList::split (':', commands [i]); 3580 3586 args += aURL; 3581 Q Process cmd (args);3587 Q3Process cmd (args); 3582 3588 if (cmd.start()) 3583 3589 return true; … … 3601 3607 { 3602 3608 ConstStr255Param hint (0x0); 3603 Q CString cs = aURL.local8Bit();3609 Q3CString cs = aURL.local8Bit(); 3604 3610 const char* data = cs.data(); 3605 3611 long length = cs.length(); … … 3635 3641 { 3636 3642 /* Show the already opened registration dialog */ 3637 mRegDlg->setWindowState (mRegDlg->windowState() & ~ WindowMinimized);3643 mRegDlg->setWindowState (mRegDlg->windowState() & ~Qt::WindowMinimized); 3638 3644 mRegDlg->raise(); 3639 3645 mRegDlg->setActiveWindow(); … … 3653 3659 { 3654 3660 /* We've got the "mutex", create a new registration dialog */ 3655 VBoxRegistrationDlg *dlg = 3656 new VBoxRegistrationDlg (0, 0, false, WDestructiveClose); 3657 dlg->setup (&mRegDlg); 3658 Assert (dlg == mRegDlg); 3659 mRegDlg->show(); 3661 #warning port me 3662 // VBoxRegistrationDlg *dlg = 3663 // new VBoxRegistrationDlg (0, 0, false, Qt::WDestructiveClose); 3664 // dlg->setup (&mRegDlg); 3665 // Assert (dlg == mRegDlg); 3666 // mRegDlg->show(); 3660 3667 } 3661 3668 } … … 3763 3770 * order to invalidate cached string resources (like the details view 3764 3771 * templates) that may be used by other widgets. */ 3765 QWidgetList *list = QApplication::topLevelWidgets();3766 if (list ->first() == aObject)3772 QWidgetList list = QApplication::topLevelWidgets(); 3773 if (list.first() == aObject) 3767 3774 { 3768 3775 /* call this only once per every language change (see … … 3770 3777 languageChange(); 3771 3778 } 3772 delete list;3773 3779 } 3774 3780 … … 3847 3853 { 3848 3854 vm_os_type_icons.insert (osTypeIcons [n][0], 3849 new QPixmap ( QPixmap::fromMimeSource (osTypeIcons [n][1])));3855 new QPixmap (qPixmapFromMimeSource (osTypeIcons [n][1]))); 3850 3856 } 3851 3857 … … 3875 3881 { 3876 3882 mStateIcons.insert (vmStateIcons [n].state, 3877 new QPixmap ( QPixmap::fromMimeSource (vmStateIcons [n].name)));3883 new QPixmap (qPixmapFromMimeSource (vmStateIcons [n].name))); 3878 3884 } 3879 3885 3880 3886 // online/offline snapshot icons 3881 mOfflineSnapshotIcon = QPixmap::fromMimeSource ("offline_snapshot_16px.png");3882 mOnlineSnapshotIcon = QPixmap::fromMimeSource ("online_snapshot_16px.png");3887 mOfflineSnapshotIcon = qPixmapFromMimeSource ("offline_snapshot_16px.png"); 3888 mOnlineSnapshotIcon = qPixmapFromMimeSource ("online_snapshot_16px.png"); 3883 3889 3884 3890 // initialize state colors vector 3885 3891 // no ownership of elements, we're passing pointers to existing objects 3886 vm_state_color.insert (KMachineState_Null, &Qt::red);3887 vm_state_color.insert (KMachineState_PoweredOff, &Qt::gray);3888 vm_state_color.insert (KMachineState_Saved, &Qt::yellow);3889 vm_state_color.insert (KMachineState_Aborted, &Qt::darkRed);3890 vm_state_color.insert (KMachineState_Running, &Qt::green);3891 vm_state_color.insert (KMachineState_Paused, &Qt::darkGreen);3892 vm_state_color.insert (KMachineState_Stuck, &Qt::darkMagenta);3893 vm_state_color.insert (KMachineState_Starting, &Qt::green);3894 vm_state_color.insert (KMachineState_Stopping, &Qt::green);3895 vm_state_color.insert (KMachineState_Saving, &Qt::green);3896 vm_state_color.insert (KMachineState_Restoring, &Qt::green);3897 vm_state_color.insert (KMachineState_Discarding, &Qt::green);3892 vm_state_color.insert (KMachineState_Null, new QColor(Qt::red)); 3893 vm_state_color.insert (KMachineState_PoweredOff, new QColor(Qt::gray)); 3894 vm_state_color.insert (KMachineState_Saved, new QColor(Qt::yellow)); 3895 vm_state_color.insert (KMachineState_Aborted, new QColor(Qt::darkRed)); 3896 vm_state_color.insert (KMachineState_Running, new QColor(Qt::green)); 3897 vm_state_color.insert (KMachineState_Paused, new QColor(Qt::darkGreen)); 3898 vm_state_color.insert (KMachineState_Stuck, new QColor(Qt::darkMagenta)); 3899 vm_state_color.insert (KMachineState_Starting, new QColor(Qt::green)); 3900 vm_state_color.insert (KMachineState_Stopping, new QColor(Qt::green)); 3901 vm_state_color.insert (KMachineState_Saving, new QColor(Qt::green)); 3902 vm_state_color.insert (KMachineState_Restoring, new QColor(Qt::green)); 3903 vm_state_color.insert (KMachineState_Discarding, new QColor(Qt::green)); 3898 3904 3899 3905 qApp->installEventFilter (this); … … 3988 3994 * QToolButton::sizeHint()). 3989 3995 */ 3990 QIconSet::setIconSize (QIconSet::Small, QSize (16, 16)); 3991 QIconSet::setIconSize (QIconSet::Large, QSize (22, 22)); 3996 #warning port me 3997 // QIcon::setIconSize (QIcon::Small, QSize (16, 16)); 3998 // QIcon::setIconSize (QIcon::Large, QSize (22, 22)); 3992 3999 3993 4000 mValid = true; … … 4064 4071 * This class provides the list of USB devices attached to the host. 4065 4072 */ 4066 VBoxUSBMenu::VBoxUSBMenu (QWidget *aParent) : Q PopupMenu (aParent)4073 VBoxUSBMenu::VBoxUSBMenu (QWidget *aParent) : Q3PopupMenu (aParent) 4067 4074 { 4068 4075 connect (this, SIGNAL (aboutToShow()), … … 4149 4156 VBoxSwitchMenu::VBoxSwitchMenu (QWidget *aParent, QAction *aAction, 4150 4157 bool aInverted) 4151 : Q PopupMenu (aParent), mAction (aAction), mInverted (aInverted)4158 : Q3PopupMenu (aParent), mAction (aAction), mInverted (aInverted) 4152 4159 { 4153 4160 /* this menu works only with toggle action */ -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxMediaComboBox.cpp
r6823 r7220 25 25 #include <qfile.h> 26 26 #include <qtooltip.h> 27 #include <qlistbox.h> 27 #include <q3listbox.h> 28 //Added by qt3to4: 29 #include <QPixmap> 28 30 29 31 VBoxMediaComboBox::VBoxMediaComboBox (QWidget *aParent, const char *aName, … … 51 53 52 54 /* in some qt themes embedded list-box is not used by default, so create it */ 53 if (!listBox()) 54 setListBox (new QListBox (this)); 55 if (listBox()) 56 connect (listBox(), SIGNAL (onItem (QListBoxItem*)), 57 this, SLOT (processOnItem (QListBoxItem*))); 55 #warning port me 56 // if (!listBox()) 57 // setListBox (new Q3ListBox (this)); 58 // if (listBox()) 59 // connect (listBox(), SIGNAL (onItem (Q3ListBoxItem*)), 60 // this, SLOT (processOnItem (Q3ListBoxItem*))); 58 61 59 62 /* cache pixmaps as class members */ … … 237 240 } 238 241 239 void VBoxMediaComboBox::processOnItem (Q ListBoxItem* aItem)242 void VBoxMediaComboBox::processOnItem (Q3ListBoxItem* aItem) 240 243 { 241 244 /* combobox item's tooltip attaching */ 242 int index = listBox()->index (aItem); 243 QToolTip::remove (listBox()->viewport()); 244 QToolTip::add (listBox()->viewport(), mTipList [index]); 245 #warning port me 246 // int index = listBox()->index (aItem); 247 // QToolTip::remove (listBox()->viewport()); 248 // QToolTip::add (listBox()->viewport(), mTipList [index]); 245 249 } 246 250 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxNetworkFramework.cpp
r5999 r7220 19 19 #include <VBoxNetworkFramework.h> 20 20 #include <qapplication.h> 21 //Added by qt3to4: 22 #include <QEvent> 21 23 22 24 /* These notifications are used to notify the GUI thread about different -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp
r7207 r7220 28 28 29 29 #include <qmessagebox.h> 30 #include <q progressdialog.h>30 #include <q3progressdialog.h> 31 31 #include <qcursor.h> 32 #include <q process.h>32 #include <q3process.h> 33 33 #include <qeventloop.h> 34 34 #include <qregexp.h> … … 36 36 # include <qpushbutton.h> 37 37 #endif 38 //Added by qt3to4: 39 #include <QTimerEvent> 40 #include <Q3CString> 41 #include <QCloseEvent> 38 42 39 43 #include <iprt/err.h> … … 59 63 * is destroyed. 60 64 */ 61 class VBoxProgressDialog : public Q ProgressDialog65 class VBoxProgressDialog : public Q3ProgressDialog 62 66 { 63 67 public: … … 66 70 int aMinDuration = 2000, QWidget *aCreator = 0, 67 71 const char *aName = 0) 68 : Q ProgressDialog (aCreator, aName, true,69 WStyle_Customize | WStyle_DialogBorder |WStyle_Title)72 : Q3ProgressDialog (aCreator, aName, true, 73 Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_Title) 70 74 , mProgress (aProgress) 71 75 , mCalcelEnabled (true) … … 100 104 virtual void timerEvent (QTimerEvent *e); 101 105 102 virtual void reject() { if (mCalcelEnabled) Q ProgressDialog::reject(); };106 virtual void reject() { if (mCalcelEnabled) Q3ProgressDialog::reject(); }; 103 107 104 108 virtual void closeEvent (QCloseEvent *e) 105 109 { 106 110 if (mCalcelEnabled) 107 Q ProgressDialog::closeEvent (e);111 Q3ProgressDialog::closeEvent (e); 108 112 else 109 113 e->ignore(); … … 129 133 if (mProgress.isOk()) 130 134 { 135 #warning port me 131 136 /* start a refresh timer */ 132 startTimer (aRefreshInterval);133 mLoopLevel = qApp->eventLoop()->loopLevel();134 /* enter the modal loop */135 qApp->eventLoop()->enterLoop();136 killTimers();137 mLoopLevel = -1;138 mEnded = false;137 // startTimer (aRefreshInterval); 138 // mLoopLevel = qApp->eventLoop()->loopLevel(); 139 // /* enter the modal loop */ 140 // qApp->eventLoop()->enterLoop(); 141 // killTimers(); 142 // mLoopLevel = -1; 143 // mEnded = false; 139 144 return result(); 140 145 } … … 165 170 if (mLoopLevel != -1) 166 171 { 167 /* we've entered the loop in run() */ 168 if (mLoopLevel + 1 == qApp->eventLoop()->loopLevel()) 169 { 170 /* it's our loop, exit it */ 171 qApp->eventLoop()->exitLoop(); 172 } 173 else 174 { 175 Assert (mLoopLevel + 1 < qApp->eventLoop()->loopLevel()); 176 /* restart the timer to watch for the loop level to drop */ 177 if (justEnded) 178 startTimer (50); 179 } 172 #warning port me 173 // /* we've entered the loop in run() */ 174 // if (mLoopLevel + 1 == qApp->eventLoop()->loopLevel()) 175 // { 176 // /* it's our loop, exit it */ 177 // qApp->eventLoop()->exitLoop(); 178 // } 179 // else 180 // { 181 // Assert (mLoopLevel + 1 < qApp->eventLoop()->loopLevel()); 182 // /* restart the timer to watch for the loop level to drop */ 183 // if (justEnded) 184 // startTimer (50); 185 // } 180 186 } 181 187 else … … 349 355 box->setButtonText (2, aText3); 350 356 351 if ( aDetails)357 if (!aDetails.isEmpty()) 352 358 { 353 359 box->setDetailsText (aDetails); … … 409 415 int aMinDuration) 410 416 { 411 QApplication::setOverrideCursor (QCursor ( WaitCursor));417 QApplication::setOverrideCursor (QCursor (Qt::WaitCursor)); 412 418 413 419 VBoxProgressDialog progressDlg (aProgress, aTitle, aMinDuration, … … 1764 1770 // - add common buttons like Retry/Save/PowerOff/whatever 1765 1771 1766 Q CString autoConfimId = "showRuntimeError.";1772 Q3CString autoConfimId = "showRuntimeError."; 1767 1773 1768 1774 CConsole console = aConsole; … … 1870 1876 QString formatted; 1871 1877 1872 if ( aInfo.text())1878 if (!aInfo.text().isEmpty()) 1873 1879 formatted += QString ("<table bgcolor=#FFFFFF border=0 cellspacing=0 " 1874 1880 "cellpadding=0 width=100%>" … … 1926 1932 { 1927 1933 QString s = aInfo.interfaceID(); 1928 if ( aInfo.interfaceName())1934 if (!aInfo.interfaceName().isEmpty()) 1929 1935 s = aInfo.interfaceName() + ' ' + s; 1930 1936 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>") … … 1935 1941 { 1936 1942 QString s = aInfo.calleeIID(); 1937 if ( aInfo.calleeName())1943 if (!aInfo.calleeName().isEmpty()) 1938 1944 s = aInfo.calleeName() + ' ' + s; 1939 1945 formatted += QString ("<tr><td>%1</td><td>%2</td></tr>") … … 2013 2019 2014 2020 QString fullProgPath = QString(szDocsPath); 2015 Q Process kchmViewer (QString(szViewerPath) + "/kchmviewer");2021 Q3Process kchmViewer (QString(szViewerPath) + "/kchmviewer"); 2016 2022 kchmViewer.addArgument (fullProgPath + "/VirtualBox.chm"); 2017 kchmViewer.launch ( "");2023 kchmViewer.launch (QString("")); 2018 2024 #elif defined (Q_WS_MAC) 2019 Q Process openApp (QString("/usr/bin/open"));2025 Q3Process openApp (QString("/usr/bin/open")); 2020 2026 openApp.addArgument (qApp->applicationDirPath() + "/UserManual.pdf"); 2021 2027 openApp.launch (""); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r7207 r7220 31 31 32 32 #include <qlabel.h> 33 #include <q textbrowser.h>33 #include <q3textbrowser.h> 34 34 #include <qmenubar.h> 35 #include <q popupmenu.h>35 #include <q3popupmenu.h> 36 36 #include <qmessagebox.h> 37 #include <qwidget list.h>37 #include <qwidget.h> 38 38 #include <qtabwidget.h> 39 #include <q widgetstack.h>40 #include <q button.h>41 #include <q process.h>39 #include <q3widgetstack.h> 40 #include <qpushbutton.h> 41 #include <q3process.h> 42 42 43 43 #include <qlayout.h> 44 #include <qvbox.h> 44 #include <q3vbox.h> 45 //Added by qt3to4: 46 #include <QDesktopWidget> 47 #include <Q3HBoxLayout> 48 #include <Q3Frame> 49 #include <q3mimefactory.h> 50 #include <QResizeEvent> 51 #include <QEvent> 52 #include <Q3VBoxLayout> 53 #include <QMenuItem> 45 54 46 55 #ifdef Q_WS_X11 … … 56 65 * and another one for inaccessibility errors. 57 66 */ 58 class VBoxVMDetailsView : public Q WidgetStack67 class VBoxVMDetailsView : public Q3WidgetStack 59 68 { 60 69 Q_OBJECT … … 106 115 void createErrPage(); 107 116 108 Q TextBrowser *mDetailsText;117 Q3TextBrowser *mDetailsText; 109 118 110 119 QWidget *mErrBox; 111 120 QLabel *mErrLabel; 112 Q TextBrowser *mErrText;121 Q3TextBrowser *mErrText; 113 122 QToolButton *mRefreshButton; 114 123 QAction *mRefreshAction; … … 117 126 VBoxVMDetailsView::VBoxVMDetailsView (QWidget *aParent, const char *aName, 118 127 QAction *aRefreshAction /* = NULL */) 119 : Q WidgetStack (aParent, aName)128 : Q3WidgetStack (aParent, aName) 120 129 , mErrBox (NULL), mErrLabel (NULL), mErrText (NULL) 121 130 , mRefreshButton (NULL) … … 126 135 /* create normal details page */ 127 136 128 mDetailsText = new Q TextBrowser (mErrBox);129 mDetailsText->setFocusPolicy (Q Widget::StrongFocus);137 mDetailsText = new Q3TextBrowser (mErrBox); 138 mDetailsText->setFocusPolicy (Qt::StrongFocus); 130 139 mDetailsText->setLinkUnderline (false); 131 140 /* make "transparent" */ 132 mDetailsText->setFrameShape (Q Frame::NoFrame);141 mDetailsText->setFrameShape (Q3Frame::NoFrame); 133 142 mDetailsText->setPaper (backgroundBrush()); 134 143 … … 148 157 mErrBox = new QWidget(); 149 158 150 Q VBoxLayout *layout = new QVBoxLayout (mErrBox);159 Q3VBoxLayout *layout = new Q3VBoxLayout (mErrBox); 151 160 layout->setSpacing (10); 152 161 153 162 mErrLabel = new QLabel (mErrBox); 154 mErrLabel->setAlignment ( WordBreak);163 mErrLabel->setAlignment (Qt::WordBreak); 155 164 mErrLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed); 156 165 layout->add (mErrLabel); 157 166 158 mErrText = new Q TextBrowser (mErrBox);159 mErrText->setFocusPolicy (Q Widget::StrongFocus);167 mErrText = new Q3TextBrowser (mErrBox); 168 mErrText->setFocusPolicy (Qt::StrongFocus); 160 169 mErrText->setLinkUnderline (false); 161 170 layout->add (mErrText); … … 164 173 { 165 174 mRefreshButton = new QToolButton (mErrBox); 166 mRefreshButton->setFocusPolicy (Q Widget::StrongFocus);167 168 Q HBoxLayout *hLayout = new QHBoxLayout (layout);175 mRefreshButton->setFocusPolicy (Qt::StrongFocus); 176 177 Q3HBoxLayout *hLayout = new Q3HBoxLayout (layout); 169 178 hLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding, 170 179 QSizePolicy::Minimum)); … … 235 244 VBoxSelectorWnd *mParent; 236 245 QToolButton *mBtnEdit; 237 Q TextBrowser *mBrowser;246 Q3TextBrowser *mBrowser; 238 247 QLabel *mLabel; 239 248 }; … … 246 255 { 247 256 /* main layout */ 248 Q VBoxLayout *mainLayout = new QVBoxLayout (this, 0, 10, "mainLayout");257 Q3VBoxLayout *mainLayout = new Q3VBoxLayout (this, 0, 10, "mainLayout"); 249 258 250 259 /* mBrowser */ 251 mBrowser = new Q TextBrowser (this, "mBrowser");260 mBrowser = new Q3TextBrowser (this, "mBrowser"); 252 261 mBrowser->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding); 253 mBrowser->setFocusPolicy (Q Widget::StrongFocus);262 mBrowser->setFocusPolicy (Qt::StrongFocus); 254 263 mBrowser->setLinkUnderline (false); 255 264 mainLayout->addWidget (mBrowser); … … 260 269 mLabel->setFrameStyle (mBrowser->frameStyle()); 261 270 mLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding); 262 mLabel->setAlignment ( AlignCenter |WordBreak);271 mLabel->setAlignment (Qt::AlignCenter | Qt::WordBreak); 263 272 mainLayout->addWidget (mLabel); 264 273 /* always disabled */ … … 266 275 267 276 /* button layout */ 268 Q HBoxLayout *btnLayout = new QHBoxLayout (mainLayout, 10, "btnLayout");277 Q3HBoxLayout *btnLayout = new Q3HBoxLayout (mainLayout, 10, "btnLayout"); 269 278 btnLayout->addItem (new QSpacerItem (0, 0, 270 279 QSizePolicy::Expanding, … … 274 283 mBtnEdit = new QToolButton (this, "mBtnEdit"); 275 284 mBtnEdit->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Fixed); 276 mBtnEdit->setFocusPolicy (Q Widget::StrongFocus);285 mBtnEdit->setFocusPolicy (Qt::StrongFocus); 277 286 mBtnEdit->setIconSet (VBoxGlobal::iconSet ("edit_description_16px.png", 278 287 "edit_description_disabled_16px.png")); … … 379 388 VBoxSelectorWnd:: 380 389 VBoxSelectorWnd (VBoxSelectorWnd **aSelf, QWidget* aParent, const char* aName, 381 WFlags aFlags)382 : Q MainWindow (aParent, aName, aFlags)390 Qt::WFlags aFlags) 391 : Q3MainWindow (aParent, aName, aFlags) 383 392 , doneInaccessibleWarningOnce (false) 384 393 { … … 389 398 390 399 /* application icon */ 391 setIcon ( QPixmap::fromMimeSource ("ico40x01.png"));400 setIcon (qPixmapFromMimeSource ("ico40x01.png")); 392 401 393 402 /* actions */ … … 449 458 /* central widget & horizontal layout */ 450 459 setCentralWidget (new QWidget (this, "centralWidget")); 451 Q HBoxLayout *centralLayout =452 new Q HBoxLayout (centralWidget(), 5, 9, "centralLayout");460 Q3HBoxLayout *centralLayout = 461 new Q3HBoxLayout (centralWidget(), 5, 9, "centralLayout"); 453 462 454 463 /* left vertical box */ 455 Q VBox *leftVBox = new QVBox (centralWidget(), "leftWidget");464 Q3VBox *leftVBox = new Q3VBox (centralWidget(), "leftWidget"); 456 465 leftVBox->setSpacing (5); 457 466 /* right vertical box */ 458 Q VBox *rightVBox = new QVBox (centralWidget(), "rightWidget");467 Q3VBox *rightVBox = new Q3VBox (centralWidget(), "rightWidget"); 459 468 rightVBox->setSpacing (5); 460 469 centralLayout->addWidget (leftVBox, 3); … … 511 520 /* add actions to menubar */ 512 521 513 Q PopupMenu *fileMenu = new QPopupMenu(this, "fileMenu");522 Q3PopupMenu *fileMenu = new Q3PopupMenu(this, "fileMenu"); 514 523 fileDiskMgrAction->addTo( fileMenu ); 515 524 fileMenu->insertSeparator(); … … 520 529 menuBar()->insertItem( QString::null, fileMenu, 1); 521 530 522 Q PopupMenu *vmMenu = new QPopupMenu (this, "vmMenu");531 Q3PopupMenu *vmMenu = new Q3PopupMenu (this, "vmMenu"); 523 532 vmNewAction->addTo (vmMenu); 524 533 vmMenu->insertSeparator(); … … 537 546 menuBar()->insertItem (QString::null, vmMenu, 2); 538 547 539 mVMCtxtMenu = new Q PopupMenu (this, "mVMCtxtMenu");548 mVMCtxtMenu = new Q3PopupMenu (this, "mVMCtxtMenu"); 540 549 vmConfigAction->addTo (mVMCtxtMenu); 541 550 vmDeleteAction->addTo (mVMCtxtMenu); … … 550 559 vmShowLogsAction->addTo (mVMCtxtMenu); 551 560 552 Q PopupMenu *helpMenu = new QPopupMenu( this, "helpMenu" );561 Q3PopupMenu *helpMenu = new Q3PopupMenu( this, "helpMenu" ); 553 562 helpContentsAction->addTo (helpMenu); 554 563 helpWebAction->addTo (helpMenu); … … 610 619 } 611 620 612 clearWState (WState_Polished); 621 #warning port me 622 // clearWState (WState_Polished); 613 623 614 624 /* signals and slots connections */ … … 638 648 &vboxProblem(), SLOT (resetSuppressedMessages())); 639 649 640 connect (vmListBox, SIGNAL (currentChanged(Q ListBoxItem *)),650 connect (vmListBox, SIGNAL (currentChanged(Q3ListBoxItem *)), 641 651 this, SLOT (vmListBoxCurrentChanged())); 642 connect (vmListBox, SIGNAL (selected (Q ListBoxItem *)),652 connect (vmListBox, SIGNAL (selected (Q3ListBoxItem *)), 643 653 this, SLOT (vmStart())); 644 connect (vmListBox, SIGNAL (contextMenuRequested (Q ListBoxItem *, const QPoint &)),645 this, SLOT (showContextMenu (Q ListBoxItem *, const QPoint &)));654 connect (vmListBox, SIGNAL (contextMenuRequested (Q3ListBoxItem *, const QPoint &)), 655 this, SLOT (showContextMenu (Q3ListBoxItem *, const QPoint &))); 646 656 647 657 connect (vmDetailsView, SIGNAL (linkClicked (const QString &)), … … 687 697 /* save vm selector position */ 688 698 { 689 Q ListBoxItem *item = vmListBox->selectedItem();699 Q3ListBoxItem *item = vmListBox->selectedItem(); 690 700 QString curVMId = item ? 691 701 QString (static_cast<VBoxVMListBoxItem*> (item)->id()) : … … 1054 1064 } 1055 1065 1056 void VBoxSelectorWnd::showContextMenu (Q ListBoxItem *aItem, const QPoint &aPoint)1066 void VBoxSelectorWnd::showContextMenu (Q3ListBoxItem *aItem, const QPoint &aPoint) 1057 1067 { 1058 1068 if (aItem) … … 1074 1084 { 1075 1085 QResizeEvent *re = (QResizeEvent *) e; 1076 if ((windowState() & ( WindowMaximized |WindowMinimized |1077 WindowFullScreen)) == 0)1086 if ((windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | 1087 Qt::WindowFullScreen)) == 0) 1078 1088 normal_size = re->size(); 1079 1089 break; … … 1081 1091 case QEvent::Move: 1082 1092 { 1083 if ((windowState() & ( WindowMaximized |WindowMinimized |1084 WindowFullScreen)) == 0)1093 if ((windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | 1094 Qt::WindowFullScreen)) == 0) 1085 1095 normal_pos = pos(); 1086 1096 break; … … 1096 1106 } 1097 1107 1098 return Q MainWindow::event (e);1108 return Q3MainWindow::event (e); 1099 1109 } 1100 1110 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMListBox.cpp
r7207 r7220 29 29 30 30 #include <qfileinfo.h> 31 //Added by qt3to4: 32 #include <QPixmap> 33 #include <q3mimefactory.h> 34 #include <QFocusEvent> 31 35 32 36 #if defined (Q_WS_MAC) … … 140 144 //////////////////////////////////////////////////////////////////////////////// 141 145 142 class VBoxVMListBoxTip : public QToolTip 143 { 144 public: 145 146 VBoxVMListBoxTip (VBoxVMListBox *aLB, QToolTipGroup *aTG = 0) 147 : QToolTip (aLB, aTG) 148 {} 149 150 virtual ~VBoxVMListBoxTip() 151 { 152 remove (parentWidget()); 153 } 154 155 void maybeTip (const QPoint &aPnt); 156 }; 157 158 void VBoxVMListBoxTip::maybeTip (const QPoint &aPnt) 159 { 160 const VBoxVMListBox *lb = static_cast <VBoxVMListBox *> (parentWidget()); 161 162 VBoxVMListBoxItem *vmi = static_cast <VBoxVMListBoxItem *> (lb->itemAt (aPnt)); 163 if (!vmi) 164 return; 165 166 if (parentWidget()->topLevelWidget()->inherits ("QMainWindow")) 167 { 168 /* 169 * Ensure the main window doesn't show the text from the previous 170 * tooltip in the status bar. 171 */ 172 QToolTipGroup *toolTipGroup = 173 (::qt_cast <QMainWindow *> (parentWidget()->topLevelWidget()))-> 174 toolTipGroup(); 175 if (toolTipGroup) 176 { 177 int index = toolTipGroup->metaObject()->findSignal("removeTip()", false); 178 toolTipGroup->qt_emit (index, 0); 179 } 180 } 181 182 tip (lb->itemRect (vmi), vmi->toolTipText()); 183 } 146 #warning port me 147 //class VBoxVMListBoxTip : public QToolTip 148 //{ 149 //public: 150 // 151 // VBoxVMListBoxTip (VBoxVMListBox *aLB, QToolTipGroup *aTG = 0) 152 // : QToolTip (aLB, aTG) 153 // {} 154 // 155 // virtual ~VBoxVMListBoxTip() 156 // { 157 // remove (parentWidget()); 158 // } 159 // 160 // void maybeTip (const QPoint &aPnt); 161 //}; 162 // 163 //void VBoxVMListBoxTip::maybeTip (const QPoint &aPnt) 164 //{ 165 // const VBoxVMListBox *lb = static_cast <VBoxVMListBox *> (parentWidget()); 166 // 167 // VBoxVMListBoxItem *vmi = static_cast <VBoxVMListBoxItem *> (lb->itemAt (aPnt)); 168 // if (!vmi) 169 // return; 170 // 171 // if (parentWidget()->topLevelWidget()->inherits ("QMainWindow")) 172 // { 173 // /* 174 // * Ensure the main window doesn't show the text from the previous 175 // * tooltip in the status bar. 176 // */ 177 // QToolTipGroup *toolTipGroup = 178 // (::qt_cast <Q3MainWindow *> (parentWidget()->topLevelWidget()))-> 179 // toolTipGroup(); 180 // if (toolTipGroup) 181 // { 182 // int index = toolTipGroup->metaObject()->findSignal("removeTip()", false); 183 // toolTipGroup->qt_emit (index, 0); 184 // } 185 // } 186 // 187 // tip (lb->itemRect (vmi), vmi->toolTipText()); 188 //} 184 189 185 190 //////////////////////////////////////////////////////////////////////////////// … … 193 198 VBoxVMListBox:: 194 199 VBoxVMListBox (QWidget *aParent /* = 0 */, const char *aName /* = NULL */, 195 WFlags aFlags /* = 0 */)196 : Q ListBox (aParent, aName, aFlags)200 Qt::WFlags aFlags /* = 0 */) 201 : Q3ListBox (aParent, aName, aFlags) 197 202 { 198 203 mVBox = vboxGlobal().virtualBox(); … … 205 210 mMargin = QMAX (fontMetrics().width (' ') * 2, 8); 206 211 207 mToolTip = new VBoxVMListBoxTip (this); 212 #warning port me 213 // mToolTip = new VBoxVMListBoxTip (this); 208 214 209 215 mGaveFocusToPopup = false; … … 214 220 VBoxVMListBox::~VBoxVMListBox() 215 221 { 216 delete mToolTip; 222 #warning port me 223 // delete mToolTip; 217 224 } 218 225 … … 244 251 for (uint i = 0; i < count(); i++) 245 252 { 246 VBoxVMListBoxItem *vmi = (VBoxVMListBoxItem *) Q ListBox::item (i);253 VBoxVMListBoxItem *vmi = (VBoxVMListBoxItem *) Q3ListBox::item (i); 247 254 if (vmi->id() == aID) 248 255 { … … 263 270 for (uint i = 0; i < count(); i++) 264 271 { 265 VBoxVMListBoxItem *vmi = (VBoxVMListBoxItem *) Q ListBox::item (i);272 VBoxVMListBoxItem *vmi = (VBoxVMListBoxItem *) Q3ListBox::item (i); 266 273 if (vmi->id() == aID) 267 274 return vmi; … … 285 292 * Here is a modified extract from qlistbox.cpp: */ 286 293 287 bool drawActiveSelection = 288 !style().styleHint (QStyle::SH_ItemView_ChangeHighlightOnFocus, this) || 289 hasFocus() || 290 mGaveFocusToPopup; 291 292 return (drawActiveSelection ? colorGroup() : palette().inactive()); 294 #warning port me 295 // bool drawActiveSelection = 296 // !style().styleHint (QStyle::SH_ItemView_ChangeHighlightOnFocus, this) || 297 // hasFocus() || 298 // mGaveFocusToPopup; 299 // 300 // return (drawActiveSelection ? colorGroup() : palette().inactive()); 301 return colorGroup(); 293 302 } 294 303 … … 299 308 { 300 309 mGaveFocusToPopup = false; 301 Q ListBox::focusInEvent (aE);310 Q3ListBox::focusInEvent (aE); 302 311 } 303 312 … … 306 315 /* A modified extract from qlistbox.cpp (see #activeColorGroup()): */ 307 316 mGaveFocusToPopup = 308 QFocusEvent::reason() == QFocusEvent::Popup || 317 #warning port me: check this 318 aE->reason() == QFocusEvent::Popup || 319 // QFocusEvent::reason() == QFocusEvent::Popup || 309 320 (qApp->focusWidget() && qApp->focusWidget()->inherits ("QMenuBar")); 310 Q ListBox::focusOutEvent (aE);321 Q3ListBox::focusOutEvent (aE); 311 322 } 312 323 … … 319 330 320 331 VBoxVMListBoxItem::VBoxVMListBoxItem (VBoxVMListBox *aLB, const CMachine &aM) 321 : Q ListBoxItem (aLB), mMachine (aM)332 : Q3ListBoxItem (aLB), mMachine (aM) 322 333 { 323 334 recache(); … … 443 454 } 444 455 445 int VBoxVMListBoxItem::width (const Q ListBox *) const456 int VBoxVMListBoxItem::width (const Q3ListBox *) const 446 457 { 447 458 /* see the picture below for dimensions */ … … 467 478 { 468 479 /// @todo (r=dmik) temporary 469 pmOSType = QPixmap::fromMimeSource ("os_other.png");470 pmState = QPixmap::fromMimeSource ("state_aborted_16px.png");480 pmOSType = qPixmapFromMimeSource ("os_other.png"); 481 pmState = qPixmapFromMimeSource ("state_aborted_16px.png"); 471 482 strState = VBoxVMListBox::tr ("Inaccessible"); 472 483 } … … 482 493 } 483 494 484 int VBoxVMListBoxItem::height (const Q ListBox *) const495 int VBoxVMListBoxItem::height (const Q3ListBox *) const 485 496 { 486 497 /* see the picture below for dimensions */ … … 503 514 { 504 515 /// @todo (r=dmik) temporary 505 pmOSType = QPixmap::fromMimeSource ("os_other.png");506 pmState = QPixmap::fromMimeSource ("state_aborted_16px.png");516 pmOSType = qPixmapFromMimeSource ("os_other.png"); 517 pmState = qPixmapFromMimeSource ("state_aborted_16px.png"); 507 518 } 508 519 … … 685 696 { 686 697 /// @todo (r=dmik) temporary 687 pmOSType = QPixmap::fromMimeSource ("os_other.png");688 pmState = QPixmap::fromMimeSource ("state_aborted_16px.png");698 pmOSType = qPixmapFromMimeSource ("os_other.png"); 699 pmState = qPixmapFromMimeSource ("state_aborted_16px.png"); 689 700 strState = VBoxVMListBox::tr ("Inaccessible"); 690 701 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxAboutDlg.ui.h
r6285 r7220 1 //Added by qt3to4: 2 #include <QMouseEvent> 1 3 /** 2 4 * -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxDiskImageManagerDlg.ui
r5999 r7220 496 496 <include location="global" impldecl="in implementation">qapplication.h</include> 497 497 <include location="global" impldecl="in implementation">qprogressdialog.h</include> 498 <include location="global" impldecl="in implementation">qfocusdata.h</include>499 498 <include location="global" impldecl="in implementation">qobjectlist.h</include> 500 499 <include location="global" impldecl="in implementation">qdragobject.h</include> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxDiskImageManagerDlg.ui.h
r7207 r7220 1 //Added by qt3to4: 2 #include <QResizeEvent> 3 #include <QLabel> 4 #include <QPixmap> 5 #include <QCloseEvent> 6 #include <Q3GridLayout> 7 #include <QShowEvent> 8 #include <q3mimefactory.h> 9 #include <QDragEnterEvent> 10 #include <QKeyEvent> 11 #include <QEvent> 12 #include <Q3VBoxLayout> 13 #include <Q3Frame> 14 #include <QDropEvent> 15 #include <QCustomEvent> 16 #include <Q3PopupMenu> 17 #include <QMenuBar> 18 #include <QMenuItem> 1 19 /** 2 20 * … … 27 45 28 46 29 class DiskImageItem : public Q ListViewItem47 class DiskImageItem : public Q3ListViewItem 30 48 { 31 49 public: … … 34 52 35 53 DiskImageItem (DiskImageItem *parent) : 36 Q ListViewItem (parent), mStatus (VBoxMedia::Unknown) {}37 38 DiskImageItem (Q ListView *parent) :39 Q ListViewItem (parent), mStatus (VBoxMedia::Unknown) {}54 Q3ListViewItem (parent), mStatus (VBoxMedia::Unknown) {} 55 56 DiskImageItem (Q3ListView *parent) : 57 Q3ListViewItem (parent), mStatus (VBoxMedia::Unknown) {} 40 58 41 59 void setMedia (const VBoxMedia &aMedia) { mMedia = aMedia; } … … 100 118 int rtti() const { return TypeId; } 101 119 102 int compare (Q ListViewItem *aItem, int aColumn, bool aAscending) const120 int compare (Q3ListViewItem *aItem, int aColumn, bool aAscending) const 103 121 { 104 122 ULONG64 thisValue = vboxGlobal().parseSize ( text (aColumn)); … … 112 130 } 113 131 else 114 return Q ListViewItem::compare (aItem, aColumn, aAscending);132 return Q3ListViewItem::compare (aItem, aColumn, aAscending); 115 133 } 116 134 117 135 DiskImageItem* nextSibling() const 118 136 { 119 return (Q ListViewItem::nextSibling() &&120 Q ListViewItem::nextSibling()->rtti() == DiskImageItem::TypeId) ?121 static_cast<DiskImageItem*> (Q ListViewItem::nextSibling()) : 0;137 return (Q3ListViewItem::nextSibling() && 138 Q3ListViewItem::nextSibling()->rtti() == DiskImageItem::TypeId) ? 139 static_cast<DiskImageItem*> (Q3ListViewItem::nextSibling()) : 0; 122 140 } 123 141 … … 128 146 if (mStatus == VBoxMedia::Unknown) 129 147 cGroup.setColor (QColorGroup::Text, cGroup.mid()); 130 Q ListViewItem::paintCell (aPainter, cGroup, aColumn, aWidth, aSlign);148 Q3ListViewItem::paintCell (aPainter, cGroup, aColumn, aWidth, aSlign); 131 149 } 132 150 … … 154 172 155 173 156 class DiskImageItemIterator : public Q ListViewItemIterator174 class DiskImageItemIterator : public Q3ListViewItemIterator 157 175 { 158 176 public: 159 177 160 DiskImageItemIterator (Q ListView* aList)161 : Q ListViewItemIterator (aList) {}178 DiskImageItemIterator (Q3ListView* aList) 179 : Q3ListViewItemIterator (aList) {} 162 180 163 181 DiskImageItem* operator*() 164 182 { 165 Q ListViewItem *item = QListViewItemIterator::operator*();183 Q3ListViewItem *item = Q3ListViewItemIterator::operator*(); 166 184 return item && item->rtti() == DiskImageItem::TypeId ? 167 185 static_cast<DiskImageItem*> (item) : 0; … … 170 188 DiskImageItemIterator& operator++() 171 189 { 172 return (DiskImageItemIterator&) Q ListViewItemIterator::operator++();190 return (DiskImageItemIterator&) Q3ListViewItemIterator::operator++(); 173 191 } 174 192 }; … … 200 218 new VBoxDiskImageManagerDlg (NULL, 201 219 "VBoxDiskImageManagerDlg", 202 WType_TopLevel |WDestructiveClose);220 Qt::WType_TopLevel | Qt::WDestructiveClose); 203 221 mModelessDialog->setup (VBoxDefs::HD | VBoxDefs::CD | VBoxDefs::FD, 204 222 false, NULL, aRefresh); … … 218 236 mModelessDialog->show(); 219 237 mModelessDialog->setWindowState (mModelessDialog->windowState() & 220 ~ WindowMinimized);238 ~Qt::WindowMinimized); 221 239 mModelessDialog->setActiveWindow(); 222 240 } … … 234 252 Assert (!vbox.isNull()); 235 253 236 setIcon ( QPixmap::fromMimeSource ("diskim_16px.png"));254 setIcon (qPixmapFromMimeSource ("diskim_16px.png")); 237 255 238 256 type = VBoxDefs::InvalidType; … … 278 296 cdsView->setShowToolTips (false); 279 297 fdsView->setShowToolTips (false); 280 connect (hdsView, SIGNAL (onItem (Q ListViewItem*)),281 this, SLOT (mouseOnItem(Q ListViewItem*)));282 connect (cdsView, SIGNAL (onItem (Q ListViewItem*)),283 this, SLOT (mouseOnItem(Q ListViewItem*)));284 connect (fdsView, SIGNAL (onItem (Q ListViewItem*)),285 this, SLOT (mouseOnItem(Q ListViewItem*)));298 connect (hdsView, SIGNAL (onItem (Q3ListViewItem*)), 299 this, SLOT (mouseOnItem(Q3ListViewItem*))); 300 connect (cdsView, SIGNAL (onItem (Q3ListViewItem*)), 301 this, SLOT (mouseOnItem(Q3ListViewItem*))); 302 connect (fdsView, SIGNAL (onItem (Q3ListViewItem*)), 303 this, SLOT (mouseOnItem(Q3ListViewItem*))); 286 304 287 305 … … 293 311 294 312 /* context menu composing */ 295 itemMenu = new Q PopupMenu (this, "itemMenu");313 itemMenu = new Q3PopupMenu (this, "itemMenu"); 296 314 297 315 imNewAction = new QAction (this, "imNewAction"); … … 340 358 toolBar = new VBoxToolBar (this, centralWidget(), "toolBar"); 341 359 toolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Minimum); 342 ((Q VBoxLayout*)centralWidget()->layout())->insertWidget(0, toolBar);360 ((Q3VBoxLayout*)centralWidget()->layout())->insertWidget(0, toolBar); 343 361 344 362 toolBar->setUsesTextLabel (true); … … 359 377 360 378 /* menu bar */ 361 Q PopupMenu *actionMenu = new QPopupMenu (this, "actionMenu");379 Q3PopupMenu *actionMenu = new Q3PopupMenu (this, "actionMenu"); 362 380 imNewAction->addTo (actionMenu); 363 381 imAddAction->addTo (actionMenu); … … 380 398 qApp->installEventFilter (this); 381 399 /* setup information pane layouts */ 382 Q GridLayout *hdsContainerLayout = new QGridLayout (hdsContainer, 4, 4);400 Q3GridLayout *hdsContainerLayout = new Q3GridLayout (hdsContainer, 4, 4); 383 401 hdsContainerLayout->setMargin (10); 384 Q GridLayout *cdsContainerLayout = new QGridLayout (cdsContainer, 2, 4);402 Q3GridLayout *cdsContainerLayout = new Q3GridLayout (cdsContainer, 2, 4); 385 403 cdsContainerLayout->setMargin (10); 386 Q GridLayout *fdsContainerLayout = new QGridLayout (fdsContainer, 2, 4);404 Q3GridLayout *fdsContainerLayout = new Q3GridLayout (fdsContainer, 2, 4); 387 405 fdsContainerLayout->setMargin (10); 388 406 /* create info-pane for hd list-view */ … … 403 421 mProgressText = new QLabel (centralWidget()); 404 422 mProgressText->setHidden (true); 405 buttonLayout->insertWidget (2, mProgressText); 406 mProgressBar = new QProgressBar (centralWidget()); 423 #warning port me 424 // buttonLayout->insertWidget (2, mProgressText); 425 mProgressBar = new Q3ProgressBar (centralWidget()); 407 426 mProgressBar->setHidden (true); 408 mProgressBar->setFrameShadow (Q Frame::Sunken);409 mProgressBar->setFrameShape (Q Frame::Panel);427 mProgressBar->setFrameShadow (Q3Frame::Sunken); 428 mProgressBar->setFrameShape (Q3Frame::Panel); 410 429 mProgressBar->setPercentageVisible (false); 411 430 mProgressBar->setMaximumWidth (100); 412 buttonLayout->insertWidget (3, mProgressBar); 431 #warning port me 432 // buttonLayout->insertWidget (3, mProgressBar); 413 433 414 434 … … 476 496 477 497 /* Setup focus policy <strong> default for info pane */ 478 aInfo->setFocusPolicy (Q Widget::StrongFocus);498 aInfo->setFocusPolicy (Qt::StrongFocus); 479 499 480 500 /* prevent the name columns from being expanded */ … … 483 503 if (aColumn == -1) 484 504 { 485 ((Q GridLayout *) aRoot->layout())->addWidget (nameLabel, aRow, 0);486 ((Q GridLayout *) aRoot->layout())->505 ((Q3GridLayout *) aRoot->layout())->addWidget (nameLabel, aRow, 0); 506 ((Q3GridLayout *) aRoot->layout())-> 487 507 addMultiCellWidget (aInfo, aRow, aRow, 488 1, ((Q GridLayout *) aRoot->layout())->numCols() - 1);508 1, ((Q3GridLayout *) aRoot->layout())->numCols() - 1); 489 509 } 490 510 else 491 511 { 492 ((Q GridLayout *) aRoot->layout())->addWidget (nameLabel, aRow, aColumn * 2);493 ((Q GridLayout *) aRoot->layout())->addWidget (aInfo, aRow, aColumn * 2 + 1);512 ((Q3GridLayout *) aRoot->layout())->addWidget (nameLabel, aRow, aColumn * 2); 513 ((Q3GridLayout *) aRoot->layout())->addWidget (aInfo, aRow, aColumn * 2 + 1); 494 514 } 495 515 } … … 498 518 void VBoxDiskImageManagerDlg::showEvent (QShowEvent *e) 499 519 { 500 Q MainWindow::showEvent (e);520 Q3MainWindow::showEvent (e); 501 521 502 522 /* one may think that QWidget::polish() is the right place to do things … … 515 535 516 536 517 void VBoxDiskImageManagerDlg::mouseOnItem (Q ListViewItem *aItem)518 { 519 Q ListView *currentList = getCurrentListView();537 void VBoxDiskImageManagerDlg::mouseOnItem (Q3ListViewItem *aItem) 538 { 539 Q3ListView *currentList = getCurrentListView(); 520 540 QString tip; 521 541 switch (aItem->rtti()) … … 548 568 { 549 569 if ( aEvent->state() == 0 || 550 (aEvent->state() & Keypad && aEvent->key() ==Key_Enter) )570 (aEvent->state() & Qt::KeypadModifier && aEvent->key() == Qt::Key_Enter) ) 551 571 { 552 572 switch ( aEvent->key() ) 553 573 { 554 case Key_Enter:555 case Key_Return:574 case Qt::Key_Enter: 575 case Qt::Key_Return: 556 576 { 557 577 QPushButton *currentDefault = searchDefaultButton(); … … 560 580 break; 561 581 } 562 case Key_Escape:582 case Qt::Key_Escape: 563 583 { 564 584 reject(); … … 575 595 { 576 596 QPushButton *defButton = 0; 577 QObjectList *list = queryList ("QPushButton"); 578 QObjectListIt it (*list); 579 while ( (defButton = (QPushButton*)it.current()) && !defButton->isDefault() ) 580 { 581 ++it; 597 QObjectList list = queryList ("QPushButton"); 598 QListIterator<QObject*> it (list); 599 foreach(QObject *o, list) 600 { 601 defButton = qobject_cast<QPushButton*> (o); 602 if(defButton->isDefault()) 603 break; 582 604 } 583 605 return defButton; … … 597 619 show(); 598 620 mInLoop = true; 599 qApp->eventLoop()->enterLoop(); 621 #warning port me 622 // qApp->eventLoop()->enterLoop(); 600 623 mInLoop = false; 601 624 … … 610 633 { 611 634 hide(); 612 qApp->eventLoop()->exitLoop(); 635 #warning port me 636 // qApp->eventLoop()->exitLoop(); 613 637 } 614 638 else … … 619 643 620 644 621 Q ListView* VBoxDiskImageManagerDlg::getCurrentListView()622 { 623 Q ListView *clv = static_cast<QListView*>(twImages->currentPage()->624 queryList("QListView") ->getFirst());645 Q3ListView* VBoxDiskImageManagerDlg::getCurrentListView() 646 { 647 Q3ListView *clv = static_cast<Q3ListView*>(twImages->currentPage()-> 648 queryList("QListView").first()); 625 649 Assert(clv); 626 650 return clv; 627 651 } 628 652 629 Q ListView* VBoxDiskImageManagerDlg::getListView (VBoxDefs::DiskType aType)653 Q3ListView* VBoxDiskImageManagerDlg::getListView (VBoxDefs::DiskType aType) 630 654 { 631 655 switch (aType) … … 645 669 bool VBoxDiskImageManagerDlg::eventFilter (QObject *aObject, QEvent *aEvent) 646 670 { 647 Q ListView *currentList = getCurrentListView();671 Q3ListView *currentList = getCurrentListView(); 648 672 649 673 switch (aEvent->type()) … … 667 691 static_cast<QDropEvent*>(aEvent); 668 692 QStringList *droppedList = new QStringList(); 669 Q UriDrag::decodeLocalFiles (dropEvent, *droppedList);693 Q3UriDrag::decodeLocalFiles (dropEvent, *droppedList); 670 694 QCustomEvent *updateEvent = new QCustomEvent (1001); 671 695 updateEvent->setData (droppedList); … … 710 734 break; 711 735 } 712 return Q MainWindow::eventFilter (aObject, aEvent);736 return Q3MainWindow::eventFilter (aObject, aEvent); 713 737 } 714 738 … … 716 740 bool VBoxDiskImageManagerDlg::event (QEvent *aEvent) 717 741 { 718 bool result = Q MainWindow::event (aEvent);742 bool result = Q3MainWindow::event (aEvent); 719 743 switch (aEvent->type()) 720 744 { … … 733 757 void VBoxDiskImageManagerDlg::addDroppedImages (QStringList *aDroppedList) 734 758 { 735 Q ListView *currentList = getCurrentListView();759 Q3ListView *currentList = getCurrentListView(); 736 760 737 761 for (QStringList::Iterator it = (*aDroppedList).begin(); … … 837 861 838 862 839 DiskImageItem* VBoxDiskImageManagerDlg::createImageNode (Q ListView *aList,863 DiskImageItem* VBoxDiskImageManagerDlg::createImageNode (Q3ListView *aList, 840 864 DiskImageItem *aRoot, 841 865 const VBoxMedia &aMedia) … … 856 880 857 881 858 void VBoxDiskImageManagerDlg::invokePopup (Q ListViewItem *aItem, const QPoint & aPos, int)882 void VBoxDiskImageManagerDlg::invokePopup (Q3ListViewItem *aItem, const QPoint & aPos, int) 859 883 { 860 884 if (aItem) … … 879 903 ++it) 880 904 { 881 if ( usage)905 if (!usage.isEmpty()) 882 906 usage += ", "; 883 907 CMachine machine = vbox.GetMachine (QUuid (*it)); … … 895 919 if (!permMachines.contains (*it)) 896 920 { 897 if ( usage)921 if (!usage.isEmpty()) 898 922 usage += ", ["; 899 923 else … … 926 950 ++it) 927 951 { 928 if ( usage)952 if (!usage.isEmpty()) 929 953 usage += ", "; 930 954 CMachine machine = vbox.GetMachine (QUuid (*it)); … … 942 966 if (!permMachines.contains (*it)) 943 967 { 944 if ( usage)968 if (!usage.isEmpty()) 945 969 usage += ", ["; 946 970 else … … 968 992 aSnapshot.GetMachine().GetDVDDrive().GetImage().GetId() == aImageId) 969 993 { 970 if ( aUsage)994 if (!aUsage.isEmpty()) 971 995 aUsage += ", "; 972 996 aUsage += aSnapshot.GetName(); … … 988 1012 aSnapshot.GetMachine().GetFloppyDrive().GetImage().GetId() == aImageId) 989 1013 { 990 if ( aUsage)1014 if (!aUsage.isEmpty()) 991 1015 aUsage += ", "; 992 1016 aUsage += aSnapshot.GetName(); … … 1328 1352 1329 1353 1330 DiskImageItem* VBoxDiskImageManagerDlg::createHdItem (Q ListView *aList,1354 DiskImageItem* VBoxDiskImageManagerDlg::createHdItem (Q3ListView *aList, 1331 1355 const VBoxMedia &aMedia) 1332 1356 { … … 1339 1363 } 1340 1364 1341 DiskImageItem* VBoxDiskImageManagerDlg::createCdItem (Q ListView *aList,1365 DiskImageItem* VBoxDiskImageManagerDlg::createCdItem (Q3ListView *aList, 1342 1366 const VBoxMedia &aMedia) 1343 1367 { … … 1347 1371 } 1348 1372 1349 DiskImageItem* VBoxDiskImageManagerDlg::createFdItem (Q ListView *aList,1373 DiskImageItem* VBoxDiskImageManagerDlg::createFdItem (Q3ListView *aList, 1350 1374 const VBoxMedia &aMedia) 1351 1375 { … … 1366 1390 { 1367 1391 aItem->setPixmap (0, pm); 1368 QIcon SeticonSet (pm);1392 QIcon iconSet (pm); 1369 1393 QWidget *wt = aType == VBoxDefs::HD ? twImages->page (0) : 1370 1394 aType == VBoxDefs::CD ? twImages->page (1) : … … 1377 1401 1378 1402 1379 DiskImageItem* VBoxDiskImageManagerDlg::searchItem (Q ListView *aList,1403 DiskImageItem* VBoxDiskImageManagerDlg::searchItem (Q3ListView *aList, 1380 1404 const QUuid &aId) 1381 1405 { … … 1392 1416 1393 1417 1394 DiskImageItem* VBoxDiskImageManagerDlg::searchItem (Q ListView *aList,1418 DiskImageItem* VBoxDiskImageManagerDlg::searchItem (Q3ListView *aList, 1395 1419 VBoxMedia::Status aStatus) 1396 1420 { … … 1643 1667 const QUuid &aId) 1644 1668 { 1645 Q ListView *listView = getListView (aType);1669 Q3ListView *listView = getListView (aType); 1646 1670 DiskImageItem *item = searchItem (listView, aId); 1647 1671 delete item; … … 1654 1678 aType == VBoxDefs::CD ? twImages->page (1) : 1655 1679 aType == VBoxDefs::FD ? twImages->page (2) : 0; 1656 const QIcon Set&set = aType == VBoxDefs::HD ? pxHD :1680 const QIcon &set = aType == VBoxDefs::HD ? pxHD : 1657 1681 aType == VBoxDefs::CD ? pxCD : 1658 aType == VBoxDefs::FD ? pxFD : QIcon Set();1682 aType == VBoxDefs::FD ? pxFD : QIcon(); 1659 1683 Assert (wt && !set.isNull()); /* atype should be the correct one */ 1660 1684 twImages->changeTab (wt, set, twImages->tabLabel (wt)); … … 1710 1734 1711 1735 imRefreshAction->setEnabled (false); 1712 setCursor (QCursor ( BusyCursor));1736 setCursor (QCursor (Qt::BusyCursor)); 1713 1737 1714 1738 /* store the current list selections */ 1715 1739 1716 Q ListViewItem *item;1740 Q3ListViewItem *item; 1717 1741 DiskImageItem *di; 1718 1742 … … 1754 1778 if (itemId.isNull()) return false; 1755 1779 1756 Q ListView* parentList = aItem->listView();1780 Q3ListView* parentList = aItem->listView(); 1757 1781 if (parentList == hdsView) 1758 1782 { … … 1808 1832 1809 1833 1810 void VBoxDiskImageManagerDlg::setCurrentItem (Q ListView *aListView,1811 Q ListViewItem *aItem)1834 void VBoxDiskImageManagerDlg::setCurrentItem (Q3ListView *aListView, 1835 Q3ListViewItem *aItem) 1812 1836 { 1813 1837 if (!aItem) … … 1821 1845 void VBoxDiskImageManagerDlg::processCurrentChanged() 1822 1846 { 1823 Q ListView *currentList = getCurrentListView();1847 Q3ListView *currentList = getCurrentListView(); 1824 1848 currentList->setFocus(); 1825 1849 … … 1846 1870 } 1847 1871 1848 void VBoxDiskImageManagerDlg::processCurrentChanged (Q ListViewItem *aItem)1872 void VBoxDiskImageManagerDlg::processCurrentChanged (Q3ListViewItem *aItem) 1849 1873 { 1850 1874 DiskImageItem *item = aItem && aItem->rtti() == DiskImageItem::TypeId ? … … 1910 1934 1911 1935 1912 void VBoxDiskImageManagerDlg::processPressed (Q ListViewItem * aItem)1936 void VBoxDiskImageManagerDlg::processPressed (Q3ListViewItem * aItem) 1913 1937 { 1914 1938 if (!aItem) 1915 1939 { 1916 Q ListView *currentList = getCurrentListView();1940 Q3ListView *currentList = getCurrentListView(); 1917 1941 currentList->setSelected (currentList->currentItem(), true); 1918 1942 } … … 1940 1964 void VBoxDiskImageManagerDlg::addImage() 1941 1965 { 1942 Q ListView *currentList = getCurrentListView();1966 Q3ListView *currentList = getCurrentListView(); 1943 1967 DiskImageItem *item = 1944 1968 currentList->currentItem() && … … 1950 1974 dir = QFileInfo (item->getPath().stripWhiteSpace()).dirPath (true); 1951 1975 1952 if ( !dir)1976 if (dir.isEmpty()) 1953 1977 if (currentList == hdsView) 1954 1978 dir = vbox.GetSystemProperties().GetDefaultVDIFolder(); 1955 1979 1956 if ( !dir|| !QFileInfo (dir).exists())1980 if (dir.isEmpty() || !QFileInfo (dir).exists()) 1957 1981 dir = vbox.GetHomeFolder(); 1958 1982 … … 2001 2025 void VBoxDiskImageManagerDlg::removeImage() 2002 2026 { 2003 Q ListView *currentList = getCurrentListView();2027 Q3ListView *currentList = getCurrentListView(); 2004 2028 DiskImageItem *item = 2005 2029 currentList->currentItem() && … … 2078 2102 void VBoxDiskImageManagerDlg::releaseImage() 2079 2103 { 2080 Q ListView *currentList = getCurrentListView();2104 Q3ListView *currentList = getCurrentListView(); 2081 2105 DiskImageItem *item = 2082 2106 currentList->currentItem() && … … 2217 2241 QUuid VBoxDiskImageManagerDlg::getSelectedUuid() 2218 2242 { 2219 Q ListView *currentList = getCurrentListView();2243 Q3ListView *currentList = getCurrentListView(); 2220 2244 QUuid uuid; 2221 2245 … … 2231 2255 QString VBoxDiskImageManagerDlg::getSelectedPath() 2232 2256 { 2233 Q ListView *currentList = getCurrentListView();2257 Q3ListView *currentList = getCurrentListView(); 2234 2258 QString path; 2235 2259 … … 2243 2267 2244 2268 2245 void VBoxDiskImageManagerDlg::processDoubleClick (Q ListViewItem*)2246 { 2247 Q ListView *currentList = getCurrentListView();2269 void VBoxDiskImageManagerDlg::processDoubleClick (Q3ListViewItem*) 2270 { 2271 Q3ListView *currentList = getCurrentListView(); 2248 2272 2249 2273 if (doSelect && currentList->selectedItem() && buttonOk->isEnabled()) -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui
r5999 r7220 1294 1294 <include location="global" impldecl="in implementation">qobjectlist.h</include> 1295 1295 <include location="global" impldecl="in implementation">qfiledialog.h</include> 1296 <include location="global" impldecl="in implementation">qfocusdata.h</include>1297 1296 <include location="global" impldecl="in implementation">qtimer.h</include> 1298 1297 <include location="global" impldecl="in implementation">qeventloop.h</include> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui.h
r7207 r7220 29 29 #include <iprt/param.h> 30 30 #include <iprt/path.h> 31 //Added by qt3to4: 32 #include <QTranslator> 33 #include <QLabel> 34 #include <q3mimefactory.h> 35 #include <QEvent> 36 #include <QShowEvent> 37 #include <Q3WhatsThis> 31 38 32 39 /* defined in VBoxGlobal.cpp */ … … 41 48 * using the text of the first column of every item. 42 49 */ 43 static QString path (Q ListViewItem *li)50 static QString path (Q3ListViewItem *li) 44 51 { 45 52 static QString sep = ": "; 46 53 QString p; 47 Q ListViewItem *cur = li;54 Q3ListViewItem *cur = li; 48 55 while (cur) 49 56 { … … 66 73 67 74 68 class USBListItem : public Q CheckListItem75 class USBListItem : public Q3CheckListItem 69 76 { 70 77 public: 71 78 72 USBListItem (Q ListView *aParent, QListViewItem *aAfter)73 : Q CheckListItem (aParent, aAfter, QString::null, CheckBox)79 USBListItem (Q3ListView *aParent, Q3ListViewItem *aAfter) 80 : Q3CheckListItem (aParent, aAfter, QString::null, CheckBox) 74 81 , mId (-1) {} 75 82 … … 79 86 80 87 81 class LanguageItem : public Q ListViewItem88 class LanguageItem : public Q3ListViewItem 82 89 { 83 90 public: … … 85 92 enum { TypeId = 1001 }; 86 93 87 LanguageItem (Q ListView *aParent, const QTranslator &aTranslator,94 LanguageItem (Q3ListView *aParent, const QTranslator &aTranslator, 88 95 const QString &aId, bool aBuiltIn = false) 89 : Q ListViewItem (aParent), mBuiltIn (aBuiltIn), mInvalid (false)96 : Q3ListViewItem (aParent), mBuiltIn (aBuiltIn), mInvalid (false) 90 97 { 91 98 Assert (!aId.isEmpty()); 92 99 93 QTranslatorMessage transMes;100 // QTranslatorMessage transMes; 94 101 95 102 /* Note: context/source/comment arguments below must match strings … … 141 148 /* Constructs an item for an invalid language ID (i.e. when a language 142 149 * file is missing or corrupt). */ 143 LanguageItem (Q ListView *aParent, const QString &aId)144 : Q ListViewItem (aParent), mBuiltIn (false), mInvalid (true)150 LanguageItem (Q3ListView *aParent, const QString &aId) 151 : Q3ListViewItem (aParent), mBuiltIn (false), mInvalid (true) 145 152 { 146 153 Assert (!aId.isEmpty()); … … 154 161 /* Constructs an item for the default language ID (column 1 will be set 155 162 * to QString::null) */ 156 LanguageItem (Q ListView *aParent)157 : Q ListViewItem (aParent), mBuiltIn (false), mInvalid (false)163 LanguageItem (Q3ListView *aParent) 164 : Q3ListViewItem (aParent), mBuiltIn (false), mInvalid (false) 158 165 { 159 166 setText (0, VBoxGlobalSettingsDlg::tr ("Default", "Language")); … … 167 174 int rtti() const { return TypeId; } 168 175 169 int compare (Q ListViewItem *aItem, int aColumn, bool aAscending) const176 int compare (Q3ListViewItem *aItem, int aColumn, bool aAscending) const 170 177 { 171 178 QString thisId = text (1); … … 179 186 if (aItem->rtti() == TypeId && ((LanguageItem *) aItem)->mBuiltIn) 180 187 return 1; 181 return Q ListViewItem::compare (aItem, aColumn, aAscending);188 return Q3ListViewItem::compare (aItem, aColumn, aAscending); 182 189 } 183 190 … … 196 203 aPainter->setFont (font); 197 204 198 Q ListViewItem::paintCell (aPainter, aGroup, aColumn, aWidth, aAlign);205 Q3ListViewItem::paintCell (aPainter, aGroup, aColumn, aWidth, aAlign); 199 206 200 207 if (mBuiltIn) … … 206 213 } 207 214 208 int width (const QFontMetrics &aFM, const Q ListView *aLV, int aC) const215 int width (const QFontMetrics &aFM, const Q3ListView *aLV, int aC) const 209 216 { 210 217 QFont font = aLV->font(); … … 220 227 fm = QFontMetrics (font); 221 228 222 return Q ListViewItem::width (fm, aLV, aC);229 return Q3ListViewItem::width (fm, aLV, aC); 223 230 } 224 231 225 232 void setup () 226 233 { 227 Q ListViewItem::setup();234 Q3ListViewItem::setup(); 228 235 if (mBuiltIn) 229 236 setHeight (height() + 1); … … 235 242 const char *aSrc, const char *aCmnt) 236 243 { 237 QString msg = aTranslator.findMessage (aCtxt, aSrc, aCmnt).translation(); 244 #warning port me: check this 245 QString msg = aTranslator.translate (aCtxt, aSrc, aCmnt); 246 // QString msg = aTranslator.findMessage (aCtxt, aSrc, aCmnt).translation(); 238 247 /* return the source text if no translation is found */ 239 248 if (msg.isEmpty()) … … 251 260 polished = false; 252 261 253 setIcon ( QPixmap::fromMimeSource ("global_settings_16px.png"));262 setIcon (qPixmapFromMimeSource ("global_settings_16px.png")); 254 263 255 264 /* all pages are initially valid */ 256 265 valid = true; 257 266 buttonOk->setEnabled (true); 258 warningSpacer->changeSize (0, 0, QSizePolicy::Expanding); 267 #warning port me 268 // warningSpacer->changeSize (0, 0, QSizePolicy::Expanding); 259 269 warningLabel->setHidden (true); 260 270 warningPixmap->setHidden (true); … … 264 274 /* hide the header and internal columns */ 265 275 listView->header()->hide(); 266 listView->setColumnWidthMode (listView_Id, Q ListView::Manual);267 listView->setColumnWidthMode (listView_Link, Q ListView::Manual);276 listView->setColumnWidthMode (listView_Id, Q3ListView::Manual); 277 listView->setColumnWidthMode (listView_Link, Q3ListView::Manual); 268 278 listView->hideColumn (listView_Id); 269 279 listView->hideColumn (listView_Link); … … 289 299 290 300 whatsThisLabel = new QIRichLabel (this, "whatsThisLabel"); 291 VBoxGlobalSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1); 301 #warning port me 302 // VBoxGlobalSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1); 292 303 293 304 #ifndef DEBUG … … 303 314 304 315 whatsThisLabel->setMaxHeightMode (true); 305 whatsThisLabel->setFocusPolicy (Q Widget::NoFocus);316 whatsThisLabel->setFocusPolicy (Qt::NoFocus); 306 317 whatsThisLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed); 307 whatsThisLabel->setBackgroundMode (Q Label::PaletteMidlight);318 whatsThisLabel->setBackgroundMode (Qt::PaletteMidlight); 308 319 whatsThisLabel->setFrameShape (QLabel::Box); 309 320 whatsThisLabel->setFrameShadow (QLabel::Sunken); 310 321 whatsThisLabel->setMargin (7); 311 322 whatsThisLabel->setScaledContents (FALSE); 312 whatsThisLabel->setAlignment (int (Q Label::WordBreak|313 Q Label::AlignJustify |314 Q Label::AlignTop));323 whatsThisLabel->setAlignment (int (Qt::TextWordWrap | 324 Qt::AlignJustify | 325 Qt::AlignTop)); 315 326 316 327 whatsThisLabel->setFixedHeight (whatsThisLabel->frameWidth() * 2 + … … 328 339 hkeHostKey = new QIHotKeyEdit (grbKeyboard, "hkeHostKey"); 329 340 hkeHostKey->setSizePolicy (QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Fixed)); 330 Q WhatsThis::add (hkeHostKey,341 Q3WhatsThis::add (hkeHostKey, 331 342 tr ("Displays the key used as a Host Key in the VM window. Activate the " 332 343 "entry field and press a new Host Key. Note that alphanumeric, " 333 344 "cursor movement and editing keys cannot be used as a Host Key.")); 334 layoutHostKey->addWidget (hkeHostKey); 345 #warning port me 346 // layoutHostKey->addWidget (hkeHostKey); 335 347 txHostKey->setBuddy (hkeHostKey); 336 348 setTabOrder (listView, hkeHostKey); … … 360 372 /* disable unselecting items by clicking in the unused area of the list */ 361 373 new QIListViewSelectionPreserver (this, lvUSBFilters); 362 wstUSBFilters = new QWidgetStack (grbUSBFilters, "wstUSBFilters"); 363 grbUSBFiltersLayout->addWidget (wstUSBFilters); 374 wstUSBFilters = new Q3WidgetStack (grbUSBFilters, "wstUSBFilters"); 375 #warning port me 376 // grbUSBFiltersLayout->addWidget (wstUSBFilters); 364 377 /* create a default (disabled) filter settings widget at index 0 */ 365 378 VBoxUSBFilterSettings *settings = new VBoxUSBFilterSettings (wstUSBFilters); … … 441 454 QString VBoxGlobalSettingsDlg::pagePath (QWidget *aPage) 442 455 { 443 Q ListViewItem *li = listView->456 Q3ListViewItem *li = listView-> 444 457 findItem (QString::number (widgetStack->id (aPage)), 1); 445 458 return ::path (li); … … 527 540 } 528 541 529 void VBoxGlobalSettingsDlg::listView_currentChanged (Q ListViewItem *item)542 void VBoxGlobalSettingsDlg::listView_currentChanged (Q3ListViewItem *item) 530 543 { 531 544 Assert (item); … … 549 562 bool newValid = true; 550 563 { 551 QObjectList *l = this->queryList ("QIWidgetValidator"); 552 QObjectListIt it (*l); 553 QObject *obj; 554 while ((obj = it.current()) != 0) 564 QObjectList l = this->queryList ("QIWidgetValidator"); 565 foreach (QObject *obj, l) 555 566 { 556 567 QIWidgetValidator *wval = (QIWidgetValidator *) obj; … … 561 572 break; 562 573 } 563 ++ it;564 574 } 565 delete l;566 575 } 567 576 … … 637 646 * not available (i.e. in VirtualBox OSE) */ 638 647 639 Q ListViewItem *usbItem = listView->findItem ("#usb", listView_Link);648 Q3ListViewItem *usbItem = listView->findItem ("#usb", listView_Link); 640 649 Assert (usbItem); 641 650 usbItem->setVisible (false); … … 663 672 664 673 QString langId = gs.languageId(); 665 Q ListViewItem *item = lvLanguages->findItem (langId, 1);674 Q3ListViewItem *item = lvLanguages->findItem (langId, 1); 666 675 if (!item) 667 676 { … … 719 728 720 729 /* then add all new filters */ 721 for (Q ListViewItem *item = lvUSBFilters->firstChild(); item;730 for (Q3ListViewItem *item = lvUSBFilters->firstChild(); item; 722 731 item = item->nextSibling()) 723 732 { … … 744 753 /* language properties */ 745 754 746 Q ListViewItem *selItem = lvLanguages->selectedItem();755 Q3ListViewItem *selItem = lvLanguages->selectedItem(); 747 756 Assert (selItem); 748 757 if (mLanguageChanged && selItem) … … 765 774 else 766 775 { 767 widget = focusData()->focusWidget(); 776 #warning port me 777 // widget = focusData()->focusWidget(); 768 778 } 769 779 /* if the given widget lacks the whats'this text, look at its parent */ 770 780 while (widget && widget != this) 771 781 { 772 text = QWhatsThis::textFor (widget); 782 #warning port me 783 // text = Q3WhatsThis::textFor (widget); 773 784 if (!text.isEmpty()) 774 785 break; … … 778 789 if (text.isEmpty() && !warningString.isEmpty()) 779 790 text = warningString; 780 if (text.isEmpty()) 781 text = QWhatsThis::textFor (this); 791 #warning port me 792 // if (text.isEmpty()) 793 // text = Q3WhatsThis::textFor (this); 782 794 783 795 whatsThisLabel->setText (text); … … 798 810 void VBoxGlobalSettingsDlg::tbResetFolder_clicked() 799 811 { 800 QToolButton *tb = ::qt_cast <QToolButton *> (sender());812 QToolButton *tb = qobject_cast <QToolButton *> (sender()); 801 813 Assert (tb); 802 814 … … 817 829 void VBoxGlobalSettingsDlg::tbSelectFolder_clicked() 818 830 { 819 QToolButton *tb = ::qt_cast <QToolButton *> (sender());831 QToolButton *tb = qobject_cast <QToolButton *> (sender()); 820 832 Assert (tb); 821 833 … … 855 867 bool aIsNew) 856 868 { 857 Q ListViewItem *currentItem = aIsNew869 Q3ListViewItem *currentItem = aIsNew 858 870 ? lvUSBFilters->currentItem() 859 871 : lvUSBFilters->lastItem(); … … 894 906 } 895 907 896 void VBoxGlobalSettingsDlg::lvUSBFilters_currentChanged (Q ListViewItem *item)908 void VBoxGlobalSettingsDlg::lvUSBFilters_currentChanged (Q3ListViewItem *item) 897 909 { 898 910 if (item && lvUSBFilters->selectedItem() != item) … … 918 930 void VBoxGlobalSettingsDlg::lvUSBFilters_setCurrentText (const QString &aText) 919 931 { 920 Q ListViewItem *item = lvUSBFilters->currentItem();932 Q3ListViewItem *item = lvUSBFilters->currentItem(); 921 933 Assert (item); 922 934 … … 930 942 QString usbFilterName = tr ("New Filter %1", "usb"); 931 943 QRegExp regExp (QString ("^") + usbFilterName.arg ("([0-9]+)") + QString ("$")); 932 Q ListViewItemIterator iterator (lvUSBFilters);944 Q3ListViewItemIterator iterator (lvUSBFilters); 933 945 while (*iterator) 934 946 { … … 997 1009 void VBoxGlobalSettingsDlg::tbRemoveUSBFilter_clicked() 998 1010 { 999 Q ListViewItem *item = lvUSBFilters->currentItem();1011 Q3ListViewItem *item = lvUSBFilters->currentItem(); 1000 1012 Assert (item); 1001 1013 … … 1014 1026 void VBoxGlobalSettingsDlg::tbUSBFilterUp_clicked() 1015 1027 { 1016 Q ListViewItem *item = lvUSBFilters->currentItem();1028 Q3ListViewItem *item = lvUSBFilters->currentItem(); 1017 1029 Assert (item); 1018 1030 1019 Q ListViewItem *itemAbove = item->itemAbove();1031 Q3ListViewItem *itemAbove = item->itemAbove(); 1020 1032 Assert (itemAbove); 1021 1033 itemAbove = itemAbove->itemAbove(); … … 1032 1044 void VBoxGlobalSettingsDlg::tbUSBFilterDown_clicked() 1033 1045 { 1034 Q ListViewItem *item = lvUSBFilters->currentItem();1046 Q3ListViewItem *item = lvUSBFilters->currentItem(); 1035 1047 Assert (item); 1036 1048 1037 Q ListViewItem *itemBelow = item->itemBelow();1049 Q3ListViewItem *itemBelow = item->itemBelow(); 1038 1050 Assert (itemBelow); 1039 1051 … … 1044 1056 } 1045 1057 1046 void VBoxGlobalSettingsDlg::lvLanguages_currentChanged (Q ListViewItem *aItem)1058 void VBoxGlobalSettingsDlg::lvLanguages_currentChanged (Q3ListViewItem *aItem) 1047 1059 { 1048 1060 Assert (aItem); … … 1073 1085 * not available (i.e. in VirtualBox OSE) */ 1074 1086 1075 Q ListViewItem *usbItem = listView->findItem ("#usb", listView_Link);1087 Q3ListViewItem *usbItem = listView->findItem ("#usb", listView_Link); 1076 1088 Assert (usbItem); 1077 1089 usbItem->setVisible (false); -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxNewHDWzd.ui.h
r7207 r7220 1 //Added by qt3to4: 2 #include <QShowEvent> 3 #include <QPushButton> 1 4 /** 2 5 * … … 197 200 leName->setValidator (new QRegExpValidator (QRegExp( ".+" ), this)); 198 201 199 leSize->setValidator (new QRegExpValidator ( vboxGlobal().sizeRegexp(), this));202 leSize->setValidator (new QRegExpValidator (QRegExp(vboxGlobal().sizeRegexp()), this)); 200 203 leSize->setAlignment (Qt::AlignRight); 201 204 … … 214 217 teSummary = new QITextEdit (pageSummary); 215 218 teSummary->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Minimum); 216 teSummary->setFrameShape (Q TextEdit::NoFrame);219 teSummary->setFrameShape (Q3TextEdit::NoFrame); 217 220 teSummary->setReadOnly (TRUE); 218 summaryLayout->insertWidget (1, teSummary); 221 #warning port me 222 // summaryLayout->insertWidget (1, teSummary); 219 223 220 224 /* filter out Enter keys in order to direct them to the default dlg button */ 221 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter);225 QIKeyFilter *ef = new QIKeyFilter (this, Qt::Key_Enter); 222 226 ef->watchOn (teSummary); 223 227 … … 232 236 leName->setText (QString ("NewHardDisk%1.vdi").arg (++ HDNumber)); 233 237 234 slSize->setFocusPolicy (Q Widget::StrongFocus);238 slSize->setFocusPolicy (Qt::StrongFocus); 235 239 slSize->setPageStep (sliderScale); 236 240 slSize->setLineStep (sliderScale / 8); … … 261 265 262 266 /* setup minimum width for the sizeHint to be calculated correctly */ 263 int wid = widthSpacer->minimumSize().width(); 267 #warning port me 268 int wid = 1; 269 // int wid = widthSpacer->minimumSize().width(); 264 270 txWelcome->setMinimumWidth (wid); 265 271 textLabel1_2->setMinimumWidth (wid); … … 413 419 } 414 420 415 Q Wizard::showPage (page);421 Q3Wizard::showPage (page); 416 422 417 423 /* fix focus on the last page. when we go to the last page … … 446 452 */ 447 453 if (createHardDisk()) 448 Q Wizard::accept();454 Q3Wizard::accept(); 449 455 } 450 456 … … 566 572 // fd.setDir (d); 567 573 568 QString selected = Q FileDialog::getSaveFileName (574 QString selected = Q3FileDialog::getSaveFileName ( 569 575 fld.absFilePath(), 570 576 tr ("Hard disk images (*.vdi)"), … … 575 581 // if ( fd.exec() == QDialog::Accepted ) { 576 582 // leName->setText (QDir::convertSeparators (fd.selectedFile())); 577 if ( selected)583 if (!selected.isEmpty()) 578 584 { 579 585 if (QFileInfo (selected).extension().isEmpty()) -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxNewVMWzd.ui.h
r7207 r7220 1 //Added by qt3to4: 2 #include <QShowEvent> 1 3 /** 2 4 * … … 100 102 /* HDD Images page */ 101 103 mediaCombo = new VBoxMediaComboBox (grbHDA, "mediaCombo", VBoxDefs::HD, true); 102 grbHDALayout->addMultiCellWidget (mediaCombo, 0, 0, 0, 2); 104 #warning port me: check this 105 gridLayout->addMultiCellWidget (mediaCombo, 0, 0, 0, 2); 106 // grbHDALayout->addMultiCellWidget (mediaCombo, 0, 0, 0, 2); 103 107 setTabOrder (mediaCombo, pbNewHD); 104 108 setTabOrder (pbNewHD, pbExistingHD); … … 121 125 teSummary = new QITextEdit (pageSummary); 122 126 teSummary->setSizePolicy (QSizePolicy::Minimum, QSizePolicy::Minimum); 123 teSummary->setFrameShape (Q TextEdit::NoFrame);127 teSummary->setFrameShape (Q3TextEdit::NoFrame); 124 128 teSummary->setReadOnly (TRUE); 125 summaryLayout->insertWidget (1, teSummary); 129 #warning port me: check this 130 hboxLayout12->insertWidget (1, teSummary); 131 // summaryLayout->insertWidget (1, teSummary); 126 132 127 133 /* filter out Enter keys in order to direct them to the default dlg button */ 128 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter);134 QIKeyFilter *ef = new QIKeyFilter (this, Qt::Key_Enter); 129 135 ef->watchOn (teSummary); 130 136 … … 178 184 179 185 /* setup minimum width for the sizeHint to be calculated correctly */ 180 int wid = widthSpacer->minimumSize().width(); 186 #warning port me: check this 187 int wid = spacerItem->minimumSize().width(); 188 // int wid = widthSpacer->minimumSize().width(); 181 189 txWelcome->setMinimumWidth (wid); 182 190 txNameAndOS->setMinimumWidth (wid); … … 270 278 } 271 279 272 Q Wizard::showPage (page);280 Q3Wizard::showPage (page); 273 281 274 282 /* … … 300 308 */ 301 309 if (constructMachine()) 302 Q Wizard::accept();310 Q3Wizard::accept(); 303 311 } 304 312 … … 423 431 void VBoxNewVMWzd::showVDIManager() 424 432 { 425 VBoxDiskImageManagerDlg dlg (this, "VBoxDiskImageManagerDlg", WType_Dialog |WShowModal);433 VBoxDiskImageManagerDlg dlg (this, "VBoxDiskImageManagerDlg", Qt::WType_Dialog | Qt::WShowModal); 426 434 dlg.setup (VBoxDefs::HD, true); 427 435 QUuid newId = dlg.exec() == VBoxDiskImageManagerDlg::Accepted ? -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxRegistrationDlg.ui.h
r6349 r7220 33 33 #include <iprt/param.h> 34 34 #include <iprt/path.h> 35 //Added by qt3to4: 36 #include <QShowEvent> 35 37 36 38 /** … … 218 220 219 221 /* Adjust text label size */ 220 mTextLabel->setMinimumWidth (widthSpacer->minimumSize().width()); 222 #warning port me 223 // mTextLabel->setMinimumWidth (widthSpacer->minimumSize().width()); 221 224 222 225 /* Setup validations and maximum text-edit text length */ … … 321 324 /* Handshake arguments initializing */ 322 325 QString version = vboxGlobal().virtualBox().GetVersion(); 323 Q Url::encode (version);326 Q3Url::encode (version); 324 327 325 328 /* Handshake */ … … 375 378 QString email = mEmailEdit->text(); 376 379 QString prvt = mUseCheckBox->isChecked() ? "1" : "0"; 377 Q Url::encode (version);378 Q Url::encode (platform);379 Q Url::encode (name);380 Q Url::encode (email);380 Q3Url::encode (version); 381 Q3Url::encode (platform); 382 Q3Url::encode (name); 383 Q3Url::encode (email); 381 384 382 385 /* Registration */ … … 531 534 rc = RTPathAppPrivateNoArch (szAppPrivPath, sizeof (szAppPrivPath)); 532 535 Assert (RT_SUCCESS (rc)); 533 Q Process infoScript (QString ("./VBoxSysInfo.sh"), this, "infoScript");536 Q3Process infoScript (QString ("./VBoxSysInfo.sh"), this, "infoScript"); 534 537 infoScript.setWorkingDirectory (QString (szAppPrivPath)); 535 538 if (infoScript.start()) … … 537 540 while (infoScript.isRunning()) {} 538 541 if (infoScript.normalExit()) 539 platform += QString (" [%1]").arg ( infoScript.readStdout());542 platform += QString (" [%1]").arg (QString(infoScript.readStdout())); 540 543 } 541 544 #endif … … 565 568 { 566 569 validate(); 567 Q Wizard::showEvent (aEvent);568 } 570 Q3Wizard::showEvent (aEvent); 571 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxSharedFoldersSettings.ui.h
r6942 r7220 1 //Added by qt3to4: 2 #include <Q3WhatsThis> 3 #include <QPushButton> 4 #include <Q3HBoxLayout> 5 #include <Q3ValueList> 6 #include <QLabel> 7 #include <Q3GridLayout> 8 #include <QMouseEvent> 9 #include <QEvent> 10 #include <Q3VBoxLayout> 11 #include <QShowEvent> 1 12 /** 2 13 * … … 31 42 32 43 typedef QPair<QString, VBoxSharedFoldersSettings::SFDialogType> SFolderName; 33 typedef Q ValueList<SFolderName> SFoldersNameList;34 35 36 class VBoxRichListItem : public Q ListViewItem44 typedef Q3ValueList<SFolderName> SFoldersNameList; 45 46 47 class VBoxRichListItem : public Q3ListViewItem 37 48 { 38 49 public: … … 49 60 }; 50 61 51 VBoxRichListItem (FormatType aFormat, Q ListView *aParent,62 VBoxRichListItem (FormatType aFormat, Q3ListView *aParent, 52 63 const QString& aName, const QString& aNull1, 53 64 const QString& aNull2, const QString& aKey) : 54 Q ListViewItem (aParent, aName, aNull1, aNull2, aKey), mFormat (aFormat)55 { 56 } 57 58 VBoxRichListItem (FormatType aFormat, Q ListViewItem *aParent,65 Q3ListViewItem (aParent, aName, aNull1, aNull2, aKey), mFormat (aFormat) 66 { 67 } 68 69 VBoxRichListItem (FormatType aFormat, Q3ListViewItem *aParent, 59 70 const QString& aName, const QString& aPath, 60 71 const QString& aAccess, const QString& aEdited) : 61 Q ListViewItem (aParent, aName, aPath, aAccess, aEdited), mFormat (aFormat)72 Q3ListViewItem (aParent, aName, aPath, aAccess, aEdited), mFormat (aFormat) 62 73 { 63 74 mTextList << aName << aPath << aAccess << aEdited; … … 66 77 int rtti() const { return QIRichListItemId; } 67 78 68 int compare (Q ListViewItem *aItem, int aColumn, bool aAscending) const79 int compare (Q3ListViewItem *aItem, int aColumn, bool aAscending) const 69 80 { 70 81 /* Sorting the children always by name: */ 71 82 if (parent() && aItem->parent()) 72 return Q ListViewItem::compare (aItem, 0, aAscending);83 return Q3ListViewItem::compare (aItem, 0, aAscending); 73 84 /* Sorting the root items always by key: */ 74 85 else if (!parent() && !aItem->parent()) 75 return Q ListViewItem::compare (aItem, 3, aAscending);86 return Q3ListViewItem::compare (aItem, 3, aAscending); 76 87 else 77 return Q ListViewItem::compare (aItem, aColumn, aAscending);88 return Q3ListViewItem::compare (aItem, aColumn, aAscending); 78 89 } 79 90 80 91 VBoxRichListItem* nextSibling() const 81 92 { 82 Q ListViewItem *item = QListViewItem::nextSibling();93 Q3ListViewItem *item = Q3ListViewItem::nextSibling(); 83 94 return item && item->rtti() == QIRichListItemId ? 84 95 static_cast<VBoxRichListItem*> (item) : 0; … … 118 129 wnd.moveBy (dx, 0); 119 130 aPainter->setWindow (wnd); 120 Q ListViewItem::paintCell (aPainter, aColorGroup, 0, aWidth, aAlign);131 Q3ListViewItem::paintCell (aPainter, aColorGroup, 0, aWidth, aAlign); 121 132 aPainter->restore(); 122 133 return; 123 134 } 124 135 125 Q ListViewItem::paintCell (aPainter, aColorGroup, aColumn, aWidth, aAlign);136 Q3ListViewItem::paintCell (aPainter, aColorGroup, aColumn, aWidth, aAlign); 126 137 } 127 138 else 128 139 { 129 140 processColumn (aColumn, aWidth); 130 Q ListViewItem::paintCell (aPainter, aColorGroup, aColumn, aWidth, aAlign);131 } 132 } 133 134 int width (const QFontMetrics &aFontMetrics, const Q ListView *, int aColumn) const141 Q3ListViewItem::paintCell (aPainter, aColorGroup, aColumn, aWidth, aAlign); 142 } 143 } 144 145 int width (const QFontMetrics &aFontMetrics, const Q3ListView *, int aColumn) const 135 146 { 136 147 return parent() ? … … 228 239 AssertMsgFailed (("Incorrect SF Dialog type\n")); 229 240 } 230 Q VBoxLayout *mainLayout = new QVBoxLayout (this, 10, 10, "mainLayout");241 Q3VBoxLayout *mainLayout = new Q3VBoxLayout (this, 10, 10, "mainLayout"); 231 242 232 243 /* Setup Input layout */ 233 Q GridLayout *inputLayout = new QGridLayout (mainLayout, 3, 3, 10, "inputLayout");244 Q3GridLayout *inputLayout = new Q3GridLayout (mainLayout, 3, 3, 10, "inputLayout"); 234 245 QLabel *lbPath = new QLabel (tr ("Folder Path"), this); 235 246 mLePath = new QLineEdit (this); … … 239 250 tbPath->setIconSet (VBoxGlobal::iconSet ("select_file_16px.png", 240 251 "select_file_dis_16px.png")); 241 tbPath->setFocusPolicy (Q Widget::TabFocus);252 tbPath->setFocusPolicy (Qt::TabFocus); 242 253 connect (mLePath, SIGNAL (textChanged (const QString &)), 243 254 this, SLOT (validate())); … … 245 256 this, SLOT (validate())); 246 257 connect (tbPath, SIGNAL (clicked()), this, SLOT (showFileDialog())); 247 Q WhatsThis::add (mLePath, tr ("Displays the path to an existing folder on the host PC."));248 Q WhatsThis::add (mLeName, tr ("Displays the name of the shared folder "258 Q3WhatsThis::add (mLePath, tr ("Displays the path to an existing folder on the host PC.")); 259 Q3WhatsThis::add (mLeName, tr ("Displays the name of the shared folder " 249 260 "(as it will be seen by the guest OS).")); 250 Q WhatsThis::add (tbPath, tr ("Opens the dialog to select a folder."));261 Q3WhatsThis::add (tbPath, tr ("Opens the dialog to select a folder.")); 251 262 252 263 inputLayout->addWidget (lbPath, 0, 0); … … 257 268 258 269 mCbReadonly = new QCheckBox (tr ("&Read-only"), this); 259 Q WhatsThis::add (mCbReadonly,270 Q3WhatsThis::add (mCbReadonly, 260 271 tr ("When checked, the guest OS will not be able to write to the " 261 272 "specified shared folder.")); … … 273 284 274 285 /* Setup Button layout */ 275 Q HBoxLayout *buttonLayout = new QHBoxLayout (mainLayout, 10, "buttonLayout");286 Q3HBoxLayout *buttonLayout = new Q3HBoxLayout (mainLayout, 10, "buttonLayout"); 276 287 mBtOk = new QPushButton (tr ("&OK"), this, "btOk"); 277 288 QSpacerItem *spacer = new QSpacerItem (0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); … … 396 407 connect (tbEdit, SIGNAL (clicked()), this, SLOT (tbEditPressed())); 397 408 connect (tbRemove, SIGNAL (clicked()), this, SLOT (tbRemovePressed())); 398 connect (listView, SIGNAL (currentChanged (Q ListViewItem *)),399 this, SLOT (processCurrentChanged (Q ListViewItem *)));409 connect (listView, SIGNAL (currentChanged (Q3ListViewItem *)), 410 this, SLOT (processCurrentChanged (Q3ListViewItem *))); 400 411 401 412 /* Make after-paining list update to ensure all columns repainted correctly. */ … … 454 465 { 455 466 QMouseEvent *e = static_cast<QMouseEvent*> (aEvent); 456 Q ListViewItem *i = listView->itemAt (e->pos());467 Q3ListViewItem *i = listView->itemAt (e->pos()); 457 468 VBoxRichListItem *item = i && i->rtti() == VBoxRichListItem::QIRichListItemId ? 458 469 static_cast<VBoxRichListItem*> (i) : 0; … … 468 479 } 469 480 470 QString curText = QToolTip::textFor (listView->viewport()); 481 #warning port me 482 // QString curText = QToolTip::textFor (listView->viewport()); 483 QString curText = ""; 471 484 QString newText = item->text (id) != item->getText (id) ? 472 485 item->getText (id) : QString::null; … … 602 615 603 616 void VBoxSharedFoldersSettings::getFrom (const CSharedFolderEnumerator &aEn, 604 Q ListViewItem *aRoot)617 Q3ListViewItem *aRoot) 605 618 { 606 619 aRoot->setSelectable (false); … … 644 657 Assert (mDialogType & MachineType); 645 658 /* Searching for MachineType item's root */ 646 Q ListViewItem *root = listView->findItem (QString::number (MachineType), 3);659 Q3ListViewItem *root = listView->findItem (QString::number (MachineType), 3); 647 660 Assert (root); 648 661 CSharedFolderEnumerator en = mMachine.GetSharedFolders().Enumerate(); … … 658 671 Assert (mDialogType & ConsoleType); 659 672 /* Searching for ConsoleType item's root */ 660 Q ListViewItem *root = listView->findItem (QString::number (ConsoleType), 3);673 Q3ListViewItem *root = listView->findItem (QString::number (ConsoleType), 3); 661 674 Assert (root); 662 675 CSharedFolderEnumerator en = mConsole.GetSharedFolders().Enumerate(); … … 665 678 666 679 void VBoxSharedFoldersSettings::putBackTo (CSharedFolderEnumerator &aEn, 667 Q ListViewItem *aRoot)680 Q3ListViewItem *aRoot) 668 681 { 669 682 Assert (!aRoot->text (3).isNull()); … … 676 689 677 690 /* Search for this root's items */ 678 Q ListViewItem *firstItem = aRoot->firstChild();691 Q3ListViewItem *firstItem = aRoot->firstChild(); 679 692 VBoxRichListItem *item = firstItem && 680 693 firstItem->rtti() == VBoxRichListItem::QIRichListItemId ? … … 694 707 695 708 /* saving all machine related list view items */ 696 Q ListViewItem *iterator = aRoot->firstChild();709 Q3ListViewItem *iterator = aRoot->firstChild(); 697 710 while (iterator) 698 711 { … … 709 722 710 723 711 Q ListViewItem* VBoxSharedFoldersSettings::searchRoot (bool aIsPermanent)724 Q3ListViewItem* VBoxSharedFoldersSettings::searchRoot (bool aIsPermanent) 712 725 { 713 726 if (!aIsPermanent) … … 723 736 /* Make the used names list: */ 724 737 SFoldersNameList usedList; 725 Q ListViewItemIterator it (listView);738 Q3ListViewItemIterator it (listView); 726 739 while (*it) 727 740 { … … 746 759 Assert (!name.isEmpty() && !path.isEmpty()); 747 760 /* Searching root for the new listview item */ 748 Q ListViewItem *root = searchRoot (isPermanent);761 Q3ListViewItem *root = searchRoot (isPermanent); 749 762 Assert (root); 750 763 /* Appending a new listview item to the root */ … … 765 778 /* Make the used names list: */ 766 779 SFoldersNameList usedList; 767 Q ListViewItemIterator it (listView);780 Q3ListViewItemIterator it (listView); 768 781 while (*it) 769 782 { … … 779 792 780 793 /* Check selected item */ 781 Q ListViewItem *selectedItem = listView->selectedItem();794 Q3ListViewItem *selectedItem = listView->selectedItem(); 782 795 VBoxRichListItem *item = 783 796 selectedItem->rtti() == VBoxRichListItem::QIRichListItemId ? … … 801 814 Assert (!name.isEmpty() && !path.isEmpty()); 802 815 /* Searching new root for the selected listview item */ 803 Q ListViewItem *root = searchRoot (isPermanent);816 Q3ListViewItem *root = searchRoot (isPermanent); 804 817 Assert (root); 805 818 /* Updating an edited listview item */ … … 833 846 834 847 835 void VBoxSharedFoldersSettings::processCurrentChanged (Q ListViewItem *aItem)848 void VBoxSharedFoldersSettings::processCurrentChanged (Q3ListViewItem *aItem) 836 849 { 837 850 if (aItem && aItem->isSelectable() && listView->selectedItem() != aItem) … … 847 860 } 848 861 849 void VBoxSharedFoldersSettings::processDoubleClick (Q ListViewItem *aItem)862 void VBoxSharedFoldersSettings::processDoubleClick (Q3ListViewItem *aItem) 850 863 { 851 864 bool editEnabled = aItem && aItem->parent() && -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxSnapshotDetailsDlg.ui.h
r5999 r7220 1 //Added by qt3to4: 2 #include <q3mimefactory.h> 1 3 /** 2 4 * … … 29 31 void VBoxSnapshotDetailsDlg::init() 30 32 { 31 setIcon ( QPixmap::fromMimeSource ("settings_16px.png"));33 setIcon (qPixmapFromMimeSource ("settings_16px.png")); 32 34 33 35 txeSummary->setPaper (this->backgroundBrush()); … … 35 37 36 38 // filter out Enter keys in order to direct them to the default dlg button 37 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter);39 QIKeyFilter *ef = new QIKeyFilter (this, Qt::Key_Enter); 38 40 ef->watchOn (txeSummary); 39 41 -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxSnapshotsWgt.ui.h
r7207 r7220 1 //Added by qt3to4: 2 #include <Q3PopupMenu> 1 3 /** 2 4 * … … 30 32 31 33 /** QListViewItem subclass for snapshots */ 32 class VBoxSnapshotsWgt::ListViewItem : public Q ListViewItem34 class VBoxSnapshotsWgt::ListViewItem : public Q3ListViewItem 33 35 { 34 36 public: 35 37 36 38 /** Normal snapshot item */ 37 ListViewItem (Q ListView *lv, const CSnapshot &aSnapshot)38 : Q ListViewItem (lv)39 ListViewItem (Q3ListView *lv, const CSnapshot &aSnapshot) 40 : Q3ListViewItem (lv) 39 41 , mBld (false), mItal (false) 40 42 , mSnapshot (aSnapshot) … … 44 46 45 47 /** Normal snapshot item */ 46 ListViewItem (Q ListViewItem *lvi, const CSnapshot &aSnapshot)47 : Q ListViewItem (lvi)48 ListViewItem (Q3ListViewItem *lvi, const CSnapshot &aSnapshot) 49 : Q3ListViewItem (lvi) 48 50 , mBld (false), mItal (false) 49 51 , mSnapshot (aSnapshot) … … 53 55 54 56 /** Current state item */ 55 ListViewItem (Q ListView *lv, const CMachine &aMachine)56 : Q ListViewItem (lv)57 ListViewItem (Q3ListView *lv, const CMachine &aMachine) 58 : Q3ListViewItem (lv) 57 59 , mBld (false), mItal (true) 58 60 , mMachine (aMachine) … … 63 65 64 66 /** Current state item */ 65 ListViewItem (Q ListViewItem *lvi, const CMachine &aMachine)66 : Q ListViewItem (lvi)67 ListViewItem (Q3ListViewItem *lvi, const CMachine &aMachine) 68 : Q3ListViewItem (lvi) 67 69 , mBld (false), mItal (true) 68 70 , mMachine (aMachine) … … 95 97 if (font != p->font()) 96 98 p->setFont (font); 97 Q ListViewItem::paintCell (p, cg, column, width, align);98 } 99 100 int width (const QFontMetrics &fm, const Q ListView *lv, int c) const99 Q3ListViewItem::paintCell (p, cg, column, width, align); 100 } 101 102 int width (const QFontMetrics &fm, const Q3ListView *lv, int c) const 101 103 { 102 104 QFont font = lv->font(); … … 106 108 font.setItalic (mItal); 107 109 if (font != lv->font()) 108 return Q ListViewItem::width (QFontMetrics (font), lv, c);109 return Q ListViewItem::width (fm, lv, c);110 return Q3ListViewItem::width (QFontMetrics (font), lv, c); 111 return Q3ListViewItem::width (fm, lv, c); 110 112 } 111 113 … … 201 203 void okRename (int aCol) 202 204 { 203 Q ListViewItem::okRename (aCol);205 Q3ListViewItem::okRename (aCol); 204 206 AssertReturn (aCol == 0 && !mSnapshot.isNull(), (void) 0); 205 207 mSnapshot.SetName (text (0)); … … 226 228 227 229 /** Tooltips for snapshots */ 228 class VBoxSnapshotsWgt::ToolTip : public QToolTip 229 { 230 public: 231 232 ToolTip (QListView *aLV, QWidget *aParent, QToolTipGroup *aTG = 0) 233 : QToolTip (aParent, aTG), mLV (aLV) 234 {} 235 236 virtual ~ToolTip() 237 { 238 remove (parentWidget()); 239 } 240 241 void maybeTip (const QPoint &aPnt); 242 243 private: 244 245 QListView *mLV; 246 }; 247 248 void VBoxSnapshotsWgt::ToolTip::maybeTip (const QPoint &aPnt) 249 { 250 ListViewItem *lvi = static_cast <ListViewItem *> (mLV->itemAt (aPnt)); 251 if (!lvi) 252 return; 253 254 if (parentWidget()->topLevelWidget()->inherits ("QMainWindow")) 255 { 256 /* 257 * Ensure the main window doesn't show the text from the previous 258 * tooltip in the status bar. 259 */ 260 QToolTipGroup *toolTipGroup = 261 (::qt_cast <QMainWindow *> (parentWidget()->topLevelWidget()))-> 262 toolTipGroup(); 263 if (toolTipGroup) 264 { 265 int index = toolTipGroup->metaObject()->findSignal("removeTip()", false); 266 toolTipGroup->qt_emit (index, 0); 267 } 268 } 269 270 tip (mLV->itemRect (lvi), lvi->toolTipText()); 271 } 230 #warning port me 231 //class VBoxSnapshotsWgt::ToolTip : public QToolTip 232 //{ 233 //public: 234 // 235 // ToolTip (Q3ListView *aLV, QWidget *aParent, QToolTipGroup *aTG = 0) 236 // : QToolTip (aParent, aTG), mLV (aLV) 237 // {} 238 // 239 // virtual ~ToolTip() 240 // { 241 // remove (parentWidget()); 242 // } 243 // 244 // void maybeTip (const QPoint &aPnt); 245 // 246 //private: 247 // 248 // Q3ListView *mLV; 249 //}; 250 251 //void VBoxSnapshotsWgt::ToolTip::maybeTip (const QPoint &aPnt) 252 //{ 253 // ListViewItem *lvi = static_cast <ListViewItem *> (mLV->itemAt (aPnt)); 254 // if (!lvi) 255 // return; 256 // 257 // if (parentWidget()->topLevelWidget()->inherits ("QMainWindow")) 258 // { 259 // /* 260 // * Ensure the main window doesn't show the text from the previous 261 // * tooltip in the status bar. 262 // */ 263 // QToolTipGroup *toolTipGroup = 264 // (::qt_cast <Q3MainWindow *> (parentWidget()->topLevelWidget()))-> 265 // toolTipGroup(); 266 // if (toolTipGroup) 267 // { 268 // int index = toolTipGroup->metaObject()->findSignal("removeTip()", false); 269 // toolTipGroup->qt_emit (index, 0); 270 // } 271 // } 272 // 273 // tip (mLV->itemRect (lvi), lvi->toolTipText()); 274 //} 272 275 273 276 //////////////////////////////////////////////////////////////////////////////// … … 299 302 toolBar->setUsesBigPixmaps (true); 300 303 toolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); 301 VBoxSnapshotsWgtLayout->insertWidget (0, toolBar); 304 #warning port me 305 // VBoxSnapshotsWgtLayout->insertWidget (0, toolBar); 302 306 #ifdef Q_WS_MAC 303 307 toolBar->setMacStyle(); … … 305 309 306 310 /* context menu */ 307 mContextMenu = new Q PopupMenu (this);311 mContextMenu = new Q3PopupMenu (this); 308 312 mContextMenuDirty = true; 309 313 … … 326 330 327 331 /* tooltip */ 328 mToolTip = new ToolTip (listView, listView->viewport()); 332 #warning port me 333 // mToolTip = new ToolTip (listView, listView->viewport()); 329 334 } 330 335 … … 354 359 VBoxSnapshotsWgt::ListViewItem *VBoxSnapshotsWgt::findItem (const QUuid &aSnapshotId) 355 360 { 356 Q ListViewItemIterator it (listView);361 Q3ListViewItemIterator it (listView); 357 362 while (it.current()) 358 363 { … … 433 438 VBoxSnapshotsWgt::ListViewItem *VBoxSnapshotsWgt::curStateItem() 434 439 { 435 Q ListViewItem *csi = mCurSnapshotItem ? mCurSnapshotItem->firstChild()440 Q3ListViewItem *csi = mCurSnapshotItem ? mCurSnapshotItem->firstChild() 436 441 : listView->firstChild(); 437 442 Assert (csi); … … 439 444 } 440 445 441 void VBoxSnapshotsWgt::populateSnapshots (const CSnapshot &snapshot, Q ListViewItem *item)446 void VBoxSnapshotsWgt::populateSnapshots (const CSnapshot &snapshot, Q3ListViewItem *item) 442 447 { 443 448 ListViewItem *si = 0; … … 464 469 } 465 470 466 void VBoxSnapshotsWgt::listView_currentChanged (Q ListViewItem *item)471 void VBoxSnapshotsWgt::listView_currentChanged (Q3ListViewItem *item) 467 472 { 468 473 /* Make the selected item visible */ … … 502 507 503 508 void VBoxSnapshotsWgt:: 504 listView_contextMenuRequested (Q ListViewItem *item, const QPoint &pnt,509 listView_contextMenuRequested (Q3ListViewItem *item, const QPoint &pnt, 505 510 int /* col */) 506 511 { … … 583 588 QString snapShotName = tr ("Snapshot %1"); 584 589 QRegExp regExp (QString ("^") + snapShotName.arg ("([0-9]+)") + QString ("$")); 585 Q ListViewItemIterator iterator (listView);590 Q3ListViewItemIterator iterator (listView); 586 591 while (*iterator) 587 592 { -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxUSBFilterSettings.ui.h
r7207 r7220 1 //Added by qt3to4: 2 #include <Q3CString> 1 3 /** 2 4 * … … 65 67 case VBoxUSBFilterSettings::MachineType: 66 68 { 67 Q CString remote = aFilter.GetRemote().latin1();69 Q3CString remote = aFilter.GetRemote().latin1(); 68 70 if (remote == "yes" || remote == "true" || remote == "1") 69 71 cbRemote->setCurrentItem (1); -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMFirstRunWzd.ui.h
r5999 r7220 1 //Added by qt3to4: 2 #include <QShowEvent> 1 3 /** 2 4 * … … 50 52 /* media page */ 51 53 cbImage = new VBoxMediaComboBox (bgSource, "cbImage", VBoxDefs::CD); 52 ltVdm->insertWidget (0, cbImage); 54 #warning port me 55 // ltVdm->insertWidget (0, cbImage); 53 56 tbVdm->setIconSet (VBoxGlobal::iconSet ("select_file_16px.png", 54 57 "select_file_dis_16px.png")); … … 58 61 teSummary = new QITextEdit (pageSummary); 59 62 teSummary->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Minimum); 60 teSummary->setFrameShape (Q TextEdit::NoFrame);63 teSummary->setFrameShape (Q3TextEdit::NoFrame); 61 64 teSummary->setReadOnly (TRUE); 62 65 teSummary->setPaper (pageSummary->backgroundBrush()); 63 ltSummary->insertWidget (2, teSummary); 66 #warning port me 67 // ltSummary->insertWidget (2, teSummary); 64 68 65 69 /* setup connections and set validation for pages … … 74 78 75 79 /* filter out Enter keys in order to direct them to the default dlg button */ 76 QIKeyFilter *ef = new QIKeyFilter (this, Key_Enter);80 QIKeyFilter *ef = new QIKeyFilter (this, Qt::Key_Enter); 77 81 ef->watchOn (teSummary); 78 82 … … 84 88 85 89 /* setup minimum width for the sizeHint to be calculated correctly */ 86 int wid = widthSpacer->minimumSize().width(); 90 #warning port me 91 int wid = 1; 92 // int wid = widthSpacer->minimumSize().width(); 87 93 txWelcome->setMinimumWidth (wid); 88 94 txType->setMinimumWidth (wid); … … 170 176 } 171 177 172 Q Wizard::showPage (aPage);178 Q3Wizard::showPage (aPage); 173 179 174 180 /* fix focus on the last page. when we go to the last page … … 227 233 } 228 234 229 Q Wizard::accept();235 Q3Wizard::accept(); 230 236 } 231 237 … … 331 337 { 332 338 VBoxDiskImageManagerDlg vdm (this, "VBoxDiskImageManagerDlg", 333 WType_Dialog |WShowModal);339 Qt::WType_Dialog | Qt::WShowModal); 334 340 QUuid machineId = machine.GetId(); 335 341 VBoxDefs::DiskType type = rbCdType->isChecked() ? VBoxDefs::CD : -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui.h
r7207 r7220 1 //Added by qt3to4: 2 #include <QKeyEvent> 3 #include <Q3Frame> 4 #include <q3mimefactory.h> 5 #include <QResizeEvent> 6 #include <QEvent> 7 #include <Q3VBoxLayout> 8 #include <QShowEvent> 1 9 /** 2 10 * … … 38 46 mSelfArray [machine.GetName()] = new VBoxVMInformationDlg ( 39 47 aConsole, 40 "VBoxVMInformationDlg", WType_TopLevel |WDestructiveClose);48 "VBoxVMInformationDlg", Qt::WType_TopLevel | Qt::WDestructiveClose); 41 49 /* read new machine data for this information dialog */ 42 50 mSelfArray [machine.GetName()]->setup (aSession, aConsole); … … 46 54 info->show(); 47 55 info->raise(); 48 info->setWindowState (info->windowState() & ~ WindowMinimized);56 info->setWindowState (info->windowState() & ~Qt::WindowMinimized); 49 57 info->setActiveWindow(); 50 58 } … … 61 69 62 70 /* setup a dialog icon */ 63 setIcon ( QPixmap::fromMimeSource ("description_16px.png"));71 setIcon (qPixmapFromMimeSource ("description_16px.png")); 64 72 65 73 /* statusbar initially disabled */ … … 74 82 mInfoStack = new QTabWidget (mInfoFrame, "mInfoStack"); 75 83 mInfoStack->setMargin (10); 76 Q VBoxLayout *infoFrameLayout = new QVBoxLayout (mInfoFrame);84 Q3VBoxLayout *infoFrameLayout = new Q3VBoxLayout (mInfoFrame); 77 85 infoFrameLayout->addWidget (mInfoStack); 78 86 79 87 /* details view creation */ 80 mDetailsText = new Q TextBrowser();81 mDetailsText->setFrameShape (Q Frame::NoFrame);88 mDetailsText = new Q3TextBrowser(); 89 mDetailsText->setFrameShape (Q3Frame::NoFrame); 82 90 mDetailsText->setPaper (backgroundBrush()); 83 91 mInfoStack->addTab (mDetailsText, … … 86 94 87 95 /* statistic view creation */ 88 mStatisticText = new Q TextBrowser();89 mStatisticText->setFrameShape (Q Frame::NoFrame);96 mStatisticText = new Q3TextBrowser(); 97 mStatisticText->setFrameShape (Q3Frame::NoFrame); 90 98 mStatisticText->setPaper (backgroundBrush()); 91 99 mInfoStack->addTab (mStatisticText, … … 226 234 * and similar the same mechanism in Qt::QDialog inner source */ 227 235 QPushButton *button = 0; 228 QObjectList *list = queryList ("QPushButton"); 229 QObjectListIt it (*list); 230 while ((button = (QPushButton*)it.current()) && !button->isDefault()) 231 ++ it; 236 QObjectList list = queryList ("QPushButton"); 237 foreach (QObject* obj, list) 238 { 239 button = qobject_cast<QPushButton*> (obj); 240 if (button->isDefault()) 241 break; 242 } 232 243 return button; 233 244 } … … 267 278 break; 268 279 } 269 return Q MainWindow::eventFilter (aObject, aEvent);280 return Q3MainWindow::eventFilter (aObject, aEvent); 270 281 } 271 282 … … 273 284 bool VBoxVMInformationDlg::event (QEvent *aEvent) 274 285 { 275 bool result = Q MainWindow::event (aEvent);286 bool result = Q3MainWindow::event (aEvent); 276 287 switch (aEvent->type()) 277 288 { … … 299 310 { 300 311 if (aEvent->state() == 0 || 301 (aEvent->state() & Keypad && aEvent->key() ==Key_Enter))312 (aEvent->state() & Qt::KeypadModifier && aEvent->key() == Qt::Key_Enter)) 302 313 { 303 314 switch (aEvent->key()) 304 315 { 305 316 /* processing the return keypress for the auto-default button */ 306 case Key_Enter:307 case Key_Return:317 case Qt::Key_Enter: 318 case Qt::Key_Return: 308 319 { 309 320 QPushButton *currentDefault = searchDefaultButton(); … … 313 324 } 314 325 /* processing the escape keypress as the close dialog action */ 315 case Key_Escape:326 case Qt::Key_Escape: 316 327 { 317 328 close(); … … 327 338 void VBoxVMInformationDlg::showEvent (QShowEvent *aEvent) 328 339 { 329 Q MainWindow::showEvent (aEvent);340 Q3MainWindow::showEvent (aEvent); 330 341 331 342 /* one may think that QWidget::polish() is the right place to do things -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMLogViewer.ui
r5999 r7220 179 179 <include location="global" impldecl="in implementation">qtoolbutton.h</include> 180 180 <include location="global" impldecl="in implementation">qmessagebox.h</include> 181 <include location="global" impldecl="in implementation">qfocusdata.h</include>182 181 </includes> 183 182 <forwards> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMLogViewer.ui.h
r5999 r7220 1 //Added by qt3to4: 2 #include <Q3HBoxLayout> 3 #include <QKeyEvent> 4 #include <QLabel> 5 #include <QPixmap> 6 #include <q3mimefactory.h> 7 #include <QHideEvent> 8 #include <QResizeEvent> 9 #include <QEvent> 10 #include <Q3VBoxLayout> 11 #include <QShowEvent> 1 12 /** 2 13 * … … 46 57 mButtonClose = new QToolButton (this); 47 58 mButtonClose->setAutoRaise (true); 48 mButtonClose->setFocusPolicy (Q Widget::TabFocus);59 mButtonClose->setFocusPolicy (Qt::TabFocus); 49 60 mButtonClose->setAccel (QKeySequence (Qt::Key_Escape)); 50 61 connect (mButtonClose, SIGNAL (clicked()), this, SLOT (hide())); … … 62 73 mButtonNext->setEnabled (false); 63 74 mButtonNext->setAutoRaise (true); 64 mButtonNext->setFocusPolicy (Q Widget::TabFocus);75 mButtonNext->setFocusPolicy (Qt::TabFocus); 65 76 mButtonNext->setUsesTextLabel (true); 66 77 mButtonNext->setTextPosition (QToolButton::BesideIcon); … … 72 83 mButtonPrev->setEnabled (false); 73 84 mButtonPrev->setAutoRaise (true); 74 mButtonPrev->setFocusPolicy (Q Widget::TabFocus);85 mButtonPrev->setFocusPolicy (Qt::TabFocus); 75 86 mButtonPrev->setUsesTextLabel (true); 76 87 mButtonPrev->setTextPosition (QToolButton::BesideIcon); … … 100 111 QSizePolicy::Minimum); 101 112 102 Q HBoxLayout *mainLayout = new QHBoxLayout (this, 5, 5);113 Q3HBoxLayout *mainLayout = new Q3HBoxLayout (this, 5, 5); 103 114 mainLayout->addWidget (mButtonClose); 104 115 mainLayout->addWidget (mSearchName); … … 169 180 void search (bool aForward, bool aStartCurrent = false) 170 181 { 171 Q TextBrowser *browser = mViewer->currentLogPage();182 Q3TextBrowser *browser = mViewer->currentLogPage(); 172 183 if (!browser) return; 173 184 … … 226 237 * widget as a search next string action */ 227 238 if (aObject == mSearchString && 228 (e->state() == 0 || e->state() & Keypad) &&229 (e->key() == Key_Enter || e->key() ==Key_Return))239 (e->state() == 0 || e->state() & Qt::Keypad) && 240 (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return)) 230 241 { 231 242 findNext(); … … 233 244 } 234 245 /* handle other search next/previous shortcuts */ 235 else if (e->key() == Key_F3)246 else if (e->key() == Qt::Key_F3) 236 247 { 237 248 if (e->state() == 0) 238 249 findNext(); 239 else if (e->state() == ShiftButton)250 else if (e->state() == Qt::ShiftButton) 240 251 findBack(); 241 252 return true; … … 243 254 /* handle ctrl-f key combination as a shortcut to 244 255 * move to the search field */ 245 else if (e->state() == ControlButton && e->key() ==Key_F)256 else if (e->state() == Qt::ControlButton && e->key() == Qt::Key_F) 246 257 { 247 258 if (mViewer->currentLogPage()) … … 254 265 /* handle alpha-numeric keys to implement the 255 266 * "find as you type" feature */ 256 else if ((e->state() & ~ ShiftButton) == 0 &&267 else if ((e->state() & ~Qt::ShiftButton) == 0 && 257 268 e->key() >= Qt::Key_Exclam && 258 269 e->key() <= Qt::Key_AsciiTilde) … … 284 295 void hideEvent (QHideEvent *aEvent) 285 296 { 286 if (focusData()->focusWidget()->parent() == this) 287 focusNextPrevChild (true); 297 #warning port me 298 // if (focusData()->focusWidget()->parent() == this) 299 // focusNextPrevChild (true); 288 300 QWidget::hideEvent (aEvent); 289 301 } … … 318 330 /* creating new log viewer if there is no one existing */ 319 331 mSelfArray [aMachine.GetName()] = new VBoxVMLogViewer (0, 320 "VBoxVMLogViewer", WType_TopLevel |WDestructiveClose);332 "VBoxVMLogViewer", Qt::WType_TopLevel | Qt::WDestructiveClose); 321 333 /* read new machine data for this log viewer */ 322 334 mSelfArray [aMachine.GetName()]->setup (aMachine); … … 325 337 VBoxVMLogViewer *viewer = mSelfArray [aMachine.GetName()]; 326 338 viewer->show(); 327 viewer->setWindowState (viewer->windowState() & ~ WindowMinimized);339 viewer->setWindowState (viewer->windowState() & ~Qt::WindowMinimized); 328 340 viewer->setActiveWindow(); 329 341 } … … 343 355 344 356 /* setup a dialog icon */ 345 setIcon ( QPixmap::fromMimeSource ("show_logs_16px.png"));357 setIcon (qPixmapFromMimeSource ("show_logs_16px.png")); 346 358 347 359 /* statusbar initially disabled */ … … 355 367 /* logs list creation */ 356 368 mLogList = new QTabWidget (mLogsFrame, "mLogList"); 357 Q VBoxLayout *logsFrameLayout = new QVBoxLayout (mLogsFrame);369 Q3VBoxLayout *logsFrameLayout = new Q3VBoxLayout (mLogsFrame); 358 370 logsFrameLayout->addWidget (mLogList); 359 371 … … 421 433 * and similar the same mechanism in Qt::QDialog inner source */ 422 434 QPushButton *button = 0; 423 QObjectList *list = queryList ("QPushButton"); 424 QObjectListIt it (*list); 425 while ((button = (QPushButton*)it.current()) && !button->isDefault()) 426 ++ it; 435 QObjectList list = queryList ("QPushButton"); 436 foreach (QObject *obj, list) 437 { 438 button = qobject_cast<QPushButton*> (obj); 439 if (button->isDefault()) 440 break; 441 } 427 442 return button; 428 443 } … … 462 477 break; 463 478 } 464 return Q MainWindow::eventFilter (aObject, aEvent);479 return Q3MainWindow::eventFilter (aObject, aEvent); 465 480 } 466 481 … … 468 483 bool VBoxVMLogViewer::event (QEvent *aEvent) 469 484 { 470 bool result = Q MainWindow::event (aEvent);485 bool result = Q3MainWindow::event (aEvent); 471 486 switch (aEvent->type()) 472 487 { … … 486 501 { 487 502 if (aEvent->state() == 0 || 488 (aEvent->state() & Keypad && aEvent->key() ==Key_Enter))503 (aEvent->state() & Qt::KeypadModifier && aEvent->key() == Qt::Key_Enter)) 489 504 { 490 505 switch (aEvent->key()) 491 506 { 492 507 /* processing the return keypress for the auto-default button */ 493 case Key_Enter:494 case Key_Return:508 case Qt::Key_Enter: 509 case Qt::Key_Return: 495 510 { 496 511 QPushButton *currentDefault = searchDefaultButton(); … … 500 515 } 501 516 /* processing the escape keypress as the close dialog action */ 502 case Key_Escape:517 case Qt::Key_Escape: 503 518 { 504 519 mCloseButton->animateClick(); … … 514 529 void VBoxVMLogViewer::showEvent (QShowEvent *aEvent) 515 530 { 516 Q MainWindow::showEvent (aEvent);531 Q3MainWindow::showEvent (aEvent); 517 532 518 533 /* one may think that QWidget::polish() is the right place to do things … … 570 585 if (!isAnyLogPresent) 571 586 { 572 Q TextBrowser *dummyLog = createLogPage ("VBox.log");587 Q3TextBrowser *dummyLog = createLogPage ("VBox.log"); 573 588 dummyLog->setTextFormat (Qt::RichText); 574 dummyLog->setWordWrap (Q TextEdit::WidgetWidth);589 dummyLog->setWordWrap (Q3TextEdit::WidgetWidth); 575 590 dummyLog->setText (tr ("<p>No log files found. Press the <b>Refresh</b> " 576 591 "button to rescan the log folder <nobr><b>%1</b></nobr>.</p>") … … 596 611 /* resize the whole log-viewer to fit 80 symbols in text-browser for 597 612 * the first time started */ 598 Q TextBrowser *firstPage = static_cast <QTextBrowser *> (mLogList->page(0));613 Q3TextBrowser *firstPage = static_cast <Q3TextBrowser *> (mLogList->page(0)); 599 614 int fullWidth = firstPage->fontMetrics().width (QChar ('x')) * 80 + 600 615 firstPage->verticalScrollBar()->width() + … … 613 628 /* prepare log file */ 614 629 QFile logFile (aFileName); 615 if (!logFile.exists() || !logFile.open ( IO_ReadOnly))630 if (!logFile.exists() || !logFile.open (QIODevice::ReadOnly)) 616 631 return; 617 632 618 633 /* read log file and write it into the log page */ 619 Q TextBrowser *logViewer = createLogPage (QFileInfo (aFileName).fileName());634 Q3TextBrowser *logViewer = createLogPage (QFileInfo (aFileName).fileName()); 620 635 logViewer->setText (logFile.readAll()); 621 636 … … 624 639 625 640 626 Q TextBrowser* VBoxVMLogViewer::createLogPage (const QString &aName)627 { 628 Q TextBrowser *logViewer = new QTextBrowser();641 Q3TextBrowser* VBoxVMLogViewer::createLogPage (const QString &aName) 642 { 643 Q3TextBrowser *logViewer = new Q3TextBrowser(); 629 644 logViewer->setTextFormat (Qt::PlainText); 630 645 QFont font = logViewer->currentFont(); 631 646 font.setFamily ("Courier New,courier"); 632 647 logViewer->setFont (font); 633 logViewer->setWordWrap (Q TextEdit::NoWrap);634 logViewer->setVScrollBarMode (Q ScrollView::AlwaysOn);648 logViewer->setWordWrap (Q3TextEdit::NoWrap); 649 logViewer->setVScrollBarMode (Q3ScrollView::AlwaysOn); 635 650 mLogList->addTab (logViewer, aName); 636 651 return logViewer; … … 638 653 639 654 640 Q TextBrowser* VBoxVMLogViewer::currentLogPage()655 Q3TextBrowser* VBoxVMLogViewer::currentLogPage() 641 656 { 642 657 return mLogList->isEnabled() ? 643 static_cast<Q TextBrowser*> (mLogList->currentPage()) : 0;658 static_cast<Q3TextBrowser*> (mLogList->currentPage()) : 0; 644 659 } 645 660 … … 656 671 "/" + defaultFileName); 657 672 658 QString newFileName = Q FileDialog::getSaveFileName (defaultFullName,673 QString newFileName = Q3FileDialog::getSaveFileName (defaultFullName, 659 674 QString::null, this, "SaveLogAsDialog", tr ("Save VirtualBox Log As")); 660 675 … … 665 680 QFile oldFile (mLogFilesList [mLogList->currentPageIndex()]); 666 681 QFile newFile (newFileName); 667 if (!oldFile.open ( IO_ReadOnly) || !newFile.open (IO_WriteOnly))682 if (!oldFile.open (QIODevice::ReadOnly) || !newFile.open (QIODevice::WriteOnly)) 668 683 return; 669 684 -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMNetworkSettings.ui.h
r7207 r7220 290 290 void VBoxVMNetworkSettings::pbTAPSetup_clicked() 291 291 { 292 QString selected = Q FileDialog::getOpenFileName (292 QString selected = Q3FileDialog::getOpenFileName ( 293 293 "/", 294 294 QString::null, … … 297 297 tr ("Select TAP setup application")); 298 298 299 if ( selected)299 if (!selected.isEmpty()) 300 300 leTAPSetup->setText (selected); 301 301 } … … 303 303 void VBoxVMNetworkSettings::pbTAPTerminate_clicked() 304 304 { 305 QString selected = Q FileDialog::getOpenFileName (305 QString selected = Q3FileDialog::getOpenFileName ( 306 306 "/", 307 307 QString::null, … … 310 310 tr ("Select TAP terminate application")); 311 311 312 if ( selected)312 if (!selected.isEmpty()) 313 313 leTAPTerminate->setText (selected); 314 314 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsDlg.ui
r7021 r7220 46 46 <grid> 47 47 <property name="name"> 48 <cstring> unnamed</cstring>48 <cstring>VBoxVMSettingsDlgLayout</cstring> 49 49 </property> 50 50 <property name="spacing"> … … 3205 3205 <include location="global" impldecl="in implementation">qobjectlist.h</include> 3206 3206 <include location="global" impldecl="in implementation">qlistbox.h</include> 3207 <include location="global" impldecl="in implementation">qfocusdata.h</include>3208 3207 <include location="global" impldecl="in implementation">qtimer.h</include> 3209 3208 <include location="global" impldecl="in implementation">qpopupmenu.h</include> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsDlg.ui.h
r7207 r7220 1 //Added by qt3to4: 2 #include <Q3WhatsThis> 3 #include <QLabel> 4 #include <QShowEvent> 5 #include <Q3ValueList> 6 #include <q3mimefactory.h> 7 #include <QKeyEvent> 8 #include <Q3HBoxLayout> 9 #include <QEvent> 10 #include <Q3VBoxLayout> 1 11 /** 2 12 * … … 43 53 { 44 54 setCaption (tr ("Add Host Interface")); 45 Q VBoxLayout *mainLayout = new QVBoxLayout (this, 10, 10, "mainLayout");55 Q3VBoxLayout *mainLayout = new Q3VBoxLayout (this, 10, 10, "mainLayout"); 46 56 47 57 /* Setup Input layout */ 48 Q HBoxLayout *inputLayout = new QHBoxLayout (mainLayout, 10, "inputLayout");58 Q3HBoxLayout *inputLayout = new Q3HBoxLayout (mainLayout, 10, "inputLayout"); 49 59 QLabel *lbName = new QLabel (tr ("Interface Name"), this); 50 60 mLeName = new QLineEdit (aIfaceName, this); 51 Q WhatsThis::add (mLeName, tr ("Descriptive name of the new network interface"));61 Q3WhatsThis::add (mLeName, tr ("Descriptive name of the new network interface")); 52 62 inputLayout->addWidget (lbName); 53 63 inputLayout->addWidget (mLeName); … … 56 66 57 67 /* Setup Button layout */ 58 Q HBoxLayout *buttonLayout = new QHBoxLayout (mainLayout, 10, "buttonLayout");68 Q3HBoxLayout *buttonLayout = new Q3HBoxLayout (mainLayout, 10, "buttonLayout"); 59 69 mBtOk = new QPushButton (tr ("&OK"), this, "mBtOk"); 60 70 QSpacerItem *spacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); … … 133 143 * boot-items up/down moving. 134 144 */ 135 class BootItemsTable : public Q ListView145 class BootItemsTable : public Q3ListView 136 146 { 137 147 Q_OBJECT … … 140 150 141 151 BootItemsTable (QWidget *aParent, const char *aName) 142 : Q ListView (aParent, aName)152 : Q3ListView (aParent, aName) 143 153 { 144 154 addColumn (QString::null); … … 147 157 setColumnWidthMode (0, Maximum); 148 158 setResizeMode (AllColumns); 149 Q WhatsThis::add (this, tr ("Defines the boot device order. "159 Q3WhatsThis::add (this, tr ("Defines the boot device order. " 150 160 "Use checkboxes to the left to enable or disable " 151 161 "individual boot devices. Move items up and down to " 152 162 "change the device order.")); 153 163 setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Preferred); 154 connect (this, SIGNAL (pressed (Q ListViewItem*)),155 this, SLOT (processPressed (Q ListViewItem*)));164 connect (this, SIGNAL (pressed (Q3ListViewItem*)), 165 this, SLOT (processPressed (Q3ListViewItem*))); 156 166 } 157 167 … … 168 178 private slots: 169 179 170 void processPressed (Q ListViewItem *aItem)180 void processPressed (Q3ListViewItem *aItem) 171 181 { 172 182 if (!aItem) … … 190 200 } 191 201 } 192 Q ListView::keyPressEvent (aEvent);202 Q3ListView::keyPressEvent (aEvent); 193 203 } 194 204 }; … … 206 216 Q_OBJECT 207 217 208 class BootItem : public Q CheckListItem218 class BootItem : public Q3CheckListItem 209 219 { 210 220 public: 211 221 212 BootItem (BootItemsTable *aParent, Q ListViewItem *aAfter,222 BootItem (BootItemsTable *aParent, Q3ListViewItem *aAfter, 213 223 const QString &aName, Type aType) 214 : Q CheckListItem (aParent, aAfter, aName, aType) {}224 : Q3CheckListItem (aParent, aAfter, aName, aType) {} 215 225 216 226 private: … … 229 239 { 230 240 /* Setup main widget layout */ 231 Q HBoxLayout *mainLayout = new QHBoxLayout (this, 0, 6, "mainLayout");241 Q3HBoxLayout *mainLayout = new Q3HBoxLayout (this, 0, 6, "mainLayout"); 232 242 233 243 /* Setup settings layout */ 234 244 mBootTable = new BootItemsTable (this, "mBootTable"); 235 connect (mBootTable, SIGNAL (currentChanged (Q ListViewItem*)),236 this, SLOT (processCurrentChanged (Q ListViewItem*)));245 connect (mBootTable, SIGNAL (currentChanged (Q3ListViewItem*)), 246 this, SLOT (processCurrentChanged (Q3ListViewItem*))); 237 247 mainLayout->addWidget (mBootTable); 238 248 239 249 /* Setup button's layout */ 240 Q VBoxLayout *buttonLayout = new QVBoxLayout (mainLayout, 0, "buttonLayout");250 Q3VBoxLayout *buttonLayout = new Q3VBoxLayout (mainLayout, 0, "buttonLayout"); 241 251 mBtnUp = new QToolButton (this, "mBtnUp"); 242 252 mBtnDown = new QToolButton (this, "mBtnDown"); 243 253 mBtnUp->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); 244 254 mBtnDown->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); 245 Q WhatsThis::add (mBtnUp, tr ("Moves the selected boot device up."));246 Q WhatsThis::add (mBtnDown, tr ("Moves the selected boot device down."));255 Q3WhatsThis::add (mBtnUp, tr ("Moves the selected boot device up.")); 256 Q3WhatsThis::add (mBtnDown, tr ("Moves the selected boot device down.")); 247 257 QToolTip::add (mBtnUp, tr ("Move Up (Ctrl-Up)")); 248 258 QToolTip::add (mBtnDown, tr ("Move Down (Ctrl-Down)")); 249 259 mBtnUp->setAutoRaise (true); 250 260 mBtnDown->setAutoRaise (true); 251 mBtnUp->setFocusPolicy (Q Widget::StrongFocus);252 mBtnDown->setFocusPolicy (Q Widget::StrongFocus);261 mBtnUp->setFocusPolicy (Qt::StrongFocus); 262 mBtnDown->setFocusPolicy (Qt::StrongFocus); 253 263 mBtnUp->setIconSet (VBoxGlobal::iconSet ("list_moveup_16px.png", 254 264 "list_moveup_disabled_16px.png")); … … 290 300 { 291 301 QString name = vboxGlobal().toString (type); 292 Q CheckListItem *item = new BootItem (mBootTable,293 mBootTable->lastItem(), name, Q CheckListItem::CheckBox);302 Q3CheckListItem *item = new BootItem (mBootTable, 303 mBootTable->lastItem(), name, Q3CheckListItem::CheckBox); 294 304 item->setOn (true); 295 305 uniqueList << name; … … 304 314 if (!uniqueList.contains (name)) 305 315 { 306 Q CheckListItem *item = new BootItem (mBootTable,307 mBootTable->lastItem(), name, Q CheckListItem::CheckBox);316 Q3CheckListItem *item = new BootItem (mBootTable, 317 mBootTable->lastItem(), name, Q3CheckListItem::CheckBox); 308 318 uniqueList << name; 309 319 int width = item->width (mBootTable->fontMetrics(), mBootTable, 0); … … 321 331 void putBackToMachine (CMachine &aMachine) 322 332 { 323 Q CheckListItem *item = 0;333 Q3CheckListItem *item = 0; 324 334 /* Search for checked items */ 325 335 int index = 1; 326 item = static_cast<Q CheckListItem*> (mBootTable->firstChild());336 item = static_cast<Q3CheckListItem*> (mBootTable->firstChild()); 327 337 while (item) 328 338 { … … 333 343 aMachine.SetBootOrder (index++, type); 334 344 } 335 item = static_cast<Q CheckListItem*> (item->nextSibling());345 item = static_cast<Q3CheckListItem*> (item->nextSibling()); 336 346 } 337 347 /* Search for non-checked items */ 338 item = static_cast<Q CheckListItem*> (mBootTable->firstChild());348 item = static_cast<Q3CheckListItem*> (mBootTable->firstChild()); 339 349 while (item) 340 350 { 341 351 if (!item->isOn()) 342 352 aMachine.SetBootOrder (index++, KDeviceType_Null); 343 item = static_cast<Q CheckListItem*> (item->nextSibling());353 item = static_cast<Q3CheckListItem*> (item->nextSibling()); 344 354 } 345 355 } … … 367 377 void moveItemUp() 368 378 { 369 Q ListViewItem *item = mBootTable->currentItem();379 Q3ListViewItem *item = mBootTable->currentItem(); 370 380 Assert (item); 371 Q ListViewItem *itemAbove = item->itemAbove();381 Q3ListViewItem *itemAbove = item->itemAbove(); 372 382 if (!itemAbove) return; 373 383 itemAbove->moveItem (item); … … 378 388 void moveItemDown() 379 389 { 380 Q ListViewItem *item = mBootTable->currentItem();390 Q3ListViewItem *item = mBootTable->currentItem(); 381 391 Assert (item); 382 Q ListViewItem *itemBelow = item->itemBelow();392 Q3ListViewItem *itemBelow = item->itemBelow(); 383 393 if (!itemBelow) return; 384 394 item->moveItem (itemBelow); … … 392 402 } 393 403 394 void processCurrentChanged (Q ListViewItem *aItem)404 void processCurrentChanged (Q3ListViewItem *aItem) 395 405 { 396 406 bool upEnabled = aItem && aItem->isSelected() && aItem->itemAbove(); … … 429 439 //} 430 440 431 class USBListItem : public Q CheckListItem441 class USBListItem : public Q3CheckListItem 432 442 { 433 443 public: 434 444 435 USBListItem (Q ListView *aParent, QListViewItem *aAfter)436 : Q CheckListItem (aParent, aAfter, QString::null, CheckBox)445 USBListItem (Q3ListView *aParent, Q3ListViewItem *aAfter) 446 : Q3CheckListItem (aParent, aAfter, QString::null, CheckBox) 437 447 , mId (-1) {} 438 448 … … 444 454 * using the text of the first column of every item. 445 455 */ 446 static QString path (Q ListViewItem *li)456 static QString path (Q3ListViewItem *li) 447 457 { 448 458 static QString sep = ": "; 449 459 QString p; 450 Q ListViewItem *cur = li;460 Q3ListViewItem *cur = li; 451 461 while (cur) 452 462 { … … 480 490 this, SLOT (onMediaEnumerationDone())); 481 491 482 setIcon ( QPixmap::fromMimeSource ("settings_16px.png"));492 setIcon (qPixmapFromMimeSource ("settings_16px.png")); 483 493 484 494 /* all pages are initially valid */ … … 490 500 /* hide the header and internal columns */ 491 501 listView->header()->hide(); 492 listView->setColumnWidthMode (listView_Id, Q ListView::Manual);493 listView->setColumnWidthMode (listView_Link, Q ListView::Manual);502 listView->setColumnWidthMode (listView_Id, Q3ListView::Manual); 503 listView->setColumnWidthMode (listView_Link, Q3ListView::Manual); 494 504 listView->hideColumn (listView_Id); 495 505 listView->hideColumn (listView_Link); … … 520 530 521 531 whatsThisLabel = new QIRichLabel (this, "whatsThisLabel"); 522 VBoxVMSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1); 532 #warning port me 533 // VBoxVMSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1); 523 534 524 535 #ifndef DEBUG … … 534 545 535 546 whatsThisLabel->setMaxHeightMode (true); 536 whatsThisLabel->setFocusPolicy (Q Widget::NoFocus);547 whatsThisLabel->setFocusPolicy (Qt::NoFocus); 537 548 whatsThisLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed); 538 whatsThisLabel->setBackgroundMode (Q Label::PaletteMidlight);549 whatsThisLabel->setBackgroundMode (Qt::PaletteMidlight); 539 550 whatsThisLabel->setFrameShape (QLabel::Box); 540 551 whatsThisLabel->setFrameShadow (QLabel::Sunken); 541 552 whatsThisLabel->setMargin (7); 542 553 whatsThisLabel->setScaledContents (FALSE); 543 whatsThisLabel->setAlignment (int (Q Label::WordBreak|544 Q Label::AlignJustify |545 Q Label::AlignTop));554 whatsThisLabel->setAlignment (int (Qt::TextWordWrap | 555 Qt::AlignJustify | 556 Qt::AlignTop)); 546 557 547 558 whatsThisLabel->setFixedHeight (whatsThisLabel->frameWidth() * 2 + … … 584 595 /* HDD Images page */ 585 596 586 Q WhatsThis::add (static_cast <QWidget *> (grbHDA->child ("qt_groupbox_checkbox")),597 Q3WhatsThis::add (static_cast <QWidget *> (grbHDA->child ("qt_groupbox_checkbox")), 587 598 tr ("When checked, attaches the specified virtual hard disk to the " 588 599 "Master slot of the Primary IDE controller.")); 589 Q WhatsThis::add (static_cast <QWidget *> (grbHDB->child ("qt_groupbox_checkbox")),600 Q3WhatsThis::add (static_cast <QWidget *> (grbHDB->child ("qt_groupbox_checkbox")), 590 601 tr ("When checked, attaches the specified virtual hard disk to the " 591 602 "Slave slot of the Primary IDE controller.")); 592 Q WhatsThis::add (static_cast <QWidget *> (grbHDD->child ("qt_groupbox_checkbox")),603 Q3WhatsThis::add (static_cast <QWidget *> (grbHDD->child ("qt_groupbox_checkbox")), 593 604 tr ("When checked, attaches the specified virtual hard disk to the " 594 605 "Slave slot of the Secondary IDE controller.")); … … 596 607 cbHDB = new VBoxMediaComboBox (grbHDB, "cbHDB", VBoxDefs::HD); 597 608 cbHDD = new VBoxMediaComboBox (grbHDD, "cbHDD", VBoxDefs::HD); 598 hdaLayout->insertWidget (0, cbHDA); 599 hdbLayout->insertWidget (0, cbHDB); 600 hddLayout->insertWidget (0, cbHDD); 609 #warning port me 610 // hdaLayout->insertWidget (0, cbHDA); 611 // hdbLayout->insertWidget (0, cbHDB); 612 // hddLayout->insertWidget (0, cbHDD); 601 613 /* sometimes the weirdness of Qt just kills... */ 602 614 setTabOrder (static_cast <QWidget *> (grbHDA->child ("qt_groupbox_checkbox")), … … 607 619 cbHDD); 608 620 609 Q WhatsThis::add (cbHDB, tr ("Displays the virtual hard disk to attach to this IDE slot "621 Q3WhatsThis::add (cbHDB, tr ("Displays the virtual hard disk to attach to this IDE slot " 610 622 "and allows to quickly select a different hard disk.")); 611 Q WhatsThis::add (cbHDD, tr ("Displays the virtual hard disk to attach to this IDE slot "623 Q3WhatsThis::add (cbHDD, tr ("Displays the virtual hard disk to attach to this IDE slot " 612 624 "and allows to quickly select a different hard disk.")); 613 Q WhatsThis::add (cbHDA, tr ("Displays the virtual hard disk to attach to this IDE slot "625 Q3WhatsThis::add (cbHDA, tr ("Displays the virtual hard disk to attach to this IDE slot " 614 626 "and allows to quickly select a different hard disk.")); 615 Q WhatsThis::add (cbHDB, tr ("Displays the virtual hard disk to attach to this IDE slot "627 Q3WhatsThis::add (cbHDB, tr ("Displays the virtual hard disk to attach to this IDE slot " 616 628 "and allows to quickly select a different hard disk.")); 617 Q WhatsThis::add (cbHDD, tr ("Displays the virtual hard disk to attach to this IDE slot "629 Q3WhatsThis::add (cbHDD, tr ("Displays the virtual hard disk to attach to this IDE slot " 618 630 "and allows to quickly select a different hard disk.")); 619 631 … … 644 656 /* CD/DVD-ROM Drive Page */ 645 657 646 Q WhatsThis::add (static_cast <QWidget *> (bgDVD->child ("qt_groupbox_checkbox")),658 Q3WhatsThis::add (static_cast <QWidget *> (bgDVD->child ("qt_groupbox_checkbox")), 647 659 tr ("When checked, mounts the specified media to the CD/DVD drive of the " 648 660 "virtual machine. Note that the CD/DVD drive is always connected to the " 649 661 "Secondary Master IDE controller of the machine.")); 650 662 cbISODVD = new VBoxMediaComboBox (bgDVD, "cbISODVD", VBoxDefs::CD); 651 cdLayout->insertWidget(0, cbISODVD); 652 QWhatsThis::add (cbISODVD, tr ("Displays the image file to mount to the virtual CD/DVD " 663 #warning port me 664 // cdLayout->insertWidget(0, cbISODVD); 665 Q3WhatsThis::add (cbISODVD, tr ("Displays the image file to mount to the virtual CD/DVD " 653 666 "drive and allows to quickly select a different image.")); 654 667 … … 671 684 /* Floppy Drive Page */ 672 685 673 Q WhatsThis::add (static_cast <QWidget *> (bgFloppy->child ("qt_groupbox_checkbox")),686 Q3WhatsThis::add (static_cast <QWidget *> (bgFloppy->child ("qt_groupbox_checkbox")), 674 687 tr ("When checked, mounts the specified media to the Floppy drive of the " 675 688 "virtual machine.")); 676 689 cbISOFloppy = new VBoxMediaComboBox (bgFloppy, "cbISOFloppy", VBoxDefs::FD); 677 fdLayout->insertWidget(0, cbISOFloppy); 678 QWhatsThis::add (cbISOFloppy, tr ("Displays the image file to mount to the virtual Floppy " 690 #warning port me 691 // fdLayout->insertWidget(0, cbISOFloppy); 692 Q3WhatsThis::add (cbISOFloppy, tr ("Displays the image file to mount to the virtual Floppy " 679 693 "drive and allows to quickly select a different image.")); 680 694 … … 697 711 /* Audio Page */ 698 712 699 Q WhatsThis::add (static_cast <QWidget *> (grbAudio->child ("qt_groupbox_checkbox")),713 Q3WhatsThis::add (static_cast <QWidget *> (grbAudio->child ("qt_groupbox_checkbox")), 700 714 tr ("When checked, the virtual PCI audio card is plugged into the " 701 715 "virtual machine that uses the specified driver to communicate " … … 721 735 722 736 /* Parallel Port Page (currently disabled) */ 723 Q ListViewItem *item = listView->findItem ("#parallelPorts", listView_Link);737 Q3ListViewItem *item = listView->findItem ("#parallelPorts", listView_Link); 724 738 if (item) item->setVisible (false); 725 739 … … 741 755 // If we remove stacking, we will have to create a structure to store 742 756 // editable data of all USB filters while the dialog is open. 743 wstUSBFilters = new QWidgetStack (grbUSBFilters, "wstUSBFilters"); 744 grbUSBFiltersLayout->addWidget (wstUSBFilters); 757 wstUSBFilters = new Q3WidgetStack (grbUSBFilters, "wstUSBFilters"); 758 #warning port me 759 // grbUSBFiltersLayout->addWidget (wstUSBFilters); 745 760 /* create a default (disabled) filter settings widget at index 0 */ 746 761 VBoxUSBFilterSettings *settings = new VBoxUSBFilterSettings (wstUSBFilters); … … 766 781 /* VRDP Page */ 767 782 768 Q WhatsThis::add (static_cast <QWidget *> (grbVRDP->child ("qt_groupbox_checkbox")),783 Q3WhatsThis::add (static_cast <QWidget *> (grbVRDP->child ("qt_groupbox_checkbox")), 769 784 tr ("When checked, the VM will act as a Remote Desktop " 770 785 "Protocol (RDP) server, allowing remote clients to connect " … … 786 801 /* Shared Folders Page */ 787 802 788 Q VBoxLayout* pageFoldersLayout = new QVBoxLayout (pageFolders, 0, 10, "pageFoldersLayout");803 Q3VBoxLayout* pageFoldersLayout = new Q3VBoxLayout (pageFolders, 0, 10, "pageFoldersLayout"); 789 804 mSharedFolders = new VBoxSharedFoldersSettings (pageFolders, "sharedFolders"); 790 805 mSharedFolders->setDialogType (VBoxSharedFoldersSettings::MachineType); … … 840 855 setTabOrder (tbwGeneral, tblBootOrder); 841 856 setTabOrder (tblBootOrder->focusProxy(), chbEnableACPI); 842 groupBox12Layout->addWidget (tblBootOrder); 857 #warning port me 858 // groupBox12Layout->addWidget (tblBootOrder); 843 859 tblBootOrder->fixTabStops(); 844 860 /* Shared Clipboard mode */ … … 905 921 QString VBoxVMSettingsDlg::pagePath (QWidget *aPage) 906 922 { 907 Q ListViewItem *li = listView->923 Q3ListViewItem *li = listView-> 908 924 findItem (QString::number (widgetStack->id (aPage)), 1); 909 925 return ::path (li); … … 1241 1257 1242 1258 1243 QString VBoxVMSettingsDlg::getHdInfo (Q GroupBox *aGroupBox, QUuid aId)1259 QString VBoxVMSettingsDlg::getHdInfo (Q3GroupBox *aGroupBox, QUuid aId) 1244 1260 { 1245 1261 QString notAttached = tr ("<not attached>", "hard disk"); … … 1263 1279 else 1264 1280 { 1265 widget = focusData()->focusWidget(); 1281 #warning port me 1282 // widget = focusData()->focusWidget(); 1266 1283 } 1267 1284 /* if the given widget lacks the whats'this text, look at its parent */ 1268 1285 while (widget && widget != this) 1269 1286 { 1270 text = QWhatsThis::textFor (widget); 1287 #warning port me 1288 // text = Q3WhatsThis::textFor (widget); 1271 1289 if (!text.isEmpty()) 1272 1290 break; … … 1274 1292 } 1275 1293 1276 if (text.isEmpty() && !warningString.isEmpty()) 1277 text = warningString; 1278 if (text.isEmpty()) 1279 text = QWhatsThis::textFor (this); 1294 #warning port me 1295 // if (text.isEmpty() && !warningString.isEmpty()) 1296 // text = warningString; 1297 // if (text.isEmpty()) 1298 // text = Q3WhatsThis::textFor (this); 1280 1299 1281 1300 whatsThisLabel->setText (text); … … 1316 1335 { 1317 1336 /* search for a list view item corresponding to the category */ 1318 Q ListViewItem *item = listView->findItem (aCategory, listView_Link);1337 Q3ListViewItem *item = listView->findItem (aCategory, listView_Link); 1319 1338 if (item) 1320 1339 { … … 1328 1347 { 1329 1348 QWidget *w = static_cast <QWidget *> (obj); 1330 Q WidgetListparents;1349 Q3PtrList<QWidget> parents; 1331 1350 QWidget *p = w; 1332 1351 while ((p = p->parentWidget()) != NULL) … … 1352 1371 } 1353 1372 1354 void VBoxVMSettingsDlg::listView_currentChanged (Q ListViewItem *item)1373 void VBoxVMSettingsDlg::listView_currentChanged (Q3ListViewItem *item) 1355 1374 { 1356 1375 Assert (item); … … 1375 1394 bool newValid = true; 1376 1395 { 1377 QObjectList *l = this->queryList ("QIWidgetValidator"); 1378 QObjectListIt it (*l); 1379 QObject *obj; 1380 while ((obj = it.current()) != 0) 1396 QObjectList l = this->queryList ("QIWidgetValidator"); 1397 foreach(QObject *obj, l) 1381 1398 { 1382 1399 QIWidgetValidator *wval = (QIWidgetValidator *) obj; … … 1387 1404 break; 1388 1405 } 1389 ++ it; 1390 } 1391 delete l; 1406 } 1392 1407 } 1393 1408 … … 1423 1438 valid = true; 1424 1439 1425 Q ValueList <QUuid> uuids;1440 Q3ValueList <QUuid> uuids; 1426 1441 1427 1442 if (valid && grbHDA->isChecked()) … … 1552 1567 { 1553 1568 valid = true; 1554 Q ValueList <QString> ports;1555 Q ValueList <QString> paths;1569 Q3ValueList <QString> ports; 1570 Q3ValueList <QString> paths; 1556 1571 1557 1572 int index = 0; … … 1597 1612 { 1598 1613 valid = true; 1599 Q ValueList <QString> ports;1600 Q ValueList <QString> paths;1614 Q3ValueList <QString> ports; 1615 Q3ValueList <QString> paths; 1601 1616 1602 1617 int index = 0; … … 1706 1721 LONG dev; 1707 1722 struct { 1708 Q GroupBox *grb;1723 Q3GroupBox *grb; 1709 1724 QComboBox *cbb; 1710 1725 QLabel *tx; … … 1946 1961 * not available (i.e. in VirtualBox OSE) */ 1947 1962 1948 Q ListViewItem *usbItem = listView->findItem ("#usb", listView_Link);1963 Q3ListViewItem *usbItem = listView->findItem ("#usb", listView_Link); 1949 1964 Assert (usbItem); 1950 1965 if (usbItem) … … 1980 1995 * not available (i.e. in VirtualBox OSE) */ 1981 1996 1982 Q ListViewItem *vrdpItem = listView->findItem ("#vrdp", listView_Link);1997 Q3ListViewItem *vrdpItem = listView->findItem ("#vrdp", listView_Link); 1983 1998 Assert (vrdpItem); 1984 1999 if (vrdpItem) … … 2054 2069 /* VT-x/AMD-V */ 2055 2070 cmachine.SetHWVirtExEnabled ( 2056 chbVTX->state() == Q Button::Off ? KTSBool_False :2057 chbVTX->state() == Q Button::On ? KTSBool_True : KTSBool_Default);2071 chbVTX->state() == QCheckBox::Off ? KTSBool_False : 2072 chbVTX->state() == QCheckBox::On ? KTSBool_True : KTSBool_Default); 2058 2073 2059 2074 /* Saved state folder */ … … 2089 2104 LONG dev; 2090 2105 struct { 2091 Q GroupBox *grb;2106 Q3GroupBox *grb; 2092 2107 QUuid *uuid; 2093 2108 } data; … … 2256 2271 2257 2272 /* then add all new filters */ 2258 for (Q ListViewItem *item = lvUSBFilters->firstChild(); item;2273 for (Q3ListViewItem *item = lvUSBFilters->firstChild(); item; 2259 2274 item = item->nextSibling()) 2260 2275 { … … 2320 2335 2321 2336 VBoxDiskImageManagerDlg dlg (this, "VBoxDiskImageManagerDlg", 2322 WType_Dialog |WShowModal);2337 Qt::WType_Dialog | Qt::WShowModal); 2323 2338 QUuid machineId = cmachine.GetId(); 2324 2339 QUuid hdId = type == VBoxDefs::HD ? cbb->getId() : QUuid(); … … 2567 2582 void VBoxVMSettingsDlg::addUSBFilter (const CUSBDeviceFilter &aFilter, bool isNew) 2568 2583 { 2569 Q ListViewItem *currentItem = isNew2584 Q3ListViewItem *currentItem = isNew 2570 2585 ? lvUSBFilters->currentItem() 2571 2586 : lvUSBFilters->lastItem(); … … 2606 2621 } 2607 2622 2608 void VBoxVMSettingsDlg::lvUSBFilters_currentChanged (Q ListViewItem *item)2623 void VBoxVMSettingsDlg::lvUSBFilters_currentChanged (Q3ListViewItem *item) 2609 2624 { 2610 2625 if (item && lvUSBFilters->selectedItem() != item) … … 2630 2645 void VBoxVMSettingsDlg::lvUSBFilters_setCurrentText (const QString &aText) 2631 2646 { 2632 Q ListViewItem *item = lvUSBFilters->currentItem();2647 Q3ListViewItem *item = lvUSBFilters->currentItem(); 2633 2648 Assert (item); 2634 2649 … … 2642 2657 QString usbFilterName = tr ("New Filter %1", "usb"); 2643 2658 QRegExp regExp (QString ("^") + usbFilterName.arg ("([0-9]+)") + QString ("$")); 2644 Q ListViewItemIterator iterator (lvUSBFilters);2659 Q3ListViewItemIterator iterator (lvUSBFilters); 2645 2660 while (*iterator) 2646 2661 { … … 2702 2717 void VBoxVMSettingsDlg::tbRemoveUSBFilter_clicked() 2703 2718 { 2704 Q ListViewItem *item = lvUSBFilters->currentItem();2719 Q3ListViewItem *item = lvUSBFilters->currentItem(); 2705 2720 Assert (item); 2706 2721 … … 2719 2734 void VBoxVMSettingsDlg::tbUSBFilterUp_clicked() 2720 2735 { 2721 Q ListViewItem *item = lvUSBFilters->currentItem();2736 Q3ListViewItem *item = lvUSBFilters->currentItem(); 2722 2737 Assert (item); 2723 2738 2724 Q ListViewItem *itemAbove = item->itemAbove();2739 Q3ListViewItem *itemAbove = item->itemAbove(); 2725 2740 Assert (itemAbove); 2726 2741 itemAbove = itemAbove->itemAbove(); … … 2740 2755 void VBoxVMSettingsDlg::tbUSBFilterDown_clicked() 2741 2756 { 2742 Q ListViewItem *item = lvUSBFilters->currentItem();2757 Q3ListViewItem *item = lvUSBFilters->currentItem(); 2743 2758 Assert (item); 2744 2759 2745 Q ListViewItem *itemBelow = item->itemBelow();2760 Q3ListViewItem *itemBelow = item->itemBelow(); 2746 2761 Assert (itemBelow); 2747 2762
Note:
See TracChangeset
for help on using the changeset viewer.