AskText::AskText( QWidget *parent, const char *name, const char *caption,const char *prompt) : QDialog( parent, name ,TRUE) { setCaption(caption); Q3BoxLayout *all = new Q3VBoxLayout(this,20); QLabel *label = new QLabel(prompt,this); all->addWidget(label); text = new QLineEdit(this); text->setMinimumWidth(120); connect( text, SIGNAL(returnPressed()), SLOT(accept()) ); all->addWidget(text); Q3BoxLayout *bottom = new Q3HBoxLayout(all,40); QPushButton *ok = new QPushButton(this); ok->setText("OK"); connect( ok, SIGNAL(clicked()), SLOT(accept()) ); bottom->addWidget(ok); QPushButton *cancel = new QPushButton(this); cancel->setText("Cancel"); connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); bottom->addWidget(cancel); }
//************************************************ ReplaceWord::ReplaceWord(string word,int OldGroupNum, int NewGroupNum, QWidget *parent, QString name ) : QDialog( parent, name, TRUE ,Qt::WDestructiveClose) { setCaption("Replace word"); Q3BoxLayout *all = new Q3VBoxLayout(this,10); sprintf(tmp,"The word %s already exists in group %d of the currently open file.",word.c_str(),OldGroupNum); QLabel *l1 = new QLabel(tmp,this); all->add(l1); sprintf(tmp,"Do you wish to replace it with the occurance in the merge file (group %d )?",NewGroupNum); QLabel *l2 = new QLabel(tmp,this); all->add(l2); Q3BoxLayout *b = new Q3HBoxLayout(all,10); QPushButton *yes = new QPushButton( "Yes", this ); connect( yes, SIGNAL(clicked()), SLOT(yes() )); b->addWidget(yes); QPushButton *yes_to_all = new QPushButton( "Yes to all", this ); connect( yes_to_all, SIGNAL(clicked()), SLOT(yes_to_all() )); b->addWidget(yes_to_all); QPushButton *no = new QPushButton( "No", this ); connect( no, SIGNAL(clicked()), SLOT(no() )); b->addWidget(no); QPushButton *no_to_all = new QPushButton( "No to all", this ); connect( no_to_all, SIGNAL(clicked()), SLOT(no_to_all() )); b->addWidget(no_to_all); adjustSize(); }
RateCenterManager::RateCenterManager ( QWidget* parent, const char* name ) : TAAWidget(parent) { setCaption( "Rate Center Manager" ); rcList = new Q3ListView(this, "Rate Center Manager"); rcList->setAllColumnsShowFocus(true); rcList->setRootIsDecorated(true); rcList->addColumn("Country/State/City"); rcList->addColumn("Active"); rcList->addColumn("Avail"); rcList->addColumn("Total"); connect(rcList, SIGNAL(doubleClicked(Q3ListViewItem *)), this, SLOT(itemDoubleClicked(Q3ListViewItem *))); activeColumn = 1; availColumn = 2; totalColumn = 3; idColumn = 4; rcList->setColumnAlignment(activeColumn, Qt::AlignRight); rcList->setColumnAlignment(availColumn, Qt::AlignRight); rcList->setColumnAlignment(totalColumn, Qt::AlignRight); addButton = new QPushButton(this, "Add Button"); addButton->setText("&Add"); connect(addButton, SIGNAL(clicked()), this, SLOT(addClicked())); editButton = new QPushButton(this, "Edit Button"); editButton->setText("&Edit"); connect(editButton, SIGNAL(clicked()), this, SLOT(editClicked())); deleteButton = new QPushButton(this, "Delete Button"); deleteButton->setText("&Delete"); connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked())); deleteButton->setEnabled(false); closeButton = new QPushButton(this, "Close Button"); closeButton->setText("&Close"); connect(closeButton, SIGNAL(clicked()), this, SLOT(closeClicked())); Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); ml->addWidget(rcList, 1); Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 1); bl->addStretch(1); bl->addWidget(addButton, 0); bl->addWidget(editButton, 0); bl->addWidget(deleteButton, 0); bl->addWidget(closeButton, 0); ml->addLayout(bl, 0); refreshRateCenters(); }
//******************************************************** WordsFind::WordsFind( QWidget *parent, const char *name , WordsEdit *w) : QWidget( parent, name ) { wordsedit = w; wordlist=w->wordlist; setCaption("Find"); Q3BoxLayout *all = new Q3VBoxLayout(this,10); Q3BoxLayout *txt = new Q3HBoxLayout(all,4); QLabel *label = new QLabel("Find what:",this); txt->addWidget(label); find_field = new QLineEdit(this); find_field->setMinimumWidth(200); connect( find_field, SIGNAL(returnPressed()), SLOT(find_first_cb()) ); txt->addWidget(find_field); Q3BoxLayout *left1 = new Q3HBoxLayout(all,10); Q3ButtonGroup *direction = new Q3ButtonGroup(2,Qt::Vertical,"Dir",this); up = new QRadioButton("Up",direction); up->setChecked(false); down = new QRadioButton("Down",direction); down->setChecked(true); left1->addWidget(direction); Q3ButtonGroup *from = new Q3ButtonGroup(2,Qt::Vertical,"From",this); start = new QRadioButton("Start",from); start->setChecked(true); current = new QRadioButton("Current",from); current->setChecked(false); left1->addWidget(from); Q3ButtonGroup *type = new Q3ButtonGroup(2,Qt::Vertical,"Match",this); exact = new QRadioButton("Exact",type); exact->setChecked(false); substring = new QRadioButton("Substr",type); substring->setChecked(true); left1->addWidget(type); Q3BoxLayout *right = new Q3VBoxLayout(left1,5); find_first = new QPushButton("Find",this); right->addWidget(find_first); connect( find_first, SIGNAL(clicked()), SLOT(find_first_cb()) ); find_next = new QPushButton("Find next",this); connect( find_next, SIGNAL(clicked()), SLOT(find_next_cb()) ); right->addWidget(find_next); cancel = new QPushButton("Cancel",this); connect( cancel, SIGNAL(clicked()), SLOT(cancel_cb()) ); right->addWidget(cancel); adjustSize(); FindLastWord=-1; FindLastGroup=-1; }
HCircleView::HCircleView( int viewID_, QWidget *parent ) : ViewWidget( viewID_, parent) { setCaption("Harmonic Circle"); Q3BoxLayout *mainLayout = new Q3HBoxLayout(this); Q3BoxLayout *leftLayout = new Q3VBoxLayout(mainLayout); Q3BoxLayout *rightLayout = new Q3VBoxLayout(mainLayout); Q3Grid *waveFrame = new Q3Grid(1, this); waveFrame->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken); leftLayout->addWidget(waveFrame); hCircleWidget = new HCircleWidget(waveFrame); Q3BoxLayout *bottomLayout = new Q3HBoxLayout(leftLayout); QwtWheel* ZoomWheel = new QwtWheel(this); ZoomWheel->setOrientation(Qt::Vertical); ZoomWheel->setWheelWidth(14); ZoomWheel->setRange(0.001, 0.1, 0.001, 1); ZoomWheel->setValue(0.007); hCircleWidget->setZoom(0.007); QToolTip::add(ZoomWheel, "Zoom in or out"); rightLayout->addWidget(ZoomWheel); QwtWheel* lowestValueWheel = new QwtWheel(this); lowestValueWheel->setOrientation(Qt::Vertical); lowestValueWheel->setWheelWidth(14); lowestValueWheel->setRange(-160, 10, 0.01, 1); lowestValueWheel->setValue(-100); hCircleWidget->setLowestValue(-100); QToolTip::add(lowestValueWheel, "Change the lowest value"); rightLayout->addWidget(lowestValueWheel); rightLayout->addStretch(2); QwtWheel* thresholdWheel = new QwtWheel(this); thresholdWheel->setOrientation(Qt::Horizontal); thresholdWheel->setWheelWidth(14); thresholdWheel->setRange(-160, 10, 0.01, 1); thresholdWheel->setValue(-100); hCircleWidget->setThreshold(-100); QToolTip::add(thresholdWheel, "Change the harmonic threshold"); bottomLayout->addWidget(thresholdWheel); bottomLayout->addStretch(2); connect(ZoomWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setZoom(double))); connect(ZoomWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update())); connect(lowestValueWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setLowestValue(double))); connect(lowestValueWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update())); connect(thresholdWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setThreshold(double))); connect(thresholdWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update())); }
TE_Main::TE_Main(QWidget* parent, const char* name) : TAAWidget(parent) { setCaption( "Targeted Email" ); // Create our widgets. theTabBar = new QTabBar(this); // Create the tabs for the tab bar. theTabBar->addTab("Message"); theTabBar->addTab("Login Types"); theTabBar->addTab("Cities"); qws = new Q3WidgetStack(this, "widgetStack"); // Create the actual tabs now, using the widget stack as the parent. tmessage = new TE_Message(qws); qws->addWidget(tmessage, 0); tlogins = new TE_LoginTypes(qws); qws->addWidget(tlogins, 1); tcities = new TE_Cities(qws); qws->addWidget(tcities, 2); // Buttons now. QPushButton *sendButton = new QPushButton(this, "sendButton"); sendButton->setText("&Send"); connect(sendButton, SIGNAL(clicked()), this, SLOT(sendMessage())); QPushButton *cancelButton = new QPushButton(this, "cancelButton"); cancelButton->setText("&Cancel"); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked())); // Create our layout. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3); ml->addWidget(theTabBar, 0); ml->addWidget(qws, 1); Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3); bl->addStretch(1); bl->addWidget(sendButton, 0); bl->addWidget(cancelButton, 0); ml->addLayout(bl, 0); connect(theTabBar, SIGNAL(selected(int)), qws, SLOT(raiseWidget(int))); // Create our Ctrl-1 through Ctrl-3 hotkeys Q3Accel *ac = new Q3Accel(this); ac->insertItem(Qt::CTRL+Qt::Key_1, 0); ac->insertItem(Qt::CTRL+Qt::Key_2, 1); ac->insertItem(Qt::CTRL+Qt::Key_3, 2); connect(ac, SIGNAL(activated(int)), this, SLOT(raiseTab(int))); }
BillingCycles::BillingCycles ( QWidget* parent, const char* name ) : TAAWidget(parent) { // Create our widgets. list = new Q3ListView(this, "Cycle List"); list->addColumn("Cycle ID"); list->addColumn("Type"); list->addColumn("Description"); list->setAllColumnsShowFocus(true); // Create our buttons. QPushButton *newButton = new QPushButton(this, "New"); newButton->setText("&New"); connect(newButton, SIGNAL(clicked()), this, SLOT(newCycle())); QPushButton *editButton = new QPushButton(this, "Edit"); editButton->setText("&Edit"); connect(editButton, SIGNAL(clicked()), this, SLOT(editCycle())); QPushButton *deleteButton = new QPushButton(this, "Delete"); deleteButton->setText("&Delete"); connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteCycle())); QPushButton *closeButton = new QPushButton(this, "Close"); closeButton->setText("&Close"); connect(closeButton, SIGNAL(clicked()), this, SLOT(closeClicked())); // Our layout. Very simple. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); ml->addWidget(list, 1); // Buttons. Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 1); bl->addStretch(1); bl->addWidget(newButton, 0); bl->addWidget(editButton, 0); bl->addWidget(deleteButton, 0); bl->addWidget(closeButton, 0); ml->addLayout(bl, 0); // Create our layout. setCaption( "Billing Cycles" ); }
void QtCameraSettingsWidget::create(void) { //our camera mode buttons Q3ButtonGroup* camera_modegrp = new Q3ButtonGroup( 2, Qt::Horizontal, "Camera Mode:", this ); camera_modegrp->setExclusive(true); connect(camera_modegrp, SIGNAL( clicked (int) ), this, SLOT( camerasettings_mode_slot(int) ) ); camera_ortho_pb = new QPushButton("Orthogonal\nCamera", camera_modegrp); camera_ortho_pb->setToggleButton(TRUE); camera_ortho_pb->setOn(TRUE); camera_ortho_pb->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum, false)); //connect( camera_ortho_pb, SIGNAL( clicked () ), this, SLOT( stereo_onoff_event() ) ); camera_persp_pb = new QPushButton("Perspective\nCamera", camera_modegrp); camera_persp_pb->setToggleButton(TRUE); camera_persp_pb->setOn(FALSE); camera_persp_pb->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum, false)); ///connect( camera_persp_pb, SIGNAL( clicked () ), this, SLOT( stereo_onoff_event() ) ); perpectivesettings_grp = new Q3ButtonGroup( 2, Qt::Vertical, "Perspective Camera:", this ); perpectivesettings_grp->setDisabled(true); Q3ButtonGroup* cameraFOV_grp = new Q3ButtonGroup( 1, Qt::Horizontal, "", perpectivesettings_grp ); camerafov_lb = new QLabel( "Field of View: 45", cameraFOV_grp ); camerafov = 45; camerafov_slider = new QSlider ( 1, 180, 5, 45, Qt::Horizontal, cameraFOV_grp, "numbsliceslod_slider" ); camerafov_slider->setTickmarks( QSlider::Below ); camerafov_slider->setTracking(FALSE); camerafov_slider->setTickInterval(32); connect(camerafov_slider, SIGNAL(valueChanged(int)), this, SLOT(camerasettings_fov_slot(int)) ); camerasettings_fov_slot(camerafov); Q3ButtonGroup* camerastep_grp = new Q3ButtonGroup( 1, Qt::Horizontal, "", perpectivesettings_grp ); camerastep_lb = new QLabel( "Camera Step Size: 5", camerastep_grp ); camerastep = 5; camerastep_slider = new QSlider ( 1, 100, 5, 5, Qt::Horizontal, camerastep_grp, "numbsliceslod_slider" ); camerastep_slider->setTickmarks( QSlider::Below ); camerastep_slider->setTracking(FALSE); camerastep_slider->setTickInterval(10); connect(camerastep_slider, SIGNAL(valueChanged(int)), this, SLOT(camerasettings_step_slot(int)) ); camerasettings_step_slot(camerastep); Q3BoxLayout *vboxlayoutRIGHT = new Q3BoxLayout ( 0, Q3BoxLayout::TopToBottom, 0, 5, "vboxlayout"); vboxlayoutRIGHT->addWidget(camera_modegrp, 0, Qt::AlignTop); vboxlayoutRIGHT->addWidget(perpectivesettings_grp, 0, Qt::AlignTop); Q3BoxLayout *topmost= new Q3BoxLayout ( this, Q3BoxLayout::LeftToRight, 10, 5, "topmost"); topmost->addLayout(vboxlayoutRIGHT, 10); }
SelectionList::SelectionList ( QWidget* parent, const char* name ) : QDialog ( parent, name ) { setCaption( "Select an Item" ); titleLabel = new QLabel(this, "Title Label"); titleLabel->setText("Please select an option."); titleLabel->setAlignment(Qt::AlignTop|Qt::AlignHCenter); list = new Q3ListView(this, "Selection List"); list->setAllColumnsShowFocus(true); extraLabel = new QLabel(this, "Extra Label"); extraLabel->setText(""); extraLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); extraList = new QComboBox(false, this, "Extra List"); acceptButton = new QPushButton(this, "Accept Button"); acceptButton->setText("&Accept"); connect(acceptButton, SIGNAL(clicked()), SLOT(accept())); cancelButton = new QPushButton(this, "Cancel Button"); cancelButton->setText("&Cancel"); connect(cancelButton, SIGNAL(clicked()), SLOT(reject())); // Create the layout for this box. _Very_ simple. Top down box // with a button box at the bottom. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); ml->addWidget(titleLabel, 0); ml->addWidget(list, 1); Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3); bl->addWidget(extraLabel, 0); bl->addWidget(extraList, 1); bl->addSpacing(10); bl->addWidget(acceptButton, 0); bl->addWidget(cancelButton, 0); ml->addLayout(bl, 0); extraLabel->hide(); extraList->hide(); }
//*********************************************** void Options::set_logedit() { QWidget *logedit = new QWidget(this); Q3BoxLayout *all = new Q3VBoxLayout(logedit,10); messages = new QCheckBox("Show all messages at end (not just unused ones)",logedit); all->addWidget(messages); elses = new QCheckBox("Show all elses as gotos",logedit); all->addWidget(elses); special = new QCheckBox("Show special syntax (e.g. v30=4)",logedit); all->addWidget(special); addTab(logedit,"Logic editor"); }
UserPrivs::UserPrivs ( QWidget* parent, const char* name ) : TAAWidget(parent) { setCaption("User Administration"); // Create our widgets userList = new Q3ListView(this); userList->addColumn("User Name"); userList->addColumn("Access"); userList->setGeometry(5,5,150,250); userList->setMinimumSize(150,0); userList->setMaximumSize(150,32767); userList->setAllColumnsShowFocus(true); connect(userList, SIGNAL(currentChanged(Q3ListViewItem *)), this, SLOT(userSelected(Q3ListViewItem *))); connect(userList, SIGNAL(doubleClicked(Q3ListViewItem *)), this, SLOT(userSelected(Q3ListViewItem *))); editArea = new UserEditor(this); // Create our layout. Q3BoxLayout *mainLayout = new Q3BoxLayout(this, Q3BoxLayout::LeftToRight, 2, 2); mainLayout->addWidget(userList, 0); mainLayout->addWidget(editArea, 1); //setGeometry(5,5,575,300); myCurrentID = 0; refreshList(); connect(editArea, SIGNAL(userUpdated(long)), this, SLOT(userUpdated(long))); }
ModuleDialog::ModuleDialog(PinEditDoc * doc, QWidget * parent, const char * name, Qt::WFlags f) : QDialog(parent, name, f) { EM_CERR("ModuleDialog::ModuleDialog"); assert(doc != NULL); p_Doc = doc; p_FakeModuleBehavior = NULL; p_EditModule = new QLineEdit(this); QPushButton * choosebutton = new QPushButton("choose", this); connect(choosebutton, SIGNAL(clicked()), this, SLOT(slotChooseModule())); QPushButton * donebutton = new QPushButton("done", this); connect(donebutton, SIGNAL(clicked()), this, SLOT(slotDone())); Q3BoxLayout * hlayout = new Q3HBoxLayout(this); hlayout->addWidget(p_EditModule); hlayout->addWidget(choosebutton); hlayout->addWidget(donebutton); }
void QtDatasetViewWidget::openmovieplayer_event(void) { QDialog* movie_dialogue = new QDialog(this, "Movie Player", 0); movie_dialogue->setModal(false); movieplayer = new QtMoviePlayer(0, &dsview.datathumbnails); Q3BoxLayout * boxlayout = new Q3BoxLayout ( movie_dialogue, Q3BoxLayout::TopToBottom, 0, 5, "rigth_blayout"); boxlayout->addWidget( movieplayer, 10); movie_dialogue->resize(512,512); movie_dialogue->show(); }
//*********************************************** void Options::set_general() { QWidget *general = new QWidget(this); Q3BoxLayout *all = new Q3VBoxLayout(general,10); Q3GroupBox *b1 = new Q3GroupBox(2,Horizontal,"",general); QLabel *l = new QLabel("Default resource type",b1); l->setText("Default resource type"); //to avoid compilation warning type = new QComboBox(false,b1,"type"); type->insertItem( "LOGIC" ); type->insertItem( "PICTURE" ); type->insertItem( "VIEW" ); type->insertItem( "SOUND" ); QLabel *l2 = new QLabel("Picedit style",b1); l2->setText("Picedit style"); //to avoid compilation warning picstyle = new QComboBox(false,b1,"picstyle"); picstyle->insertItem( "One window" ); picstyle->insertItem( "Two windows" ); all->addWidget(b1); Q3ButtonGroup *extract = new Q3ButtonGroup(2,Horizontal,"Extract logic as",general); extract->setMaximumSize(200,100); extract->setExclusive(true); text = new QRadioButton("Text",extract); binary = new QRadioButton("Binary",extract); all->addWidget(extract); addTab(general,"General"); }
TE_Cities::TE_Cities(QWidget* parent, const char* name) : TAAWidget(parent) { allCitiesButton = new QCheckBox("Send to customers in all cities", this, "allCitiesButton"); connect(allCitiesButton, SIGNAL(clicked()), this, SLOT(allCitiesClicked())); cityList = new Q3ListView(this, "cityList"); cityList->addColumn("City"); cityList->addColumn("State"); cityList->setAllColumnsShowFocus(TRUE); cityList->setMultiSelection(TRUE); // Basic layout, box top to bottom. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); ml->addWidget(allCitiesButton, 0); ml->addWidget(cityList, 1); loadCities(); allCitiesButton->setChecked(TRUE); allCitiesClicked(); }
KexiCSVDelimiterWidget::KexiCSVDelimiterWidget(bool lineEditOnBottom, QWidget * parent) : QWidget(parent) , d(new Private()) { Q3BoxLayout *lyr = lineEditOnBottom ? (Q3BoxLayout *)new Q3VBoxLayout(this, 0, KDialog::spacingHint()) : (Q3BoxLayout *)new Q3HBoxLayout(this, 0, KDialog::spacingHint()); d->combo = new KComboBox(this); d->combo->setObjectName("KexiCSVDelimiterComboBox"); d->combo->addItem(i18n("Comma \",\"")); //<-- KEXICSV_DEFAULT_FILE_DELIMITER d->combo->addItem(i18n("Semicolon \";\"")); d->combo->addItem(i18n("Tabulator")); d->combo->addItem(i18n("Space \" \"")); d->combo->addItem(i18n("Other")); lyr->addWidget(d->combo); setFocusProxy(d->combo); d->delimiterEdit = new KLineEdit(this); d->delimiterEdit->setObjectName("d->delimiterEdit"); // d->delimiterEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, d->delimiterEdit->sizePolicy().hasHeightForWidth() ) ); d->delimiterEdit->setMaximumSize(QSize(30, 32767)); d->delimiterEdit->setMaxLength(1); lyr->addWidget(d->delimiterEdit); if (!lineEditOnBottom) lyr->addStretch(2); slotDelimiterChangedInternal(KEXICSV_DEFAULT_FILE_DELIMITER_INDEX); //this will init d->delimiter connect(d->combo, SIGNAL(activated(int)), this, SLOT(slotDelimiterChanged(int))); connect(d->delimiterEdit, SIGNAL(returnPressed()), this, SLOT(slotDelimiterLineEditReturnPressed())); connect(d->delimiterEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotDelimiterLineEditTextChanged(const QString &))); }
BumperDialog::BumperDialog(PinEditDoc * doc, QWidget * parent, const char * name, Qt::WFlags f) : QDialog(parent, name, f) { EM_CERR("BumperDialog::BumperDialog"); assert(doc != NULL); p_Doc = doc; p_BumperBehavior = NULL; QLabel * label = new QLabel("sound", this); p_SpinPower = new QSpinBox(0, 100, 1, this); p_EditSound = new QLineEdit(this); QPushButton * choosebutton = new QPushButton("choose", this); connect(choosebutton, SIGNAL(clicked()), this, SLOT(slotChooseSound())); QPushButton * donebutton = new QPushButton("done", this); connect(donebutton, SIGNAL(clicked()), this, SLOT(slotDone())); Q3BoxLayout * hlayout = new Q3HBoxLayout(this); hlayout->addWidget(p_SpinPower); hlayout->addWidget(label); hlayout->addWidget(p_EditSound); hlayout->addWidget(choosebutton); hlayout->addWidget(donebutton); }
//*********************************************** void Options::set_directories() { QWidget *dirs = new QWidget(this); Q3BoxLayout *all = new Q3VBoxLayout(dirs,10); Q3GroupBox *src = new Q3GroupBox(3,Horizontal,"Logic source directory",dirs); reldir = new QRadioButton("[Game_dir/]",src); connect(reldir,SIGNAL(clicked()),SLOT(set_reldir())); relname = new QLineEdit(src); QLabel *l = new QLabel(" ",src); //dummy label to keep table alignment l->setText(" "); //to avoid compilation warning absdir = new QRadioButton("Full path",src); connect(absdir,SIGNAL(clicked()),SLOT(set_absdir())); absname = new QLineEdit(src); QPushButton *browse = new QPushButton("Browse",src); connect(browse,SIGNAL(clicked()),SLOT(browse_abs())); all->addWidget(src); Q3BoxLayout *b1 = new Q3HBoxLayout(all); QLabel *lt = new QLabel("Template:",dirs); b1->addWidget(lt); templatedir = new QLineEdit(dirs); b1->addWidget(templatedir); QPushButton *browse1 = new QPushButton("Browse",dirs); b1->addWidget(browse1); connect(browse1,SIGNAL(clicked()),SLOT(browse_template())); Q3BoxLayout *b2 = new Q3HBoxLayout(all); QLabel *lh = new QLabel("Help:",dirs); b2->addWidget(lh); helpdir = new QLineEdit(dirs); b2->addWidget(helpdir); QPushButton *browse2 = new QPushButton("Browse",dirs); b2->addWidget(browse2); connect(browse2,SIGNAL(clicked()),SLOT(browse_help())); addTab(dirs,"Directories"); }
//*********************************************** void Options::set_interpreter() { QWidget *interp = new QWidget(this); Q3BoxLayout *all = new Q3VBoxLayout(interp,10); QLabel *l = new QLabel("Interpreter command line:\n(will be invoked with the\ncurrent directory == game_directory)",interp); all->addWidget(l); Q3BoxLayout *b1 = new Q3HBoxLayout(all); command = new QLineEdit(interp); b1->addWidget(command); QPushButton *browse = new QPushButton("Browse",interp); browse->setMaximumSize(80,60); connect(browse,SIGNAL(clicked()),SLOT(browse_interpreter())); b1->addWidget(browse); addTab(interp,"Interpreter"); }
DomainChecklist::DomainChecklist(QWidget* parent, const char* name, long DomainID) : TAAWidget(parent) { setCaption( "Domain Checklist" ); if (!DomainID) return; myDomainID = DomainID; // Setup the widgets. There are a bunch. QLabel *customerIDLabel = new QLabel("Customer ID:", this, "customerIDLabel"); customerIDLabel->setAlignment(AlignRight|AlignVCenter); customerID = new QLabel(this, "customerID"); customerID->setAlignment(AlignLeft|AlignVCenter); QLabel *loginIDLabel = new QLabel("Login ID:", this, "loginIDLabel"); loginIDLabel->setAlignment(AlignRight|AlignVCenter); loginID = new QLabel(this, "loginID"); loginID->setAlignment(AlignLeft|AlignVCenter); QLabel *customerNameLabel = new QLabel("Customer Name:", this, "customerNameLabel"); customerNameLabel->setAlignment(AlignRight|AlignVCenter); customerName = new QLabel(this, "customerName"); customerName->setAlignment(AlignLeft|AlignVCenter); QLabel *domainNameLabel = new QLabel("Domain Name:", this, "domainNameLabel"); domainNameLabel->setAlignment(AlignRight|AlignVCenter); domainName = new QLabel(this, "domainName"); domainName->setAlignment(AlignLeft|AlignVCenter); hostmasterSubmit = new QCheckBox("Request submitted to Hostmaster", this, "hostmasterSubmit"); hostmastDate = new QLabel(this, "hostmastDate"); hostmastDate->setAlignment(AlignRight|AlignVCenter); internicSubmit = new QCheckBox("Request submitted to InterNIC", this, "internicSubmit"); nicReqDate = new QLabel(this, "nicReqDate"); nicReqDate->setAlignment(AlignRight|AlignVCenter); dnsDone = new QCheckBox("DNS records created/updated", this, "dnsDone"); dnsDate = new QLabel(this, "dnsDate"); dnsDate->setAlignment(AlignRight|AlignVCenter); mailDone = new QCheckBox("Mail system updated", this, "mailDone"); mailDate = new QLabel(this, "mailDate"); mailDate->setAlignment(AlignRight|AlignVCenter); vserverDone = new QCheckBox("Virtual server setup completed", this, "vserverDone"); vserverDate = new QLabel(this, "vserverDate"); vserverDate->setAlignment(AlignRight|AlignVCenter); QLabel *serverListLabel = new QLabel("Server:", this, "serverListLabel"); serverListLabel->setAlignment(AlignRight|AlignVCenter); serverList = new QComboBox(true, this, "serverList"); QLabel *processListLabel = new QLabel("Process:", this, "processListLabel"); processListLabel->setAlignment(AlignRight|AlignVCenter); processList = new QComboBox(true, this, "processList"); QLabel *ipAddressLabel = new QLabel("IP Address:", this, "ipAddressLabel"); ipAddressLabel->setAlignment(AlignRight|AlignVCenter); ipAddress = new QLineEdit(this, "ipAddress"); ipAddress->setMaxLength(16); internicDone = new QCheckBox("InterNIC request completed", this, "internicDone"); nicDoneDate = new QLabel(this, "nicDoneDate"); nicDoneDate->setAlignment(AlignRight|AlignVCenter); QLabel *nicAdminIDLabel = new QLabel("NIC Admin ID:", this, "nicAdminIDLabel"); nicAdminIDLabel->setAlignment(AlignRight|AlignVCenter); nicAdminID = new QLineEdit(this, "nicAdminID"); nicAdminID->setMaxLength(16); QLabel *nicBillIDLabel = new QLabel("NIC Billing ID:", this, "nicBillIDLabel"); nicBillIDLabel->setAlignment(AlignRight|AlignVCenter); nicBillID = new QLineEdit(this, "nicBillID"); nicBillID->setMaxLength(16); domainDone = new QCheckBox("Domain released", this, "domainDone"); doneDate = new QLabel(this, "domainDate"); doneDate->setAlignment(AlignRight|AlignVCenter); // Finally, our buttons. QPushButton *updateButton = new QPushButton("&Update", this, "updateButton"); connect(updateButton, SIGNAL(clicked()), this, SLOT(updateClicked())); QPushButton *saveButton = new QPushButton("&Save", this, "saveButton"); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveClicked())); QPushButton *cancelButton = new QPushButton("&Cancel", this, "cancelButton"); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked())); // And now for the layout. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 5); // Our info grid. Q3GridLayout *igrid = new Q3GridLayout(3, 4, 3); int curRow = 0; igrid->addWidget(customerIDLabel, curRow, 0); igrid->addWidget(customerID, curRow, 1); igrid->addWidget(loginIDLabel, curRow, 2); igrid->addWidget(loginID, curRow, 3); igrid->setRowStretch(curRow, 0); curRow++; igrid->addWidget(customerNameLabel, curRow, 0); igrid->addMultiCellWidget(customerName, curRow, curRow, 1, 3); igrid->setRowStretch(curRow, 0); curRow++; igrid->addWidget(domainNameLabel, curRow, 0); igrid->addMultiCellWidget(domainName, curRow, curRow, 1, 3); igrid->setRowStretch(curRow, 0); igrid->setColStretch(0, 0); igrid->setColStretch(1, 1); igrid->setColStretch(2, 0); igrid->setColStretch(3, 0); ml->addLayout(igrid, 0); ml->addWidget(new HorizLine(this), 0); Q3GridLayout *gl = new Q3GridLayout(12, 3, 3); curRow = 0; gl->addMultiCellWidget(hostmasterSubmit, curRow, curRow, 0, 1); gl->addWidget(hostmastDate, curRow, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addMultiCellWidget(internicSubmit, curRow, curRow, 0, 1); gl->addWidget(nicReqDate, curRow, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addMultiCellWidget(dnsDone, curRow, curRow, 0, 1); gl->addWidget(dnsDate, curRow, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addMultiCellWidget(mailDone, curRow, curRow, 0, 1); gl->addWidget(mailDate, curRow, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addMultiCellWidget(vserverDone, curRow, curRow, 0, 1); gl->addWidget(vserverDate, curRow, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addWidget(serverListLabel, curRow, 0); gl->addMultiCellWidget(serverList, curRow, curRow, 1, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addWidget(processListLabel, curRow, 0); gl->addMultiCellWidget(processList, curRow, curRow, 1, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addWidget(ipAddressLabel, curRow, 0); gl->addMultiCellWidget(ipAddress, curRow, curRow, 1, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addMultiCellWidget(internicDone, curRow, curRow, 0, 1); gl->addWidget(nicDoneDate, curRow, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addWidget(nicAdminIDLabel, curRow, 0); gl->addMultiCellWidget(nicAdminID, curRow, curRow, 1, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addWidget(nicBillIDLabel, curRow, 0); gl->addMultiCellWidget(nicBillID, curRow, curRow, 1, 2); gl->setRowStretch(curRow, 0); curRow++; gl->addMultiCellWidget(domainDone, curRow, curRow, 0, 1); gl->addWidget(doneDate, curRow, 2); gl->setRowStretch(curRow, 0); gl->setColStretch(0, 0); gl->setColStretch(1, 1); gl->setColStretch(2, 0); ml->addLayout(gl, 0); ml->addStretch(1); ml->addWidget(new HorizLine(this), 0); Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3); bl->addStretch(1); bl->addWidget(updateButton, 0); bl->addWidget(saveButton, 0); bl->addWidget(cancelButton, 0); ml->addLayout(bl, 0); refreshCheckList(); }
DomainAliases::DomainAliases(QWidget *parent, const char *name) : TAAWidget(parent) { setCaption("Email Alias List"); // Create the widgets we'll need aliasList = new Q3ListView(this, "Alias List"); aliasList->addColumn("Address"); aliasList->addColumn("Domain"); aliasList->addColumn("Mailbox"); aliasList->addColumn("Time Stamp"); aliasList->addColumn("Added By"); aliasList->setAllColumnsShowFocus(true); virtIDCol = 5; address = new QLineEdit(this, "Address Input"); address->setMaxLength(63); QLabel *atLabel = new QLabel(this, "At label"); atLabel->setText("@"); QLabel *mapsToLabel = new QLabel(this, "Maps To label"); mapsToLabel->setText("maps to"); domainList = new QComboBox(this, false); loginList = new QComboBox(this, false); addButton = new QPushButton(this, "Add Button"); addButton->setText("&Add"); connect(addButton, SIGNAL(clicked()), this, SLOT(addAlias())); refreshButton = new QPushButton(this, "Refresh Button"); refreshButton->setText("&Refresh"); connect(refreshButton, SIGNAL(clicked()), this, SLOT(refreshAlias())); autoButton = new QPushButton(this, "Auto Button"); autoButton->setText("A&uto"); connect(autoButton, SIGNAL(clicked()), this, SLOT(autoAlias())); delButton = new QPushButton(this, "Delete Button"); delButton->setText("&Delete"); connect(delButton, SIGNAL(clicked()), this, SLOT(delAlias())); closeButton = new QPushButton(this, "Close Button"); closeButton->setText("&Close"); connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); HorizLine *hline1 = new HorizLine(this); // Our layout now. Very simple top down box. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); ml->addWidget(aliasList, 1); // Add in our "add" line. Q3BoxLayout *addl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3); addl->addWidget(address, 1); addl->addWidget(atLabel, 0); addl->addWidget(domainList, 0); addl->addWidget(mapsToLabel, 0); addl->addWidget(loginList, 0); addl->addWidget(addButton, 0); ml->addLayout(addl, 0); ml->addWidget(hline1, 0); Q3GridLayout *bl = new Q3GridLayout(1, 4); int curCol = 0; bl->addWidget(refreshButton, 0, curCol++); bl->addWidget(autoButton, 0, curCol++); bl->addWidget(delButton, 0, curCol++); bl->addWidget(closeButton, 0, curCol++); for (int i = 0; i < curCol; i++) bl->setColStretch(i, 1); bl->setRowStretch(0, 0); // Now, the "button bar layout" to keep things spaced nicely. Q3BoxLayout *bbl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 0); bbl->addStretch(1); bbl->addLayout(bl, 0); ml->addLayout(bbl); }
LogCall::LogCall ( QWidget* parent, const char* name ) : TAAWidget(parent) { setCaption("Call Logger"); // Create all of our widgets. loginID = new QLineEdit(this, "loginID"); loginID->setMaxLength(16); connect(loginID, SIGNAL(textChanged(const QString &)), this, SLOT(loginIDChanged(const QString &))); loginIDLabel = new QLabel(loginID, "&Login ID", this); loginIDLabel->setAlignment(AlignRight|AlignVCenter); searchButton = new QPushButton(this, "searchButton"); searchButton->setText("&Search"); connect(searchButton, SIGNAL(clicked()), this, SLOT(findLogin())); // Searching doesn't really work very well, so lets hide the button for // now. searchButton->hide(); callType = new QComboBox(false, this, "callType"); callType->insertItem("Support"); callType->insertItem("Sales"); callType->insertItem("New User"); callType->insertItem("Accounting"); connect(callType, SIGNAL(highlighted(int)), this, SLOT(callTypeChanged(int))); typeLabel = new QLabel(callType, "&Type", this); typeLabel->setAlignment(AlignRight|AlignVCenter); reasonList = new Q3ListView(this, "reasonList"); reasonList->addColumn("Call Subject"); reasonList->setMaximumHeight(125); reasonLabel = new QLabel(reasonList, "&Reason", this); reasonLabel->setAlignment(AlignRight|AlignTop); solutionNotes = new Q3MultiLineEdit(this, "solutionNotes"); solutionNotes->setWordWrap(Q3MultiLineEdit::WidgetWidth); solutionLabel = new QLabel(solutionNotes, "S&olution", this); solutionLabel->setAlignment(AlignRight|AlignTop); // Now, our buttons. custWinButton = new QPushButton(this, "custWinButton"); custWinButton->setText("&Customer Window"); connect(custWinButton, SIGNAL(clicked()), this, SLOT(loadCustomer())); clockButton = new QPushButton(this, "clockButton"); clockButton->setText("Sto&p Timer"); connect(clockButton, SIGNAL(clicked()), this, SLOT(toggleTimer())); doneButton = new QPushButton(this, "doneButton"); doneButton->setText("&Done"); connect(doneButton, SIGNAL(clicked()), this, SLOT(hangupCall())); statusLabel = new QLabel(this, "statusLabel"); statusLabel->setFrameStyle(Q3Frame::Sunken|Q3Frame::WinPanel); clockArea = new QLCDNumber(this, "clockArea"); clockArea->setMode(QLCDNumber::DEC); clockArea->setSegmentStyle(QLCDNumber::Flat); clockArea->setNumDigits(7); // Main Layout, top to bottom, with a grid and stuff thrown in. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); Q3GridLayout *gl = new Q3GridLayout(3, 5); gl->setRowStretch(0, 0); gl->setRowStretch(1, 0); gl->setRowStretch(2, 1); gl->setColStretch(0, 0); gl->setColStretch(1, 1); gl->setColStretch(2, 0); gl->setColStretch(3, 0); gl->setColStretch(4, 0); gl->addWidget(loginIDLabel, 0, 0); gl->addWidget(loginID, 0, 1); gl->addWidget(searchButton, 0, 2); gl->addWidget(typeLabel, 0, 3); gl->addWidget(callType, 0, 4); gl->addWidget(reasonLabel, 1, 0); gl->addMultiCellWidget(reasonList, 1, 1, 1, 4); gl->addWidget(solutionLabel, 2, 0); gl->addMultiCellWidget(solutionNotes, 2, 2, 1, 4); ml->addLayout(gl, 1); Q3BoxLayout *abl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 0); abl->addWidget(custWinButton, 1); abl->addWidget(clockButton, 1); abl->addWidget(doneButton, 1); // These options don't really work very well, so lets disable them for // now. ml->addLayout(abl, 0); Q3BoxLayout *sbl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3); sbl->addWidget(statusLabel, 1); sbl->addWidget(clockArea, 0); ml->addLayout(sbl, 0); // Set the starting login ID to empty, and the starting customer ID to 0 strcpy(myLoginID, ""); myCustID = 0; // Start the clock ticking... callStart.setDate(QDate::currentDate()); callStart.setTime(QTime::currentTime()); // Set the status label to the default. statusLabel->setText("No customer selected."); callTypeChanged(0); // And setup the timer to update our clock once every second. updateClock(); callTimer = new QTimer(this); connect(callTimer, SIGNAL(timeout()), this, SLOT(updateClock())); callTimer->start(1000); // Once every second timerRunning = 1; clockArea->display("00:00:00"); // Make some hotkeys... loginIDLabel->setBuddy(loginID); typeLabel->setBuddy(callType); reasonLabel->setBuddy(reasonList); solutionLabel->setBuddy(solutionNotes); // Add wordwrap. myLinkedCall = 0; loginID->setFocus(); }
ChangeBillingCycle::ChangeBillingCycle(QWidget* parent, const char* name, long CustID) : TAAWidget(parent) { setCaption( "Edit Customer Billing Cycle" ); if (!CustID) return; myCustID = CustID; // Create the widgets QLabel *customerLabel = new QLabel("Customer:", this, "customerLabel"); customerLabel->setAlignment(AlignRight|AlignVCenter); customer = new QLabel(this, "customer"); customer->setAlignment(AlignLeft|AlignVCenter); QLabel *cycleListLabel = new QLabel("New Billing Cycle:", this, "cycleListLabel"); cycleListLabel->setAlignment(AlignRight|AlignVCenter); cycleList = new QComboBox(false, this, "cycleList"); QLabel *effectiveDateLabel = new QLabel("Effective Date:", this, "effectiveDateLabel"); effectiveDateLabel->setAlignment(AlignRight|AlignVCenter); effectiveDate = new Q3DateEdit(QDate::currentDate(), this, "effectiveDate"); QPushButton *saveButton = new QPushButton("&Save", this, "saveButton"); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveBillingCycleChange())); QPushButton *cancelButton = new QPushButton("&Save", this, "cancelButton"); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelBillingCycleChange())); // Our layout. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3); Q3GridLayout *gl = new Q3GridLayout(2, 3); int curRow = 0; gl->addWidget(customerLabel, curRow, 0); gl->addWidget(customer, curRow, 1); gl->setRowStretch(curRow, 0); curRow++; gl->addWidget(cycleListLabel, curRow, 0); gl->addWidget(cycleList, curRow, 1); gl->setRowStretch(curRow, 0); curRow++; gl->addWidget(effectiveDateLabel, curRow, 0); gl->addWidget(effectiveDate, curRow, 1); gl->setRowStretch(curRow, 0); gl->setColStretch(0, 0); gl->setColStretch(1, 1); ml->addLayout(gl, 0); ml->addStretch(1); Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3); bl->addStretch(1); bl->addWidget(saveButton, 0); bl->addWidget(cancelButton, 0); ml->addLayout(bl, 0); // Load the list of rate plans. ADB DB; CustomersDB CDB; char tmpStr[1024]; CDB.get(CustID); sprintf(tmpStr, "%s (%ld)", (const char *) CDB.getStr("FullName"), myCustID); customer->setText(tmpStr); DB.query("select CycleID,InternalID from BillingCycles order by CycleID"); while (DB.getrow()) { cycleList->insertItem(DB.curRow["CycleID"]); if (atol(DB.curRow["InternalID"]) == CDB.getLong("BillingCycle")) { cycleList->setCurrentItem(cycleList->count()-1); } } }
ScoreView::ScoreView( int viewID_, QWidget *parent ) : ViewWidget( viewID_, parent) { //QPalette p = palette(); //p.setBrush(QPalette::Window, QBrush(QPixmap(background_xpm))); //setPalette(p); //setAutoFillBackground(true); Q3BoxLayout *mainLayout = new Q3HBoxLayout(this); Q3BoxLayout *leftLayout = new Q3VBoxLayout(mainLayout); Q3BoxLayout *rightLayout = new Q3VBoxLayout(mainLayout); //create a drawing object scoreWidget = new ScoreWidget(this); leftLayout->addWidget(scoreWidget); //scoreWidget->show(); Q3BoxLayout *bottomLayout = new Q3HBoxLayout(leftLayout); //vertical scroll wheel QwtWheel *scaleWheelY = new QwtWheel(this); scaleWheelY->setOrientation(Qt::Vertical); scaleWheelY->setWheelWidth(14); scaleWheelY->setRange(1.0, 30.0, 0.1, 1); scaleWheelY->setValue(scoreWidget->scaleY()); QToolTip::add(scaleWheelY, tr("Zoom vertically")); rightLayout->addWidget(scaleWheelY, 1); rightLayout->addStretch(4); connect(scaleWheelY, SIGNAL(sliderMoved(double)), scoreWidget, SLOT(setScaleY(double))); connect(scaleWheelY, SIGNAL(sliderMoved(double)), scoreWidget, SLOT(update())); //horizontal scroll wheel QwtWheel* scaleWheelX = new QwtWheel(this); scaleWheelX->setOrientation(Qt::Horizontal); scaleWheelX->setWheelWidth(16); scaleWheelX->setRange(1.0, 100.0, 1.1, 1); scaleWheelX->setValue(scoreWidget->scaleX()); QToolTip::add(scaleWheelX, tr("Zoom horizontally")); connect(scaleWheelX, SIGNAL(sliderMoved(double)), scoreWidget, SLOT(setScaleX(double))); connect(scaleWheelX, SIGNAL(sliderMoved(double)), scoreWidget, SLOT(update())); QComboBox *sharpsModeComboBox = new QComboBox(this, tr("sharpsModeComboBox")); QStringList s; s << tr("Sharps") << tr("Flats"); sharpsModeComboBox->addItems(s); connect(sharpsModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(setSharpsMode(int))); connect(sharpsModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(update())); QComboBox *notesModeComboBox = new QComboBox(this, tr("notesModeComboBox")); s.clear(); s << tr("Notes") << tr("MIDI blocks"); notesModeComboBox->addItems(s); connect(notesModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(setNotesMode(int))); connect(notesModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(update())); QComboBox *clefModeComboBox = new QComboBox(this, tr("clefModeComboBox")); s.clear(); s << tr("Both clefs") << tr("Treble clef"); clefModeComboBox->addItems(s); connect(clefModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(setClefMode(int))); connect(clefModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(update())); QComboBox *opaqueModeComboBox = new QComboBox(this, tr("opaqueModeComboBox")); s.clear(); s << tr("See-through notes") << tr("Opaque notes"); opaqueModeComboBox->addItems(s); connect(opaqueModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(setOpaqueMode(int))); connect(opaqueModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(update())); QComboBox *transposeComboBox = new QComboBox(this, tr("transposeComboBox")); s.clear(); s << tr("Up 2 octaves") << tr("Up 1 octave") << tr("As played") << tr("Down 1 octave") << tr("Down 2 octaves"); transposeComboBox->addItems(s); transposeComboBox->setCurrentIndex(2); connect(transposeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(setTransposeLevel(int))); connect(transposeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(update())); QComboBox *showAllModeComboBox = new QComboBox(this, "showAllModeComboBox"); s.clear(); s << tr("Hide extream notes") << tr("Show all notes"); showAllModeComboBox->addItems(s); connect(showAllModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(setShowAllMode(int))); connect(showAllModeComboBox, SIGNAL(activated(int)), scoreWidget, SLOT(update())); bottomLayout->addWidget(scaleWheelX, 0); bottomLayout->addStretch(1); bottomLayout->addWidget(sharpsModeComboBox, 0); bottomLayout->addStretch(1); bottomLayout->addWidget(notesModeComboBox, 0); bottomLayout->addStretch(1); bottomLayout->addWidget(clefModeComboBox, 0); bottomLayout->addStretch(1); bottomLayout->addWidget(opaqueModeComboBox, 0); bottomLayout->addStretch(1); bottomLayout->addWidget(transposeComboBox, 0); bottomLayout->addStretch(1); bottomLayout->addWidget(showAllModeComboBox, 0); bottomLayout->addStretch(4); //make any connections connect(gdata->view, SIGNAL(onFastUpdate(double)), scoreWidget, SLOT(update())); }
LogVoiceMail::LogVoiceMail ( QWidget* parent, const char* name ) : TAAWidget(parent) { setCaption( "Voice Mail Logging" ); // Create the widgets QLabel *dateLabel = new QLabel(this); dateLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); dateLabel->setText("D&ate/Time:"); msgDateTime = new Q3DateTimeEdit(QDateTime::currentDateTime(), this, "MsgDateTime"); dateLabel->setBuddy(msgDateTime); QLabel *messageLabel = new QLabel(this); messageLabel->setAlignment(Qt::AlignRight|Qt::AlignTop); messageLabel->setText("M&essage:"); message = new Q3MultiLineEdit(this); message->setWordWrap(Q3MultiLineEdit::WidgetWidth); messageLabel->setBuddy(message); saveButton = new QPushButton(this); saveButton->setText("&Save"); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveMessage())); closeButton = new QPushButton(this); closeButton->setText("&Close"); connect(closeButton, SIGNAL(clicked()), this, SLOT(closeClicked())); statusLabel = new QLabel(this); statusLabel->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); statusLabel->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken); statusLabel->setMinimumSize(0, 20); // Now, create our layouts // Date/time area. Q3GridLayout *dtl = new Q3GridLayout(2, 4, 3); dtl->setColStretch(0, 0); dtl->setColStretch(1, 1); dtl->setColStretch(2, 0); dtl->setColStretch(3, 1); dtl->setRowStretch(0, 0); dtl->setRowStretch(1, 1); dtl->addWidget(dateLabel, 0, 0); dtl->addMultiCellWidget(msgDateTime, 0, 0, 1, 3); dtl->addWidget(messageLabel, 1, 0); dtl->addMultiCellWidget(message, 1, 1, 1, 3); // The action button layout. Q3BoxLayout *abl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 5); abl->addStretch(1); abl->addWidget(saveButton, 0); abl->addWidget(closeButton, 0); abl->addSpacing(5); // The main layout. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 0, 0); ml->addSpacing(3); ml->addLayout(dtl, 1); ml->addSpacing(3); ml->addLayout(abl, 0); ml->addSpacing(3); ml->addWidget(statusLabel, 0); // Done. msgDateTime->setFocus(); resize(350, 180); }
Tab_Logins::Tab_Logins ( QWidget* parent, const char* name, long CustID ) : TAAWidget(parent) { setCaption( "Logins" ); myCustID = CustID; // Create all of our widgets. list = new Q3ListView(this, "LoginList"); list->addColumn("Login ID"); list->addColumn("Login Type"); list->addColumn("Contact Name"); list->addColumn("Last Modified"); list->addColumn("Disk"); list->addColumn("Flags"); list->addColumn("Active"); list->setAllColumnsShowFocus(TRUE); list->setColumnAlignment(4, AlignRight); list->setColumnAlignment(5, AlignRight); list->setColumnAlignment(6, AlignCenter); list->setItemMargin( 2 ); newButton = new QPushButton(this, "NewButton"); newButton->setText("&New"); connect(newButton, SIGNAL(clicked()), this, SLOT(createNewLogin())); openCloseButton = new QPushButton(this, "OpenCloseButton"); openCloseButton->setText("(&De)Activate"); connect(openCloseButton, SIGNAL(clicked()), this, SLOT(unlockLogin())); passwdButton = new QPushButton(this, "PasswdButton"); passwdButton->setText("&Password"); connect(passwdButton, SIGNAL(clicked()), this, SLOT(changePassword())); QPushButton *loginFlagsButton = new QPushButton(this, "LoginFlagsButton"); loginFlagsButton->setText("Fla&gs"); connect(loginFlagsButton, SIGNAL(clicked()), this, SLOT(loginFlagsClicked())); editButton = new QPushButton(this, "EditButton"); editButton->setText("&Edit"); connect(editButton, SIGNAL(clicked()), this, SLOT(editLogin())); modemUsageButton = new QPushButton(this, "Modem Usage Button"); modemUsageButton->setText("&Modem Usage"); connect(modemUsageButton, SIGNAL(clicked()), this, SLOT(modemUsageReport())); bandwidthButton = new QPushButton(this, "BandwidthButton"); bandwidthButton->setText("&Bandwidth"); connect(bandwidthButton, SIGNAL(clicked()), this, SLOT(bandwidthUsageReport())); QPushButton *diskSpaceButton = new QPushButton(this, "DiskSpaceButton"); diskSpaceButton->setText("D&isk Space"); connect(diskSpaceButton, SIGNAL(clicked()), this, SLOT(diskSpaceClicked())); diskSpaceButton->setEnabled(false); adminMenuArea = new QLabel(this, "Admin Menu Area"); adminMenu = new Q3PopupMenu; adminMenu->insertItem("&Set Primary Login", this, SLOT(setPrimaryLogin())); adminMenu->insertItem("&Transfer Login", this, SLOT(transferLogin())); if (isAdmin()) adminMenu->insertItem("&Wipe Login", this, SLOT(wipeLogin())); QMenuBar *tmpMenu; tmpMenu = new QMenuBar(adminMenuArea, "Administrivia"); tmpMenu->insertItem("&Administrivia", adminMenu); hideWiped = new QCheckBox(this, "HideWiped"); hideWiped->setText("&Hide Wiped"); hideWiped->setChecked(true); connect(hideWiped, SIGNAL(toggled(bool)), this, SLOT(hideWipedChanged(bool))); // Create our layouts. A top to bottom box, with a grid in it. Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); ml->addWidget(list, 1); Q3GridLayout *bl = new Q3GridLayout(2, 6); bl->addWidget(newButton, 0, 0); bl->addWidget(openCloseButton, 0, 1); bl->addWidget(passwdButton, 0, 2); bl->addWidget(loginFlagsButton, 0, 3); bl->addWidget(adminMenuArea, 0, 5); bl->addWidget(editButton, 1, 0); bl->addWidget(modemUsageButton, 1, 1); bl->addWidget(bandwidthButton, 1, 2); bl->addWidget(diskSpaceButton, 1, 3); bl->addWidget(hideWiped, 1, 5); for (int i = 0 ; i < 5; i++) bl->setColStretch(i, 1); bl->setRowStretch(0, 0); bl->setRowStretch(1, 0); ml->addLayout(bl, 0); // QObject::connect(listtitle, SIGNAL(widthChanged(int, int)), // list, SLOT(setColumnWidth(int, int))); refreshLoginList(0); if (!isManager()) { // wipeButton->hide(); adminMenuArea->hide(); } }
CustomerSearch::CustomerSearch(QWidget *parent, const char *name, Qt::WFlags f) : TAAWidget(parent, f) { // A simple (in appearance) widget that will allow the user to // search for, and select, a customer. // // The layout will look like so: // // Query: [ Search Box ] [Search] [Clear] // +---------+----------+-----------------------+ // + Cust ID | Login ID | Account Name | // + | | | // +---------+----------+-----------------------+ // // When the user types something in the search box and presses enter // or clicks the search button, the widget will do a search on the // customer database against the search text and fill in the list. // When the user clicks or scrolls onto an entry, itemHighlighted() // will be emitted with the customer ID. When the user double clicks // or presses enter on an entry itemSelected() will be emitted with // the customer ID. searchText = new QLineEdit(this, "SearchText"); searchText->setMaxLength(80); connect(searchText, SIGNAL(returnPressed()), this, SLOT(startSearch())); QLabel *queryLabel = new QLabel(this, "Query Label"); queryLabel->setText("&Query:"); queryLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter); queryLabel->setBuddy(searchText); searchButton = new QPushButton(this, "SearchButton"); searchButton->setText("Search"); connect(searchButton, SIGNAL(clicked()), this, SLOT(startSearch())); QPushButton *clearButton = new QPushButton(this, "Clear Button"); clearButton->setText("C&lear"); connect(clearButton, SIGNAL(clicked()), this, SLOT(clearSearch())); custList = new Q3ListView(this, "SearchResults"); custList->setMargin(2); custList->setAllColumnsShowFocus(true); custList->setRootIsDecorated(true); custList->addColumn("Account Name"); custList->addColumn("LoginID"); custList->addColumn("Cust ID"); connect(custList, SIGNAL(currentChanged(Q3ListViewItem *)), this, SLOT(itemHighlighted(Q3ListViewItem *))); connect(custList, SIGNAL(doubleClicked(Q3ListViewItem *)), this, SLOT(itemSelected(Q3ListViewItem *))); connect(custList, SIGNAL(returnPressed(Q3ListViewItem *)), this, SLOT(itemSelected(Q3ListViewItem *))); Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 0, 0); Q3BoxLayout *sl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 0); sl->addSpacing(3); sl->addWidget(queryLabel, 0); sl->addSpacing(3); sl->addWidget(searchText, 1); sl->addSpacing(3); sl->addWidget(searchButton, 0); sl->addWidget(clearButton, 0); ml->addLayout(sl, 0); ml->addSpacing(3); ml->addWidget(custList, 1); }
FreqView::FreqView(int viewID_, QWidget *parent) : ViewWidget(viewID_, parent) { View *view = gdata->view; //setCaption("Frequency View"); Q3BoxLayout *mainLayout = new Q3VBoxLayout(this); mainLayout->setResizeMode(QLayout::SetNoConstraint); //QBoxLayout *topLayout = new QVBoxLayout(mainLayout); //QBoxLayout *rightLayout = new QVBoxLayout(mainLayout); //QBoxLayout *bottomLayout = new QHBoxLayout(mainLayout); QSplitter *splitter = new QSplitter(Qt::Vertical, this); QWidget *topWidget = new QWidget(splitter); //topSplitter->setOpaqueResize(true); Q3BoxLayout *topLayout = new Q3HBoxLayout(topWidget); Q3BoxLayout *topLeftLayout = new Q3VBoxLayout(topLayout); timeAxis = new TimeAxis(topWidget, gdata->leftTime(), gdata->rightTime(), true); timeAxis->setWhatsThis("The time in seconds"); topLeftLayout->addWidget(timeAxis); /* Q3Grid *freqFrame = new Q3Grid(1, topWidget); freqFrame->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken); //freqDrawWidget = new FreqDrawWidget(freqFrame); //freqDrawWidget->setFocusPolicy(Qt::NoFocus); freqWidgetGL = new FreqWidgetGL(freqFrame); freqWidgetGL->setFocusPolicy(Qt::NoFocus); topLeftLayout->addWidget(freqFrame); */ QFrame *freqFrame = new QFrame; freqFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); QVBoxLayout *freqFrameLayout = new QVBoxLayout; freqWidgetGL = new FreqWidgetGL(NULL); freqWidgetGL->setWhatsThis("The line represents the musical pitch of the sound. A higher pitch moves up, with note names shown at the left, with octave numbers. " "The black vertical line shows the current time. This line's position can be moved. " "Pitch-lines are drawn connected only because they change a small amount over a small time step. " "Note: This may cause semi-tone note changes appear to be joined. Clicking the background and dragging moves the view. " "Clicking a pitch-line selects it. Mouse-Wheel scrolls. Shift-Mouse-Wheel zooms"); //freqWidgetGL = new FreqDrawWidget(NULL); freqFrameLayout->addWidget(freqWidgetGL); freqFrameLayout->setMargin(0); freqFrameLayout->setSpacing(0); freqFrame->setLayout(freqFrameLayout); topLeftLayout->addWidget(freqFrame); //Q3BoxLayout *topRightLayout = new Q3VBoxLayout(topLayout); QVBoxLayout *topRightLayout = new QVBoxLayout(); freqWheelY = new QwtWheel(topWidget); freqWheelY->setOrientation(Qt::Vertical); freqWheelY->setWheelWidth(14); freqWheelY->setRange(1.6, 5.0, 0.001, 1); //freqWheelY->setValue(3.2); //view->setZoomFactorY(3.2); freqWheelY->setValue(view->logZoomY()); QToolTip::add(freqWheelY, "Zoom pitch contour view vertically"); topRightLayout->addSpacing(20); topRightLayout->addWidget(freqWheelY, 0); //Create the vertical scrollbar //vScrollBar = new MyScrollBar(0, toInt((view->topNote()-view->viewHeight())*view->stepY()), 20, toInt(view->viewHeight()*view->stepY()), toInt(view->viewBottom()*view->stepY()), Qt::Vertical, this); //vScrollBar = new MyScrollBar(0, gdata->topNote()-view->viewHeight(), 20, view->viewHeight(), view->viewBottom(), 20, Qt::Vertical, this); freqScrollBar = new MyScrollBar(0, gdata->topPitch()-view->viewHeight(), 0.5, view->viewHeight(), 0, 20, Qt::Vertical, topWidget); freqScrollBar->setValue(gdata->topPitch()-view->viewHeight()-view->viewBottom()); topRightLayout->addWidget(freqScrollBar, 4); topLayout->addLayout(topRightLayout); /* QPushButton *buttonPlusY = new QPushButton("+", topSplitter); buttonPlusY->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); buttonPlusY->setFixedSize(15, 15); QToolTip::add(buttonPlusY, "Zoom in vertically"); QPushButton *buttonMinusY = new QPushButton("-", topSplitter); buttonMinusY->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); buttonMinusY->setFixedSize(15, 15); QToolTip::add(buttonMinusY, "Zoom out vertically"); */ //------------bottom half------------------ QWidget *bottomWidget = new QWidget(splitter); Q3BoxLayout *bottomLayout = new Q3VBoxLayout(bottomWidget); Q3BoxLayout *bottomTopLayout = new Q3HBoxLayout(bottomLayout); /* Q3Grid *amplitudeFrame = new Q3Grid(1, bottomWidget); amplitudeFrame->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken); amplitudeWidget = new AmplitudeWidget(amplitudeFrame); bottomTopLayout->addWidget(amplitudeFrame); */ QFrame *amplitudeFrame = new QFrame; amplitudeFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); QVBoxLayout *amplitudeFrameLayout = new QVBoxLayout; amplitudeWidget = new AmplitudeWidget(NULL); amplitudeWidget->setWhatsThis("Shows the volume (or other parameters) at time lined up with the pitch above. Note: You can move the lines to change some thresholds."); amplitudeFrameLayout->addWidget(amplitudeWidget); amplitudeFrameLayout->setMargin(0); amplitudeFrameLayout->setSpacing(0); amplitudeFrame->setLayout(amplitudeFrameLayout); bottomTopLayout->addWidget(amplitudeFrame); Q3BoxLayout *bottomTopRightLayout = new Q3VBoxLayout(bottomTopLayout); amplitudeWheelY = new QwtWheel(bottomWidget); amplitudeWheelY->setOrientation(Qt::Vertical); amplitudeWheelY->setWheelWidth(14); //amplitudeWheelY->setRange(30, 150, 0.1, 1); amplitudeWheelY->setRange(0.2, 1.00, 0.01, 1); amplitudeWheelY->setValue(amplitudeWidget->range()); QToolTip::add(amplitudeWheelY, "Zoom pitch contour view vertically"); bottomTopRightLayout->addWidget(amplitudeWheelY, 0); //Create the vertical scrollbar //amplitudeScrollBar = new MyScrollBar(0, 150, 20, 80, 0, 20, Qt::Vertical, bottomWidget); amplitudeScrollBar = new MyScrollBar(0.0, 1.0-amplitudeWidget->range(), 0.20, amplitudeWidget->range(), 0, 20, Qt::Vertical, bottomWidget); bottomTopRightLayout->addWidget(amplitudeScrollBar, 4); Q3BoxLayout *bottomBottomLayout = new Q3HBoxLayout(bottomLayout); /* QSpinBox *thresholdSpinBox = new QSpinBox(50, 100, 1, bottomWidget, "thresholdSpinBox"); thresholdSpinBox->setSuffix("%"); thresholdSpinBox->setFocusPolicy(Qt::NoFocus); thresholdSpinBox->setValue(gdata->getActiveIntThreshold()); QToolTip::add(thresholdSpinBox, "Threshold used in choosing the octave"); connect(thresholdSpinBox, SIGNAL(valueChanged(int)), gdata, SLOT(resetActiveIntThreshold(int))); //connect(thresholdSpinBox, SIGNAL(valueChanged(int)), freqDrawWidget, SLOT(update())); connect(thresholdSpinBox, SIGNAL(valueChanged(int)), freqWidgetGL, SLOT(update())); connect(gdata, SIGNAL(activeIntThresholdChanged(int)), thresholdSpinBox, SLOT(setValue(int))); */ QComboBox *amplitudeModeComboBox = new QComboBox(bottomWidget, "amplitudeTypeModeBox"); //static const char* amplitudeModeItems[] = { "RMS (Log)", "Peak Amplitude (Log)", "Peak Correlation", "Purity", "Changeness", 0 }; //amplitudeModeComboBox->insertStrList(amplitudeModeItems); //amplitudeModeComboBox->insertStrList(amp_mode_names, NUM_AMP_MODES); amplitudeModeComboBox->setWhatsThis("Select different algorithm parameters to view in the bottom pannel"); int j; QStringList s; for(j=0; j<NUM_AMP_MODES; j++) s << amp_mode_names[j]; amplitudeModeComboBox->addItems(s); connect(amplitudeModeComboBox, SIGNAL(activated(int)), gdata, SLOT(setAmplitudeMode(int))); connect(amplitudeModeComboBox, SIGNAL(activated(int)), amplitudeWidget, SLOT(update())); QComboBox *pitchContourModeComboBox = new QComboBox(bottomWidget, "pitchContourModeComboBox"); pitchContourModeComboBox->setWhatsThis("Select whether the Pitch Contour line fades in/out with clarity/loudness of the sound or is a solid dark line"); //static const char* pitchContourModeItems[] = { "Clarity fading", "Note grouping", 0 }; //pitchContourModeComboBox->insertStrList(pitchContourModeItems); s.clear(); s << "Clarity fading" << "Note grouping"; pitchContourModeComboBox->addItems(s); connect(pitchContourModeComboBox, SIGNAL(activated(int)), gdata, SLOT(setPitchContourMode(int))); //connect(pitchContourModeComboBox, SIGNAL(activated(int)), freqDrawWidget, SLOT(update())); connect(pitchContourModeComboBox, SIGNAL(activated(int)), freqWidgetGL, SLOT(update())); freqWheelX = new QwtWheel(bottomWidget); freqWheelX->setOrientation(Qt::Horizontal); freqWheelX->setWheelWidth(16); freqWheelX->setRange(0.5, 9.0, 0.001, 1); freqWheelX->setValue(2.0); QToolTip::add(freqWheelX, "Zoom horizontally"); bottomBottomLayout->addStretch(2); //bottomBottomLayout->addWidget(thresholdSpinBox, 0); //bottomBottomLayout->addStretch(2); bottomBottomLayout->addWidget(amplitudeModeComboBox, 0); bottomBottomLayout->addStretch(2); bottomBottomLayout->addWidget(pitchContourModeComboBox, 0); bottomBottomLayout->addStretch(2); bottomBottomLayout->addWidget(freqWheelX, 1); bottomBottomLayout->addSpacing(16); //Create the horizontal scrollbar and +/- buttons //hScrollBar = new MyScrollBar(gdata->leftTime(), gdata->rightTime(), 0.1, view->viewWidth(), view->currentTime(), 10000, Qt::Horizontal, this); /* QPushButton *buttonPlusX = new QPushButton("+", this); buttonPlusX->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); buttonPlusX->setFixedSize(15, 15); QToolTip::add(buttonPlusX, "Zoom in horizontal"); QPushButton *buttonMinusX = new QPushButton("-", this); buttonMinusX->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); buttonMinusX->setFixedSize(15, 15); QToolTip::add(buttonMinusX, "Zoom out horizontal"); */ //Create the resize grip. The thing in the bottom right hand corner QSizeGrip *sizeGrip = new QSizeGrip(bottomWidget); sizeGrip->setFixedSize(15, 15); //sizeGrip->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum, false)); sizeGrip->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, false)); bottomBottomLayout->addWidget(sizeGrip); //Actually add all the widgets into the widget layout //topLayout->addWidget(timeAxis); mainLayout->addWidget(splitter); //rightLayout->addWidget(buttonMinusY); //rightLayout->addWidget(buttonPlusY); //rightLayout->addWidget(vScrollBar); //bottomLayout->addWidget(buttonMinusX); //bottomLayout->addWidget(buttonPlusX); //mainLayout->addWidget(sizeGrip, 1, 1); //Setup all the signals and slots //vertical connect(freqScrollBar, SIGNAL(sliderMoved(double)), view, SLOT(changeViewY(double))); connect(freqScrollBar, SIGNAL(sliderMoved(double)), view, SLOT(doSlowUpdate())); connect(view, SIGNAL(viewBottomChanged(double)), freqScrollBar, SLOT(setValue(double))); /* connect(view, SIGNAL(scrollableYChanged(double)), freqScrollBar, SLOT(setMaxValue(double))); connect(view, SIGNAL(viewHeightChanged(double)), freqScrollBar, SLOT(setPageStep(double))); */ connect(freqWheelY, SIGNAL(valueChanged(double)), view, SLOT(setZoomFactorY(double))); connect(view, SIGNAL(logZoomYChanged(double)), freqWheelY, SLOT(setValue(double))); //connect(view, SIGNAL(logZoomYChanged(double)), freqDrawWidget, SLOT(update())); //horizontal connect(freqWheelX, SIGNAL(valueChanged(double)), view, SLOT(setZoomFactorX(double))); connect(view, SIGNAL(logZoomXChanged(double)), freqWheelX, SLOT(setValue(double))); //connect(view, SIGNAL(logZoomXChanged(double)), view, SLOT(doSlowUpdate())); //connect(buttonPlusX, SIGNAL(clicked()), view, SLOT(viewZoomInX())); //connect(buttonMinusX, SIGNAL(clicked()), view, SLOT(viewZoomOutX())); connect(amplitudeWheelY, SIGNAL(valueChanged(double)), amplitudeWidget, SLOT(setRange(double))); //connect(amplitudeWidget, SIGNAL(dBRangeChanged(double)), amplitudeScrollBar, SLOT(setPageStep(double))); connect(amplitudeWheelY, SIGNAL(valueChanged(double)), amplitudeWidget, SLOT(update())); connect(amplitudeScrollBar, SIGNAL(sliderMoved(double)), amplitudeWidget, SLOT(setOffset(double))); connect(amplitudeScrollBar, SIGNAL(sliderMoved(double)), amplitudeWidget, SLOT(update())); connect(amplitudeWidget, SIGNAL(rangeChanged(double)), this, SLOT(setAmplitudeZoom(double))); connect(amplitudeWidget, SIGNAL(rangeChanged(double)), amplitudeWheelY, SLOT(setValue(double))); connect(amplitudeWidget, SIGNAL(offsetChanged(double)), amplitudeScrollBar, SLOT(setValue(double))); /* connect(hScrollBar, SIGNAL(valueChanged(double)), view, SLOT(setCurrentTime(double))); connect(hScrollBar, SIGNAL(sliderMoved(double)), gdata, SLOT(updateActiveChunkTime(double))); connect(gdata, SIGNAL(leftTimeChanged(double)), hScrollBar, SLOT(setMinValue(double))); connect(gdata, SIGNAL(rightTimeChanged(double)), hScrollBar, SLOT(setMaxValue(double))); connect(view, SIGNAL(currentTimeChanged(double)), hScrollBar, SLOT(setValue(double))); connect(view, SIGNAL(viewWidthChanged(double)), hScrollBar, SLOT(setPageStep(double))); */ //make the widgets get updated when the view changes //connect(gdata->view, SIGNAL(onSlowUpdate(double)), freqDrawWidget, SLOT(update())); connect(gdata->view, SIGNAL(onSlowUpdate(double)), freqWidgetGL, SLOT(update())); //connect(gdata->view, SIGNAL(onSlowUpdate(double)), amplitudeWidget, SLOT(update())); connect(gdata->view, SIGNAL(onSlowUpdate(double)), amplitudeWidget, SLOT(update())); //connect(gdata->view, SIGNAL(onSlowUpdate(double)), timeAxis, SLOT(update())); connect(gdata->view, SIGNAL(onSlowUpdate(double)), timeAxis, SLOT(update())); connect(gdata->view, SIGNAL(timeViewRangeChanged(double, double)), timeAxis, SLOT(setRange(double, double))); }
/** * CustomLoginFlagEditor::CustomLoginFlagEditor() * * Constructor for the Custom Login Flag Editor. */ CustomLoginFlagEditor::CustomLoginFlagEditor ( QWidget* parent, const char* name, long CustID, const char *loginID ) : TAAWidget(parent) { setCaption( "Login Flags" ); myCustID = CustID; strcpy(myLoginID, loginID); // Create labels to let the user know who we're editing QLabel *custIDLabel = new QLabel(this, "custIDLabel"); char tmpStr[1024]; sprintf(tmpStr, "%ld", myCustID); custIDLabel->setAlignment(AlignRight); custIDLabel->setText("Customer ID:"); QLabel *custIDValue = new QLabel(this, "custIDValue"); custIDValue->setAlignment(AlignLeft); custIDValue->setText(tmpStr); QLabel *loginIDLabel = new QLabel(this, "loginIDLabel"); loginIDLabel->setAlignment(AlignRight); loginIDLabel->setText("Login ID:"); QLabel *loginIDValue = new QLabel(this, "loginIDValue"); loginIDValue->setAlignment(AlignLeft); loginIDValue->setText(myLoginID); QStringList colHeaders; colHeaders += "Flag"; colHeaders += "Value"; // Create all of our widgets. flagTable = new Q3Table(0, 2, this, "flagTable"); flagTable->setColumnLabels(colHeaders); QPushButton *saveButton = new QPushButton(this, "saveButton"); saveButton->setText("&Save"); QPushButton *cancelButton = new QPushButton(this, "cancelButton"); cancelButton->setText("&Cancel"); // Label layout Q3GridLayout *gl = new Q3GridLayout(2, 2); int curRow = 0; gl->addWidget(custIDLabel, curRow, 0); gl->addWidget(custIDValue, curRow, 1); curRow++; gl->addWidget(loginIDLabel, curRow, 0); gl->addWidget(loginIDValue, curRow, 1); curRow++; gl->setColStretch(0, 0); gl->setColStretch(1, 1); // Create the layout Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3); ml->addLayout(gl, 0); ml->addWidget(flagTable, 1); Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 1); bl->addStretch(1); bl->addWidget(saveButton, 0); bl->addWidget(cancelButton, 0); ml->addLayout(bl, 0); fillTable(); // Connect our buttons connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked())); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveClicked())); }
PolygonView::PolygonView(PinEditDoc * doc, QWidget * parent, const char * name, Qt::WFlags f) : QWidget(parent, name, f) { assert(doc != NULL); p_Doc = doc; p_Shape = NULL; p_Polygon = NULL; m_bSelectionChanged = true; p_Doc->registerUpdateable(this, "polygon"); p_Doc->registerRebuildable(this, "polygon"); // the polygon list view p_PolygonListView = new Q3ListView(this); connect(p_PolygonListView, SIGNAL(selectionChanged()), this, SLOT(slotChanged())); p_PolygonListView->setSelectionMode(Q3ListView::Extended); p_PolygonListView->addColumn(QString("polygons")); p_PolygonListView->setMinimumSize(200, 240); // the vertex list view p_VertexListView = new Q3ListView(this); connect(p_VertexListView, SIGNAL(selectionChanged()), this, SLOT(slotVertexChanged())); p_VertexListView->setSelectionMode(Q3ListView::Single); p_VertexListView->addColumn(QString("vertices for polygon")); p_VertexListView->setMinimumSize(200, 80); // tabs and widgets QTabWidget * tabWidget = new QTabWidget(this); //tabWidget->setFixedSize(200, 80); tabWidget->setMinimumSize(200, 80); // main layout Q3BoxLayout * vlayout = new Q3VBoxLayout(this); vlayout->addWidget(p_PolygonListView); vlayout->addWidget(p_VertexListView); vlayout->addWidget(tabWidget); vlayout->setStretchFactor(p_PolygonListView, 3); vlayout->setStretchFactor(p_PolygonListView, 2); vlayout->setStretchFactor(tabWidget, 0); // the vertex order widget { QWidget * widget = new QWidget(this); tabWidget->addTab(widget, "order"); p_ButtonUp = new QPushButton("up", widget); connect(p_ButtonUp, SIGNAL(clicked()), this, SLOT(slotVertexUp())); p_ButtonDown = new QPushButton("down", widget); connect(p_ButtonDown, SIGNAL(clicked()), this, SLOT(slotVertexDown())); Q3BoxLayout * layout = new Q3HBoxLayout(widget); layout->addWidget(p_ButtonUp); layout->addWidget(p_ButtonDown); } // the position widget { QWidget * widget = new QWidget(this); tabWidget->addTab(widget, "position"); p_EditX = new QLineEdit(widget); p_EditY = new QLineEdit(widget); p_EditZ = new QLineEdit(widget); connect(p_EditX, SIGNAL(returnPressed()), this, SLOT(slotApplyVertex())); connect(p_EditY, SIGNAL(returnPressed()), this, SLOT(slotApplyVertex())); connect(p_EditZ, SIGNAL(returnPressed()), this, SLOT(slotApplyVertex())); p_ApplyVertexButton = new QPushButton("apply", widget); connect(p_ApplyVertexButton, SIGNAL(clicked()), this, SLOT(slotApplyVertex())); Q3BoxLayout * vlayoutc = new Q3VBoxLayout(widget); Q3BoxLayout * hlayout = new Q3HBoxLayout(vlayoutc); hlayout->addWidget(p_EditX); hlayout->addWidget(p_EditY); hlayout->addWidget(p_EditZ); vlayoutc->addWidget(p_ApplyVertexButton); } // the color widget { QWidget * widget = new QWidget(this); tabWidget->addTab(widget, "color"); p_EditR = new QLineEdit(widget); p_EditG = new QLineEdit(widget); p_EditB = new QLineEdit(widget); p_EditA = new QLineEdit(widget); connect(p_EditR, SIGNAL(returnPressed()), this, SLOT(slotApplyColor())); connect(p_EditG, SIGNAL(returnPressed()), this, SLOT(slotApplyColor())); connect(p_EditB, SIGNAL(returnPressed()), this, SLOT(slotApplyColor())); connect(p_EditA, SIGNAL(returnPressed()), this, SLOT(slotApplyColor())); p_ApplyColorButton = new QPushButton("apply", widget); connect(p_ApplyColorButton, SIGNAL(clicked()), this, SLOT(slotApplyColor())); Q3BoxLayout * vlayoutc = new Q3VBoxLayout(widget); Q3BoxLayout * hlayoutb = new Q3HBoxLayout(vlayoutc); hlayoutb->addWidget(p_EditR); hlayoutb->addWidget(p_EditG); hlayoutb->addWidget(p_EditB); hlayoutb->addWidget(p_EditA); vlayoutc->addWidget(p_ApplyColorButton); } // properties widget { QWidget * widget = new QWidget(this); tabWidget->addTab(widget, "prop"); p_TransBox = new QCheckBox("transparent", widget); p_ApplyPropButton = new QPushButton("apply", widget); connect(p_ApplyPropButton, SIGNAL(clicked()), this, SLOT(slotApplyProp())); Q3BoxLayout * vlayout = new Q3VBoxLayout(widget); vlayout->addWidget(p_TransBox); vlayout->addWidget(p_ApplyPropButton); } this->doRebuild(); //this->doUpdate(); }