Exemplo n.º 1
0
SearchWindow::SearchWindow()
    : QWidget(0), d(new Private)
{
    QVBoxLayout* layout = new QVBoxLayout;

    d->scrollArea       = new QScrollArea(this);
    d->scrollArea->setWidgetResizable(true);
    d->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);

    d->searchView       = new SearchView;
    d->searchView->setup();

    d->bottomBar        = new SearchViewBottomBar(d->searchView);
    d->searchView->setBottomBar(d->bottomBar);

    d->scrollArea->setWidget(d->searchView);
    d->scrollArea->setFrameStyle(QFrame::NoFrame);

    layout->addWidget(d->scrollArea);
    layout->addWidget(d->bottomBar);
    layout->setMargin(0);
    layout->setSpacing(0);
    setLayout(layout);

    setVisible(false);
    setWindowTitle(i18n("Advanced Search"));
    resize(800, 600);

    connect(d->searchView, SIGNAL(searchOk()),
            this, SLOT(searchOk()));

    connect(d->searchView, SIGNAL(searchCancel()),
            this, SLOT(searchCancel()));

    connect(d->searchView, SIGNAL(searchTryout()),
            this, SLOT(searchTryout()));
}
Exemplo n.º 2
0
Arquivo: Case4.c Projeto: baducki/me
void adjustMemberInfo(Member_t *id)
{
	int choice = 0;	                    // 검색옵션 선택 변수
	int studentid, i;                   // 검색에서 입력한 studentid를 받는 변수, 검색에서 받는 배열의 순서 변수 i
	char name[NAME_MAXCHAR];            // 검색에서 입력한 name을 받는 변수
	char cellphone[CELLPHONE_MAXCHAR] ; // 검색에서 입력한 cellphone을 받는 변수
	while (choice != -1){
		case4SearchOptionUI();
		gotoxy(20, 12); choice = getche();
		if (choice < 49 || choice > 52)
			errorSearchChoice();
		else {
			switch (choice)
			{
			case '1':
				textColor(16 * 10);	gotoxy(7, 5);  printf("1. 학번    "); textColor(7);
				studentid = searchStudentID();
				if (studentid != -1){
					i = searchInfoIDnum(id, studentid);
					choice = adjustInfo(id, i);
				}
				break;
			case '2':
				textColor(16 * 10);	gotoxy(7, 6);  printf("2. 이름    "); textColor(7);
				studentid = searchName(name);
				if (studentid != -1){
					i = searchInfoName(id, name);
					choice = adjustInfo(id, i);
				}
				break;
			case '3':
				textColor(16 * 10);	gotoxy(7, 7);  printf("3. 전화번호"); textColor(7);
				studentid = searchCellphone(cellphone);
				if (studentid == -2) studentid = -1;
				if (studentid != -1){
					i = searchInfoCellphone(id, cellphone);
					choice = adjustInfo(id, i);
				}
				break;
			case '4':
				textColor(16 * 10);	gotoxy(7, 8);  printf("4. 취소    "); textColor(7);
				searchCancel();
				choice = -1;
				break;
			}
		}
	}
}
Exemplo n.º 3
0
Frame::Frame(QWidget *parent) : QFrame(parent) {
    this->resize(Config::FrameWidth, Config::FrameHeight);
    this->setMinimumSize(Config::FrameWidth, Config::FrameHeight);
    this->setMaximumSize(Config::FrameWidth, Config::FrameHeight);
    this->setWindowFlags(Qt::FramelessWindowHint);
    this->setStyleSheet(Config::FrameStyleSheet);

    _titlebar = new TitleBar(this);
    _toolbar = new ToolBar(this);
    _panel = new PanelWin(this);
    _statebar = new StateBar(this);

    _layout = new QVBoxLayout(this);
    _layout->setSpacing(0);
    _layout->setMargin(0);
    _layout->addWidget(_titlebar);
    _layout->addWidget(_toolbar);
    _layout->addWidget(_panel);
    _layout->addWidget(_statebar);


    connect(_titlebar->_btnMin, SIGNAL(clicked()), this, SLOT(minwin()));
    connect(_titlebar->_btnClose, SIGNAL(clicked()), this, SLOT(closewin()));

    connect(_toolbar->_btnKey, SIGNAL(clicked()), _panel, SLOT(selectKey()));
    connect(_toolbar->_btnCust, SIGNAL(clicked()), _panel, SLOT(selectCust()));


    connect(_panel->_btnExtractStart, SIGNAL(clicked()), this, SLOT(extractStart()));
    connect(_panel->_btnExtractCancel, SIGNAL(clicked()), this, SLOT(extractCancel()));


    connect(_panel->_btnSearchBrowse, SIGNAL(clicked()), this, SLOT(openFolder()));
    connect(_panel->_btnSearchStart, SIGNAL(clicked()), this, SLOT(searchStart()));
    connect(_panel->_btnSearchCancel, SIGNAL(clicked()), this, SLOT(searchCancel()));
    connect(_panel->_btnClearLogs, SIGNAL(clicked()), this, SLOT(clearLogs()));

    connect(_panel->_btnBackupBrowse, SIGNAL(clicked()), this, SLOT(openFolder()));
    connect(_panel->_btnBackupStart, SIGNAL(clicked()), this, SLOT(backupStart()));
    connect(_panel->_btnBackupCancel, SIGNAL(clicked()), this, SLOT(backupCancel()));


    _panel->_btnSearchCancel->setEnabled(false);
    _panel->_btnBackupCancel->setEnabled(false);
    _panel->_btnClearLogs->setEnabled(false);

  }
Exemplo n.º 4
0
void SearchWindow::keyPressEvent(QKeyEvent* e)
{
    // Implement keys like in a dialog
    if (!e->modifiers() || ((e->modifiers() & Qt::KeypadModifier) && e->key() == Qt::Key_Enter))
    {
        switch (e->key())
        {
            case Qt::Key_Enter:
            case Qt::Key_Return:
            case Qt::Key_Select:
                searchOk();
                break;
            case Qt::Key_F4:
            case Qt::Key_Escape:
            case Qt::Key_Back:
                searchCancel();
                break;
            default:
                break;
        }
    }
}
Exemplo n.º 5
0
void PeopleApplication::createDetailPage(const QModelIndex &index)
{
    if (m_detailPage)
        return;

    if (!index.isValid())
        return;

    searchCancel();

    m_currentIndex = index;

    m_currentPerson = new SeasidePerson(index);
    m_currentPerson->setViewType("personDetail");

    connect(m_currentPerson, SIGNAL(callNumber(const QString&)),
            this, SLOT(callNumber(const QString&)));
    connect(m_currentPerson, SIGNAL(composeIM(const QString&)),
            this, SLOT(composeIM(const QString&)));
    connect(m_currentPerson, SIGNAL(composeSMS(const QString&)),
            this, SLOT(composeSMS(const QString&)));
    connect(m_currentPerson, SIGNAL(composeEmail(const QString&)),
            this, SLOT(composeEmail(const QString&)));
    connect(m_currentPerson, SIGNAL(viewRequest(qreal,qreal)),
            this, SLOT(scrollIntoView(qreal,qreal)));

    m_detailPage = new MApplicationPage;
    m_detailPage->setTitle(QObject::tr("Contact Detail","Title for detail view"));
    m_detailPage->setCentralWidget(m_currentPerson);

    MAction *action = new MAction(QObject::tr("<b>Edit</b>","Edit toolbar button to edit contact details"), this);
    action->setLocation(MAction::ApplicationMenuLocation);
    m_detailPage->addAction(action);
    connect(action, SIGNAL(triggered()), this, SLOT(editCurrent()));

    connect(m_detailPage, SIGNAL(backButtonClicked()), this, SLOT(detailBack()));

    m_detailPage->appear(MApplicationPage::DestroyWhenDismissed);
}
Exemplo n.º 6
0
void PeopleApplication::createCommPage(SeasidePersonModel *pm, CommCat type)
{
    if (m_commPage)
        return;

    searchCancel();

    m_commPage = new PersonCommsPage(pm, type);

    connect(m_commPage, SIGNAL(backButtonClicked()),
            this, SLOT(commBack()));

    switch (type) {
    case CatCall:
        connect(m_commPage, SIGNAL(destSelected(QString)),
                this, SLOT(callNumber(QString)));
        break;

    case CatSMS:
        connect(m_commPage, SIGNAL(destSelected(QString)),
                this, SLOT(composeSMS(QString)));
        break;

    case CatIM:
      connect(m_commPage, SIGNAL(destSelectedIM(QString)),
              this, SLOT(composeIM(QString)));
      break;

    case CatEmail:
        connect(m_commPage, SIGNAL(destSelected(QString)),
                this, SLOT(composeEmail(QString)));
        break;
    }
    connect(m_commPage, SIGNAL(destSelected(QString)),
            this, SLOT(commBack()));

    m_commPage->appear(MApplicationPage::DestroyWhenDismissed);
}
Exemplo n.º 7
0
void PeopleApplication::searchCommit()
{
    searchChanged();
    searchCancel();
}