QDir sys32(const QString &prefixHash, const QString &arch) { if (arch == "32") return windows(prefixHash).absoluteFilePath("system32"); else return windows(prefixHash).absoluteFilePath("syswow64"); }
void newpos(void) { cleardevice(); x=0.0;y=0.0;z=0.0; sx=0.0;sy=0.0; xa=0.0;ya=0.0;za=0.0; sxa=0.0;sya=0.0;sxb=0.0;syb=0.0; sxs=0.0;sys=0.0; sr1=0.0;sr2=0.0;sr3=0.0; cr1=0.0;cr2=0.0;cr3=0.0; msx=0.0;msy=0.0; rx=0.0;ry=0.0; t1=0;t2=0; p1=0; rotation(); /* for(t2=1;t2<=6;t2++) */ for(t2=1;t2<=4;t2++) { setlinestyle(USERBIT_LINE,0xffff,NORM_WIDTH); /* get starting position */ /* x=array1[p1][0]; y=array1[p1][1]; z=array1[p1][2]; */ x=array2[p1][0]; y=array2[p1][1]; z=array2[p1][2]; calc_3d(); windows(); sxa=sx;sya=sy; /* finish displaying side */ /* for(t1=1;t1<=4;t1++) */ for(t1=1;t1<=3;t1++) { p1++; /* x=array1[p1][0]; y=array1[p1][1]; z=array1[p1][2]; */ x=array2[p1][0]; y=array2[p1][1]; z=array2[p1][2]; calc_3d(); windows(); sxs=sx; sys=sy; sxb=sx; syb=sy; moveto(sxa,sya); lineto(sxb,syb); sxa=sxs; sya=sys; } p1++; } }
void Window_trigger::window_changed(WId window_P, unsigned int dirty_P) { // CHECKME snad nebude mit vliv, kdyz budu kaslat na properties_P a zkratka // kontrolovat kazdou zmenu // CHECKME kdyz se zmeni okno z match na non-match, asi to nebrat jako DISAPPEAR if(!(dirty_P & (NET::WMName | NET::WMWindowType))) return; kdDebug(1217) << "Window_trigger::w_changed()" << endl; bool was_match = false; if(existing_windows.contains(window_P)) was_match = existing_windows[window_P]; bool matches = windows()->match(Window_data(window_P)); existing_windows[window_P] = matches; if(active && matches && !was_match) if(window_actions & WINDOW_APPEARS) { windows_handler->set_action_window(window_P); data->execute(); } else if(window_actions & WINDOW_ACTIVATES && window_P == windows_handler->active_window()) { windows_handler->set_action_window(window_P); data->execute(); } kdDebug(1217) << "Window_trigger::w_changed() : " << was_match << "|" << matches << endl; }
void gft_2dComplex64(double *image, unsigned int N, unsigned int M, windowFunction *window) { int row, col; double *win; int *pars; pars = gft_1dPartitions(N); win = windows(N, window); for (row=0; row < N; row++) { gft_1dComplex64(image+(row*N*2),N,win,pars,1); } pars = gft_1dPartitions(M); win = windows(M, window); for (col=0; col < M; col++) { gft_1dComplex64(image+(col*2),M,win,pars,N); } }
void LauncherApplication::show() { if (m_application == NULL) { return; } QScopedPointer<BamfWindowList> windows(m_application->windows()); int size = windows->size(); if (size < 1) { return; } /* Pick the most important window. The primary criterion to determine the most important window is urgency. The secondary criterion is the last_active timestamp (the last time the window was activated). */ BamfWindow* important = windows->at(0); for (int i = 0; i < size; ++i) { BamfWindow* current = windows->at(i); if (current->urgent() && !important->urgent()) { important = current; } else if (current->urgent() || !important->urgent()) { if (current->last_active() > important->last_active()) { important = current; } } } WnckScreen* screen = wnck_screen_get_default(); wnck_screen_force_update(screen); WnckWindow* window = wnck_window_get(important->xid()); LauncherUtility::showWindow(window); }
void Task::setTask(AbstractGroupableItem *abstractItem) { if (m_abstractItem) { disconnect(m_abstractItem, SIGNAL(destroyed()), this, SLOT(validate())); } m_abstractItem = abstractItem; m_command = QString(); m_launcherUrl = KUrl(); if (m_abstractItem) { if (m_validateTimer > 0) { killTimer(m_validateTimer); m_validateTimer = 0; } connect(m_abstractItem, SIGNAL(destroyed()), this, SLOT(validate())); } if (m_abstractItem->itemType() == TaskManager::GroupItemType) { m_group = qobject_cast<TaskGroup*>(abstractItem); m_taskType = GroupType; if (m_applet->groupManager()->groupingStrategy() != TaskManager::GroupManager::ManualGrouping && m_group->members().count()) { TaskItem *task = qobject_cast<TaskItem*>(m_group->members().first()); if (task && task->task()) { if (m_group->name().isEmpty()) { m_group->setName(task->task()->visibleName()); } if (m_applet->groupManager()->groupingStrategy() == TaskManager::GroupManager::ProgramGrouping) { m_command = command(task->task()->pid()); } } } QList<WId> windowList = windows(); for (int i = 0; i < windowList.count(); ++i) { emit windowAdded(windowList.at(i)); } connect(m_group, SIGNAL(changed(::TaskManager::TaskChanges)), this, SLOT(taskChanged(::TaskManager::TaskChanges))); connect(m_group, SIGNAL(groupEditRequest()), this, SLOT(showPropertiesDialog())); connect(m_group, SIGNAL(itemAdded(AbstractGroupableItem*)), this, SLOT(addItem(AbstractGroupableItem*))); connect(m_group, SIGNAL(itemRemoved(AbstractGroupableItem*)), this, SLOT(removeItem(AbstractGroupableItem*))); }
Window_trigger *Window_trigger::copy(Action_data *data_P) const #else Trigger *Window_trigger::copy(Action_data *data_P) const #endif { Window_trigger *ret = new Window_trigger(data_P ? data_P : data, windows()->copy(), window_actions); ret->existing_windows = existing_windows; // CHECKME je tohle vazne treba ? return ret; }
int LauncherApplication::windowCount() const { if (m_application == NULL) { return 0; } QScopedPointer<BamfWindowList> windows(m_application->windows()); return windows->size(); }
inline operating_system detect_this_binary_operating_system(bool is_travis_ci, bool is_appveyor) { #ifdef _WIN32 Si::ignore_unused_variable_warning(is_travis_ci); return windows(is_appveyor); #else Si::ignore_unused_variable_warning(is_appveyor); return ubuntu(is_travis_ci); #endif }
void Window_trigger::cfg_write(KConfig &cfg_P) const { base::cfg_write(cfg_P); QString save_cfg_group = cfg_P.group(); cfg_P.setGroup(save_cfg_group + "Windows"); windows()->cfg_write(cfg_P); cfg_P.setGroup(save_cfg_group); cfg_P.writeEntry("WindowActions", window_actions); cfg_P.writeEntry("Type", "WINDOW"); // overwrites value set in base::cfg_write() }
const Window &State::activeWindow() const { for(auto window : windows()) { if (window->active()) return *window; } throw std::out_of_range("Could not find an active window!"); }
void Window_trigger::window_added(WId window_P) { bool matches = windows()->match(Window_data(window_P)); existing_windows[window_P] = matches; kdDebug(1217) << "Window_trigger::w_added() : " << matches << endl; if(active && matches && (window_actions & WINDOW_APPEARS)) { windows_handler->set_action_window(window_P); data->execute(); } }
void ShowToolbarsForAllWindowsAction::Execute() { // Record that the toolbars should be on. ViewerWindowManager::Instance()->GetWindowAtts()->SetToolbarsVisible(true); std::vector<ViewerWindow *> windows(ViewerWindowManager::Instance()->GetWindows()); for(size_t i = 0; i < windows.size(); ++i) { ViewerWindowUI *win = ViewerWindowUI::SafeDownCast(windows[i]); if(win != NULL) win->GetToolbar()->ShowAll(); } }
void SetToolbarIconSizeAction::Execute() { bool usesLargeIcons = args.GetBoolFlag(); //ViewerWindowManager::Instance()->GetWindowAtts()->GetLargeIcons(); // Set the icon size. std::vector<ViewerWindow *> windows(ViewerWindowManager::Instance()->GetWindows()); for(size_t i = 0; i < windows.size(); ++i) { ViewerWindowUI *win = ViewerWindowUI::SafeDownCast(windows[i]); if(win != NULL) win->SetLargeIcons(!usesLargeIcons); } }
WId QxtWindowSystem::findWindow(const QString& title) { Window result = 0; WindowList list = windows(); foreach (const Window &wid, list) { if (windowTitle(wid) == title) { result = wid; break; } } return result; }
WId QxtWindowSystem::windowAt(const QPoint& pos) { Window result = 0; WindowList list = windows(); for (int i = list.size() - 1; i >= 0; --i) { WId wid = list.at(i); if (windowGeometry(wid).contains(pos)) { result = wid; break; } } return result; }
//------------------------------------------------------------------------------ // draw() -- //------------------------------------------------------------------------------ void Eadi3DPage::draw() { BasicGL::Display* dsp = getDisplay(); if (dsp != 0) { eadiObjs.makeObjects(); GLsizei vpWidth; GLsizei vpHeight; dsp->getViewportSize(&vpWidth, &vpHeight); LCreal ratio = static_cast<LCreal>(vpWidth) / static_cast<LCreal>(vpHeight); bool depthTest = false; if (glIsEnabled(GL_DEPTH_TEST)) depthTest = true; if (depthTest) glDisable(GL_DEPTH_TEST); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glOrtho(-2.635 * ratio, 2.635 * ratio, -2.635, 2.635, -3.51, 0.01); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); globeBall(pitchDEG, rollDEG, pitchSteeringCmd, rollSteeringCmd, pitchSteeringValid, rollSteeringValid, landingMode); background(); const char* airSpeedType = "C"; scales(glideslopeDevDOTS, localizerDevDOTS, turnRateDOTS, slipIndDOTS, glideslopeDevValid, localizerDevValid, landingMode); windows(airspeedKTS, altitudeFT, aoaDEG, machNo, vviFPM, airSpeedType, Gload); LCreal hdgCmd = 0.0; heading(headingDEG, hdgCmd); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); if (depthTest) glEnable(GL_DEPTH_TEST); // now draw our components BaseClass::draw(); } }
void Application::connectWindowSignals() { if (m_application == NULL || m_application->running() == false) { return; } QScopedPointer<BamfWindowList> windows(m_application->windows()); const int size = windows->size(); if (size < 1) { return; } WnckScreen* screen = wnck_screen_get_default(); wnck_screen_force_update(screen); for (int i = 0; i < size; ++i) { BamfWindow *window = windows->at(i); onWindowAdded(window); } }
int main( int argc, char* argv[] ) { KAboutData about( "kwin_update_tabbox_settings", "kwin", KLocalizedString(), 0 ); KCmdLineArgs::init( argc, argv, &about ); KComponentData inst( &about ); Q_UNUSED( KGlobal::locale() ); // jump-start locales to get to translated descriptions KConfig config( "kwinrc" ); KConfigGroup windows(&config, "Windows"); KConfigGroup tabbox(&config, "TabBox"); const bool traverse = tabbox.readEntry<bool>("TraverseAll", false); const QString style = windows.readEntry<QString>("AltTabStyle", "KDE"); if( !tabbox.hasKey("ListMode") ) tabbox.writeEntry("ListMode", traverse?1:0); if( !tabbox.hasKey("ShowTabBox") ) tabbox.writeEntry("ShowTabBox", (style.compare("KDE", Qt::CaseInsensitive) == 0)?true:false); tabbox.sync(); config.sync(); // Send signal to all kwin instances QDBusMessage message = QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig"); QDBusConnection::sessionBus().send(message); }
IWorkbenchPart::Pointer WorkbenchIntroManager::GetIntroAdapterPart() const { QList<IWorkbenchWindow::Pointer> windows(this->workbench->GetWorkbenchWindows()); for (int i = 0; i < windows.size(); i++) { IWorkbenchWindow::Pointer window = windows[i]; WorkbenchPage::Pointer page = window->GetActivePage().Cast<WorkbenchPage>(); if (!page) { continue; } if (IntroIsView()) { QList<IPerspectiveDescriptor::Pointer> perspDescs(page->GetOpenPerspectives()); for (int j = 0; j < perspDescs.size(); j++) { IPerspectiveDescriptor::Pointer descriptor = perspDescs[j]; IViewReference::Pointer reference = page->FindPerspective(descriptor)->FindView( IntroConstants::INTRO_VIEW_ID); if (reference) { return reference->GetView(false); } } } else { QList<IEditorReference::Pointer> references(page->FindEditors(IEditorInput::Pointer(nullptr), IntroConstants::INTRO_EDITOR_ID, IWorkbenchPage::MATCH_ID)); Q_ASSERT(references.size() < 2); if (references.size() == 1) return references.front()->GetEditor(false); } } return IWorkbenchPart::Pointer(nullptr); }
void search() { VariableValue left, right; std::vector<VariableValue> currentPoint(_meshCentre.size()); std::vector<double> carry(_variables.size()); std::vector<window> windows(_variables.size()); long long nodesInCurrentRow; long long nodesPerRow; long long numNodes; /* set up some "helper" functions. They're not on the class because * wtf why would they be there? They're not at all useful to * anything else */ auto nodesInRow = [&] (int i) { return (_variables[i].getType() == VariableType::Discrete ? std::min(nodesPerRow, _variables[i].rangeEnd.ll - _variables[i].rangeStart.ll + 1ll) : nodesPerRow); }; auto getWindowForVariable = [&] (int idx) { nodesInCurrentRow = nodesInRow(idx); window w; if (_variables[idx].getType() == VariableType::Continuous) { w.left.d = std::max(_variables[idx].rangeStart.d, (double)_meshCentre[idx] - _sideWidth/2.0); w.right.d = std::min(_variables[idx].rangeEnd.d, (double)_meshCentre[idx] + _sideWidth/2.0); } else if (_variables[idx].getType() == VariableType::Discrete) { w.left.ll = std::max(_variables[idx].rangeStart.ll, (long long)_meshCentre[idx] - nodesInCurrentRow / 2); w.right.ll = std::min(_variables[idx].rangeEnd.ll, (long long)_meshCentre[idx] + nodesInCurrentRow / 2); } return w; }; auto incrementVariable = [&](int i) { if (_variables[i].getType() == VariableType::Discrete) { currentPoint[i].ll += (long long)((windows[i].right.ll - windows[i].left.ll) / (double) (nodesInCurrentRow - 1)); // For discrete vars, add with carry to deal with possible // windows-size problems (right - left > numNodes). // This logic could be horribly horribly f****d. double _ = (double)currentPoint[i].ll; _ += carry[i]; // I don't want to round() this, I want to floor + deal with // potential double-precision problems if (floor(_ + EPS) != floor(_)) { carry[i] = 0.0; currentPoint[i].ll = (long long)ceil(_); } else { carry[i] = _ - floor(_); currentPoint[i].ll = (long long)floor(_); } } else { currentPoint[i].d += ((windows[i].right.d - windows[i].left.d) / (double) (nodesInCurrentRow - 1)); } }; for (; ; _constrictions++) { std::fill(carry.begin(), carry.end(), 0.0); nodesPerRow = pow((1/_constrictFactor), _constrictions) + 1; numNodes = 1; for (int i = 0; i < _variables.size(); i++) { windows[i] = getWindowForVariable(i); numNodes *= nodesInCurrentRow; currentPoint[i] = windows[i].left; } std::cout << numNodes << std::endl; // This is stupid, but I'm doing it anyway to fix some // stupidity: VariableValue _ = currentPoint[0]; nodesInCurrentRow = nodesInRow(0); incrementVariable(0); // TODO Fix this later //if (currentPoint[0] - _ <= _lengthTolerance) return; if (_variables[0].getType() == VariableType::Continuous) currentPoint[0].d = _.d - (currentPoint[0].d - _.d); else currentPoint[0].ll = _.ll - (currentPoint[0].ll - _.ll); for (long long i = 0; i < numNodes; i++) { nodesInCurrentRow = nodesInRow(0); incrementVariable(0); for (int j = 0; j < _variables.size(); j++) { //nodesInCurrentRow = nodesInRow(j); // TODO hack if ((_variables[j].getType() == VariableType::Continuous && currentPoint[j].d > windows[j].right.d) || (_variables[j].getType() == VariableType::Discrete && currentPoint[j].ll > windows[j].right.ll)) { currentPoint[j] = windows[j].left; if (j < _variables.size() - 1) { nodesInCurrentRow = nodesInRow(j+1); incrementVariable(j+1); } } else break; } std::cout << "("; for (int j = 0; j < _variables.size(); j++) std::cout << (_variables[j].getType() == VariableType::Discrete ? currentPoint[j].ll : currentPoint[j].d) << (j == _variables.size() - 1 ? "" : ",\t\t"); std::cout << ")\n"; } } }
Win_Oper::Win_Oper() : //1 string start_position0(Color_Style(information), Metric_Parameters(1, 3, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), start_position1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 3, DATA_STRING_LENGTH, 1)), //Info about testobject test_obj_info0(Color_Style(information), Metric_Parameters(1, 5, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), test_obj_info1(Color_Style(information), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 5, DATA_STRING_LENGTH, 1)), //2 string chang_test_obj0(Color_Style(information), Metric_Parameters(1, 7, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), chang_test_obj1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 7, DATA_STRING_LENGTH, 1)), //3 string chang_viz0(Color_Style(information), Metric_Parameters(1, 9, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), chang_viz1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 9, DATA_STRING_LENGTH, 1)), //4 string patient_controller0(Color_Style(information), Metric_Parameters(1, 11, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), patient_controller1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 11, DATA_STRING_LENGTH, 1)), //5 string auto_mode0(Color_Style(information), Metric_Parameters(1, 13, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), auto_mode1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 13, DATA_STRING_LENGTH, 1)), //6 string eye_mode0(Color_Style(information), Metric_Parameters(1, 15, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), eye_mode1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 15, DATA_STRING_LENGTH, 1)), //7 string focus_point0(Color_Style(information), Metric_Parameters(1, 17, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), focus_point1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 17, DATA_STRING_LENGTH, 1)), //8 string record_position0(Color_Style(information), Metric_Parameters(1, 19, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), record_position1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 19, DATA_STRING_LENGTH, 1)), //Recodes count record_count0(Color_Style(information), Metric_Parameters(1, 21, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), record_count1(Color_Style(information), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 21, DATA_STRING_LENGTH, 1)), //9 string remove_record0(Color_Style(information), Metric_Parameters(1, 23, OFFSET_FOR_INFORMATION_ON_DISPLEY, 1)), remove_record1(Color_Style(interactive), Metric_Parameters(OFFSET_FOR_INFORMATION_ON_DISPLEY+2, 23, DATA_STRING_LENGTH, 1)), //Extend button extend_button0(Color_Style(interactive), Metric_Parameters(8, 28, 8, 1), "F1"), extend_button1(Color_Style(interactive), Metric_Parameters(16, 28, 8, 1), "F2"), extend_button2(Color_Style(interactive), Metric_Parameters(24, 28, 8, 1), "F3"), extend_button_description0(Color_Style(interactive), Metric_Parameters(8, 29, 8, 1)), extend_button_description1(Color_Style(interactive), Metric_Parameters(16, 29, 8, 1)), extend_button_description2(Color_Style(interactive), Metric_Parameters(24, 29, 8, 1)) { flag[0] = (char)187; flag[1] = (char)0; /*data_time_name[0] = (char)196; data_time_name[1] = (char)224; data_time_name[2] = (char)242; data_time_name[3] = (char)224; data_time_name[4] = (char)0;*/ windows(); }
const QString Window_trigger::description() const { return i18n("Window trigger: ") + windows()->comment(); }
QDir sys64(const QString &prefixHash) { return windows(prefixHash).absoluteFilePath("system32"); }
int not_windows(void) { return !windows(); }