• 大小: 21.72MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-18
  • 语言: C/C++
  • 标签: QT  

资源简介

C++ GUI Qt4 编程 (第二版)(pdf+源码)

资源截图

代码片段和文件信息

import com.trolltech.qt.core.*;
import com.trolltech.qt.gui.*;

public class FindDialog extends QDialog {
    public Signal2 findNext =
            new Signal2();

    public Signal2 findPrevious =
            new Signal2();

    public FindDialog(QWidget parent) {
        super(parent);

        label = new QLabel(tr(“Find &what:“));
        lineEdit = new QLineEdit();
        label.setBuddy(lineEdit);

        caseCheckBox = new QCheckBox(tr(“Match &case“));
        backwardCheckBox = new QCheckBox(tr(“Search &backward“));

        findButton = new QPushButton(tr(“&Find“));
        findButton.setDefault(true);
        findButton.setEnabled(false);

        closeButton = new QPushButton(tr(“Close“));

        lineEdit.textChanged.connect(this “enableFindButton(String)“);
        findButton.clicked.connect(this “findClicked()“);
        closeButton.clicked.connect(this “reject()“);

        QHBoxLayout topLeftLayout = new QHBoxLayout();
        topLeftLayout.addWidget(label);
        topLeftLayout.addWidget(lineEdit);

        QVBoxLayout leftLayout = new QVBoxLayout();
        leftLayout.addLayout(topLeftLayout);
        leftLayout.addWidget(caseCheckBox);
        leftLayout.addWidget(backwardCheckBox);

        QVBoxLayout rightLayout = new QVBoxLayout();
        rightLayout.addWidget(findButton);
        rightLayout.addWidget(closeButton);
        rightLayout.addStretch();

        QHBoxLayout mainLayout = new QHBoxLayout();
        mainLayout.addLayout(leftLayout);
        mainLayout.addLayout(rightLayout);
        setLayout(mainLayout);

        setWindowtitle(tr(“Jambi Find“));
        setFixedHeight(sizeHint().height());
    }

    private void findClicked() {
        String text = lineEdit.text();
        Qt.CaseSensitivity cs = caseCheckBox.isChecked()
                ? Qt.CaseSensitivity.CaseSensitive
                : Qt.CaseSensitivity.CaseInsensitive;
        if (backwardCheckBox.isChecked()) {
            findPrevious.emit(text cs);
        } else {
            findNext.emit(text cs);
        }
    }

    private void enableFindButton(String text) {
        findButton.setEnabled(text.length() == 0);
    }

    private QLabel label;
    private QLineEdit lineEdit;
    private QCheckBox caseCheckBox;
    private QCheckBox backwardCheckBox;
    private QPushButton findButton;
    private QPushButton closeButton;

    public static void main(String[] args) {
        QApplication.initialize(args);
        FindDialog dialog = new FindDialog(null);
        dialog.show();
        QApplication.exec();
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件   22155313  2013-05-03 22:37  C++ GUI Qt4 编程 (第二版)(pdf+源码)\C++ GUI Qt4 编程 (第二版).pdf

     文件       2677  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambifind\FindDialog.java

     文件        910  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambigotocell\GoToCellDialog.java

     文件       2306  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambigotocell\GoToCellDialog.jui

     文件         50  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter1\jambiplotter.h

     文件       1121  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter1\JambiPlotter.java

     文件        515  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter1\jambiplotter.pro

     文件        400  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter1\jambiplotter.xml

     文件         50  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter2\jambiplotter.h

     文件       1101  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter2\JambiPlotter.java

     文件        500  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter2\jambiplotter.pro

     文件        898  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\jambiplotter2\jambiplotter.xml

     文件        936  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\plotter\images\zoomin.png

     文件        955  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\plotter\images\zoomout.png

     文件     759528  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\plotter\in1.txt

     文件       9747  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\plotter\plotter.cpp

     文件       1634  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\plotter\plotter.h

     文件        129  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\plotter\plotter.pro

     文件        134  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\appendixC\plotter\plotter.qrc

     文件        818  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap01\age\age.cpp

     文件         44  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap01\age\age.pro

     文件        201  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap01\hello\hello.cpp

     文件         46  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap01\hello\hello.pro

     文件        303  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap01\quit\quit.cpp

     文件         45  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap01\quit\quit.pro

     文件        107  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap02\find\find.pro

     文件       1926  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap02\find\finddialog.cpp

     文件        640  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap02\find\finddialog.h

     文件        205  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap02\find\main.cpp

     文件         79  2008-01-09 08:43  C++ GUI Qt4 编程 (第二版)(pdf+源码)\qt-book\chap02\gotocell1\gotocell1.pro

............此处省略618个文件信息

评论

共有 条评论